-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-44950: [C++] Bump minimum CMake version to 3.25 #44989
base: main
Are you sure you want to change the base?
Conversation
|
a2f952c
to
81b112a
Compare
I am unsure on how to fix the remaining failures for R. Of course this is the initial CI (we also have to update all the extended CI jobs for crossbow). |
Updating the CMake lower bound will flip the default of several policies from legacy to new; sounds like you might be relying on legacy behaviour there in some way (once you figure out which policy is at fault, there's usually a migration path to keep the old behaviour) |
ok, it seems R forces the builds to use the CMake provided on the images:
@jonkeane @assignUser @amoeba will this be an issue for CRAN? Are we somehow forced to the CMake version on those images?
|
I went through the logs of our recent checks on cran and only one is using a version < 3.25 and that seems more incidental then purposely as it's the r-odrel arm64 but the intel version has 3.26 So I don't think we should be forced to use that cmake version, additionally we have a function that fetches current cmake if an unsuited version is found but apparently there is an issue with it as seen above. IIRC there was a change to numeric version in one of the las R Versions that is causing this? I'll have a look. |
It's possible the version comparison error is from this: https://github.com/apache/arrow/pull/44989/files#diff-935746c34b16289a07b0d9bf7642dbd268b18059b6187f7cdec7c464be47a3deL731-L743
The error case should probably |
Two other places in the R
|
It would probably be more forward-looking to avoid the error entirely. Why does the function fail parsing the CMake version? Can we add |
I could be remembering wrong, but I believe the function is used to check for cmake of a certain version, and this is to be robust to where cmake may not be installed or not found at the path provided. It does not emit an error, it traps it. This might not be where the error is coming from that was observed in CI, I was just browsing the source to see where you might get a numeric version error. Looking again, and reading the output it produced, I think we're hitting this: https://github.com/apache/arrow/pull/44989/files#diff-935746c34b16289a07b0d9bf7642dbd268b18059b6187f7cdec7c464be47a3deL718
should be (To be clear, we need to fix both this and the |
.env
Outdated
@@ -54,6 +54,7 @@ UBUNTU=22.04 | |||
|
|||
# Default versions for various dependencies | |||
CLANG_TOOLS=14 | |||
CMAKE=3.25.0 |
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.
Would it be possible (and also would it be advisable...) to call this CMAKE_VERSION
instead? One of the R failures I suspect might be due to us looking to CMAKE
for a path to the cmake executable itself at
Line 695 in bcb5bd3
Sys.getenv("CMAKE"), |
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.
Aaah I didn't see the previous comments on the PR (sorry, I must have had a tab open and didn't refresh!) but I suspect this here is the answer to:
It would probably be more forward-looking to avoid the error entirely. Why does the function fail parsing the CMake version?
…h to not require platform argument
…uire the existing version to be bumped
After a bunch of trial and error, I seem to be stuck with the following issue if I override the CMake version to be used to either a manually
I am trying some things, like using an updated |
The aws-sdk-cpp it's using is coming from https://github.com/r-windows/rtools-packages/tree/master/mingw-w64-aws-sdk-cpp If you need to update it, I think you'll have to drop it from the dependencies that get downloaded in our PKGBUILD and make it dependency source=BUNDLED. Doesn't look like we're able to make any updates happen to that repo. cc @assignUser, in case you wanted to start pushing on the MXE direction again as an alternative 🙃 |
I spent some time trying to build aws-sdk-cpp under Rtools40 and got stuck building |
Update on fixing the Rtools40 build: I've created a set of patches and the awssdk source build works now so I think the approach you were taking @raulcd will work. I'm running into an issue where the patches I record don't re-apply when I rebuild so I'm working on figuring that out now. |
I figured out my issue above and now have what looks like a working set of patches so we can build the AWS SDK under Rtools40. My changes are over on raulcd#90. Still needs some work but hopefully this helps unblock this PR. |
Thanks @amoeba for the patches! I had to tweak a little but I did make some more progress. The
|
Co-authored-by: Bryce Mecum <[email protected]>
I made one more change and CI looks better now. @raulcd |
Awesome @amoeba ! I'll spend some time to trigger and fix extended CI (crossbow tasks) and we can move this to ready for review |
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.
Thanks for persisting with this. Just a few notes, mainly about leaving more breadcrumbs for us for when this inevitably breaks again.
-laws-cpp-sdk-cognito-identity -laws-cpp-sdk-sts -laws-cpp-sdk-s3 \ | ||
-laws-cpp-sdk-core -laws-c-event-stream -laws-checksums -laws-c-common \ | ||
-luserenv -lversion -lws2_32 -lbcrypt -lwininet -lwinhttp" | ||
# AWS specific libs for Windows are bundled |
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.
# AWS specific libs for Windows are bundled | |
# We build aws-sdk-cpp bundled now, so the AWS libs are included in arrow_bundled_dependencies | |
# but we also need to include these Windows system libraries |
# Uncomment L38-41 if you're testing a new rtools dependency that hasn't yet sync'd to CRAN | ||
# curl https://raw.githubusercontent.com/r-windows/rtools-packages/master/pacman.conf > /etc/pacman.conf | ||
# cp /etc/pacman.conf /etc/pacman.conf.bak | ||
# curl https://raw.githubusercontent.com/r-windows/rtools-packages/master/pacman.conf > /etc/pacman.conf | ||
# cat /etc/pacman.conf | ||
# curl -OSsl "http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" | ||
# pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz && rm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz | ||
# pacman --noconfirm -Scc | ||
|
||
# pacman --noconfirm -Syy | ||
# pacman --noconfirm -S ${MINGW_PACKAGE_PREFIX}-cmake | ||
|
||
#Try reverting to the original pacman.conf | ||
# cp /etc/pacman.conf.bak /etc/pacman.conf | ||
# cat /etc/pacman.conf |
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.
As discussed, this comment is no longer valid because the rtools pacman setup is no longer maintained.
# Uncomment L38-41 if you're testing a new rtools dependency that hasn't yet sync'd to CRAN | |
# curl https://raw.githubusercontent.com/r-windows/rtools-packages/master/pacman.conf > /etc/pacman.conf | |
# cp /etc/pacman.conf /etc/pacman.conf.bak | |
# curl https://raw.githubusercontent.com/r-windows/rtools-packages/master/pacman.conf > /etc/pacman.conf | |
# cat /etc/pacman.conf | |
# curl -OSsl "http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" | |
# pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz && rm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz | |
# pacman --noconfirm -Scc | |
# pacman --noconfirm -Syy | |
# pacman --noconfirm -S ${MINGW_PACKAGE_PREFIX}-cmake | |
#Try reverting to the original pacman.conf | |
# cp /etc/pacman.conf.bak /etc/pacman.conf | |
# cat /etc/pacman.conf |
ci/scripts/PKGBUILD
Outdated
@@ -119,7 +117,9 @@ build() { | |||
-DCMAKE_BUILD_TYPE="release" \ | |||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ | |||
-DCMAKE_UNITY_BUILD=OFF \ | |||
-DCMAKE_VERBOSE_MAKEFILE=ON | |||
-DCMAKE_VERBOSE_MAKEFILE=ON \ | |||
-DAWSSDK_SOURCE=BUNDLED \ |
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.
Move -DAWSSDK_SOURCE=BUNDLED \
up so we stay sorted?
ci/scripts/PKGBUILD
Outdated
-DCMAKE_VERBOSE_MAKEFILE=ON | ||
-DCMAKE_VERBOSE_MAKEFILE=ON \ | ||
-DAWSSDK_SOURCE=BUNDLED \ | ||
-DARROW_USE_CCACHE=OFF |
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.
Is this needed or just part of debugging? If it's important, maybe leave a comment explaining why?
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.
We might try CI with this removed. I'll do that in a sec.
One of the AWS EPs was failing with a ccache error about not being able to make temporary files and I tracked it down to a bug that affects older version of ccache (which we have here currently). This was my workaround.
I'll test in CI without this and, if we need it, I'll put a comment.
@@ -83,7 +81,7 @@ build() { | |||
# segfaults in tests | |||
|
|||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ |
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.
This "-DCMAKE_INSTALL_PREFIX="
looks odd up here--why would it go before the call to cmake itself? And we also have -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX}
below. (I know y'all didn't touch it in this PR, just observing.)
@@ -83,7 +81,7 @@ build() { | |||
# segfaults in tests | |||
|
|||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ | |||
${MINGW_PREFIX}/bin/cmake.exe \ | |||
"${PROGRAMFILES}\CMake\bin\cmake.exe" \ |
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 feel like this deserves a comment explaining where this comes from, and/or passing in path-to-cmake via env var or something so that it's explicitly set.
This is currently under development. I am only exercising CI to find out what things would require to be updated
This is still being decided and a decision hasn't been finalized yet.
Rationale for this change
We want to upgrade our CMake version to 3.25 as discussed on the ML:
https://lists.apache.org/thread/h8jp16ktrj11fmjmjhlg6xvkvv9wzvjk
What changes are included in this PR?
TBD
Are these changes tested?
Yes, via CI.
Are there any user-facing changes?
Yes, the minimum CMake version to be used to build Arrow is bumped to 3.25.
This PR includes breaking changes to build systems.