-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Detecting native triple on RHEL 9.0 and Fedora 36 gives wrong result #12156
Comments
Fedora 36 give wrong glibc version 2.19 instead of the correct version 2.35 ! $ podman run --rm -it quay.io/fedora/fedora:36
$ dnf install -y bsdtar gcc-c++ jq
$ rpm -qa | grep -E "binutils|kernel-headers|glibc-devel|gcc-c++"
kernel-headers-5.18.4-200.fc36.x86_64
glibc-devel-2.35-4.fc36.x86_64
binutils-gold-2.37-27.fc36.x86_64
binutils-2.37-27.fc36.x86_64
gcc-c++-12.1.1-1.fc36.x86_64
$ zig version
0.10.0-dev.3027+0e26c6149
$ zig targets | jq -r '.native.triple'
x86_64-linux.5.18...5.18-gnu.2.19 It should be x86_64-linux.5.18...5.18-gnu.2.35, not x86_64-linux.5.18...5.18-gnu.2.19 ! |
Duplicate of #6469 |
Are you using static build from https://ziglang.org/download ? If so, can you please share output of |
Well, according to https://catalog.redhat.com/software/containers/ubi9/ubi/615bcf606feffc5384e8452e?container-tabs=packages your Red Hat Universal Base Image 9 installs |
And now this is a duplicate of #6469 |
No. fedora 36 reports But UBI9 (RHEL 9) still report
|
My suggestion — something to do with this?
UPD: my approach with |
the waning message is linked to : zig/lib/std/zig/system/NativeTargetInfo.zig Line 339 in d3b1cdf
this is why my project compilation goes to fallback in the nix environment, but works on my pc (the env file exists) |
@BratishkaErik do you have the /usr/bin/env on your system ? |
Yes |
If it helps anyone: King and I were able to work around this by checking if I'm building on RHEL and if so, link against glibc rather than musl. (Zig 0.9.1).
|
432: No target on linux, except RHEL r=sentientwaffle a=eatonphil `zig targets` doesn't seem to produce a target that can be safely fed back into `zig build -target X`. Or at least not in a way I can find. So rather than even trying, we'll just completely omit `-target X` like we used to do. And we'll only override the target in the macOS case. And also RHEL given ziglang/zig#12156. Closes #433 Co-authored-by: Phil Eaton <[email protected]>
Possibly addressed by 0595feb |
Zig Version
0.10.0-dev.3027+0e26c6149
Steps to Reproduce
podman run --rm -it registry.access.redhat.com/ubi9
dnf install -y bsdtar gcc-c++ jq && rpm -qa | grep -E "binutils|kernel-headers|glibc-devel|gcc-c++"
export PATH=/opt/zig:/usr/sbin:/usr/bin:/sbin:/bin
$ zig version
0.10.0-dev.3027+0e26c6149
zig targets | jq -r '.native.triple'
x86_64-linux.5.10.16...5.10.16-musl
Expected Behavior
zig targets | jq -r '.native.triple'
x86_64-linux.5.10.16...5.10.16-gnu.2.34
Actual Behavior
zig targets | jq -r '.native.triple'
x86_64-linux.5.10.16...5.10.16-musl
RHEL 9 is glibc distributions, not musl !
The text was updated successfully, but these errors were encountered: