-
Notifications
You must be signed in to change notification settings - Fork 819
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
Update cmake minimum version to 3.24 #12035
base: master
Are you sure you want to change the base?
Update cmake minimum version to 3.24 #12035
Conversation
since LINK_GROUP RESCAN was added in version 3.24. https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:LINK_GROUP
since CMAKE_COMPILE_WARNING_AS_ERROR was added in version 3.24. https://cmake.org/cmake/help/latest/variable/CMAKE_COMPILE_WARNING_AS_ERROR.html
We might want to stick with 3.20. ATS 10 meeting note says 3.20 is the minimum version required. The note doesn't mention where the requirement came from, but I don't think 3.20 is a random version. @moonchen It seems like the link issue remains on some platforms. |
I would like to upgrade to 3.24 if possible. The circular dependency issues with GNU ld are difficult to work around without link groups. It looks like we've been using CMAKE_COMPILE_WARNING_AS_ERROR in presets for the past two years. |
I suppose I personally don't mind upgrading to 3.24, but I think it should be proposed on the dev list. |
If we stick with CMake 3.20, we can use a workaround which uses -Wl,--start-group and -Wl,--end-group manually (hnakamur@83784aa).
If we upgrade CMake to 3.24, we might want add an instruction to install CMake >=3.24 from https://github.com/Kitware/CMake/releases to README. |
I found |
Thanks for finding the workaround with As far as macOS, the rescan behavior is included with the included linker. The This current way is messy, but I hope we can remove the circular dependencies soon so none of this hacking is necessary. |
I've sent a pull request: Link iocore/net/test_net correctly on OSes other than macOS with old CMake (<3.24) by hnakamur · Pull Request #12038 · apache/trafficserver. What to do with this issue. Should I close it? |
LINK_GROUP
RESCAN
is used insrc/iocore/net/CMakeLists.txt
. It was added in CMake version 3.24.CMAKE_COMPILE_WARNING_AS_ERROR
is used inCMakePresets.json
. It was added in CMake version 3.24.CMake 3.22.1 on Ubuntu 22.04 causes the following link error for
src/iocore/net/test_net
.CMake 3.22.1 on Ubuntu 22.04 causes the following warning when running
cmake --preset default
:CMake 3.24 does not cause the above problems.