-
Notifications
You must be signed in to change notification settings - Fork 351
Add cmake build support #1308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cmake build support #1308
Conversation
c37746a
to
7315eae
Compare
Hi 👋 I've thoroughly reviewed your excellent work on cleaning up and completing the CMake implementation. This is a fantastic transformation from the initial foundation into a production-ready build system. Here's my detailed review: |
084ea46
to
281eae8
Compare
@fruffy / @jafingerhut Here's an updated version of @sudhanshu112233shukla's PR (#1303). They've reviewed it and seem happy. I've asked them to complete the DCO sign-off process on their original PR as I pull some of their commits. Once that's done, I'll re-pull those commits and re-push. I believe that all my commits have the sign-off. |
Please do not use AI tools blindly, that is basically spam. Use your own judgement on the output and only comment what you think makes sense. |
6edced4
to
a7c4990
Compare
Rebased to current main to pull in the lpm trie changes. (Originally merged, but decided to rebase to make it easier later to pull in the signed-off versions of the first two commits.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments.
@@ -12,7 +12,12 @@ set -e | |||
git clone -b 0.13.0 https://github.com/apache/thrift.git thrift-0.13.0 | |||
cd thrift-0.13.0 | |||
./bootstrap.sh | |||
./configure --with-cpp=yes --with-c_glib=no --with-java=no --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no | |||
./configure --with-as3=no --with-c_glib=no --with-csharp=no --with-cpp=yes \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, Thrift also has a CMake-build now, which can be used instead of CMake. See this setup in the Tofino studio:
https://github.com/p4lang/open-p4studio/blob/main/p4studio/dependencies/source/install_thrift.py#L52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look at switching 8000 to the cmake version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried switching to using the cmake thrift build but then ran into issues building bmv2. I suggest we leave as is now and then switch to the cmake build later. (I don't think the switch for thrift has to be done at the same time as the switch for bmv2.)
Signed-off-by: sudhanshu shukla <161225935+sudhanshu112233shukla@users.noreply.github.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Add additional CMakeLists.txt files neeeded by the ubuntu-22 tests Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Also attempt to fix a dependency issue Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Improve python generation and installation Adjust install rules to better match autoconf setup. Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
More information from CMAKE_IMPLEMENTATION_SUMMARY.md into README.md. Update the description in README.md to reflec the current status. Remove uneeded PR_DESCRIPTION.md file. Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, with some nits. Unclear to me whether the install step is working the same as autoconf here, but we can fix that later. Nice to see CMake support finally!
test_actions | ||
test_ageing | ||
test_assert_assume | ||
test_bm_apps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only works with nanomsg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're probably right that this test should only be built if nanomsg is enabled. There may be others as well.
The same issue appears to exist with the autotools build. The tests dir is included when thrift is enabled, and Makefile.am in tests does not have anything conditional on nanomsg.
I've filed #1310 so that this doesn't get forgotten about.
Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
@fruffy Can you merge this PR please? GitHub says I'm not authorized to push to that branch. |
Fix breakage to the build-no-pi job introduced by p4lang#1308
Fix breakage to the build-no-pi job introduced by p4lang#1308 Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Fix breakage to the build-no-pi job introduced by p4lang#1308 Signed-off-by: Glen Gibb <gleng@ai-fabrics.com>
Cleaning up PR #1303 from sudhanshu112233shukla.
Items that need to be addressed in future PRs:
Replicate the Thrift Python file handling. (The Python files are generated, but any additional steps are not performed, such as installing.)DONE - 6/6/25.Verify thatDONE - 6/6/25.make install
installs all necessary files in the correct locations.Detailed status is in the file CMAKE_IMPLEMENTATION_SUMMARY.md
Updates: