Repository navigation
build_native_lib.sh: require GCC 12 on x86_64 and check the compiler meson uses - #784
Open
foosekis4j wants to merge 1 commit into
Open
foosekis4j wants to merge 1 commit into
foosekis4j wants to merge 1 commit into
Conversation
…meson uses
The x86_64 native build targets Sapphire Rapids, and Highway's HWY_AVX3_SPR target needs GCC 12
or newer (third_party/highway/hwy/detect_targets.h). With GCC 11 the script's version check
passed and the build then failed inside Highway. The script also checked `g++` while meson
compiles with `$CXX` when it is set, so a working `CXX=g++-13` next to an old default `g++` was
rejected.
- MIN_GCC_VERSION is 12 on x86_64 (11 elsewhere, unchanged).
- The compiler checked is `${CXX:-g++}`; its version comes from `-dumpfullversion -dumpversion`
(GCC prints only the major version for -dumpversion since 7).
foosekis4j
requested review from
MarkWolters,
ashkrisk,
jshook and
tlwillke
as code owners
November 3, 2026 17:28
Contributor
|
Before you submit for review:
If you did not complete any of these, then please explain below. |
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.
Problem
On x86_64,
build_native_lib.shbuilds the native library for Sapphire Rapids. Highway'sHWY_AVX3_SPRtarget needsGCC 12 or newer (
third_party/highway/hwy/detect_targets.h), but the script required GCC 11. With GCC 11 theversion check passes, and the build then fails inside Highway.
The script also checks
g++, while meson compiles with$CXXwhen it is set. So a machine with an old defaultg++and a newer compiler inCXX(for exampleCXX=g++-13, orgcc-toolseton RHEL) was rejected, even thoughthe build would have worked.
Change
MIN_GCC_VERSIONis 12 on x86_64, and unchanged (11) elsewhere.${CXX:-g++}, the one meson uses. Its version comes from-dumpfullversion -dumpversion(
-dumpversionalone prints only the major version since GCC 7).Tested
On Ubuntu 22.04 x86_64, default
g++11.4.0:CXX: the script stops before building:CXX=g++-13: it buildslibjvector-x86_64.so.