ci-wheel: use GCC toolset when building CPython and its dependencies#421
Merged
Conversation
vyasr
approved these changes
Jun 12, 2026
bdice
approved these changes
Jun 12, 2026
bdice
left a comment
Contributor
There was a problem hiding this comment.
Validated with:
docker run --rm rapidsai/staging:ci-wheel-421-26.08-cuda12.9.2-rockylinux8-py3.14 \
python -c 'import sysconfig; print("CC =", sysconfig.get_config_var("CC")); print("CXX =", sysconfig.get_config_var("CXX"))'Output:
CC = gcc -pthread
CXX = /opt/rh/gcc-toolset-14/root/usr/bin/g++ -pthread
Contributor
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributes to #420 (hopefully "fixes", but we'll see 😅)
As described there, we observed wheel builds using
scikit-build-corefalling back to the GCC 8.5 at/usr/bin/g++.Despite enabling the GCC 14 toolset:
ci-imgs/ci-wheel.Dockerfile
Lines 143 to 144 in 2bbcab7
It looks like the root cause is something like:
sysconfig.get_config_var("CXX")returns the compiler the Python interpreter was built with/usr/bin/g++ci-wheelimages used in RAPIDS,/usr/bin/g++is the first C++ compiler onPATHat the time that build happensscikit-build-corereads that value when configuring CMake projects (scikit-build/scikit-build-core - src/scikit_build_Core/builder/generator.py)PATHlookup at CMake configure time.../usr/bin/g++is used unconditionallyThis attempts to fix it by activating the GCC toolset before building CPython.
Notes for Reviewers
I haven't tested this locally, getting the PR up to start CI before I have to step away for a bit. Will try to return to it tonight.
I also think I have an idea of which CPython change caused this, will report an issue upstream tonight.