-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Nix Shell returns arm64 processor architecture on M1 Mac #147914
Comments
According to this issue this is normal on M1 machines:
https://apple.stackexchange.com/questions/420452/running-uname-m-gives-x86-64-on-m1-mac-mini |
Apparently current version of Thanks to that the architecture reported is This might be able to fix my issue if such updated |
My fix for SQLCipher was rejected. Seems to me like this needs to be fixed in the Nix shell itself and how it reports the processor architecture. Based on contributions in #95903 I'm going to ping @domenkozar and @kloenk. |
Apparently, this is a difference between GNU coreutils' |
Oh yeah, @autc04 you're right, if I try the
So this might actually be an issue with |
Thanks to help from Paul Eggert we now have a patch in GNU Coreutils that fixes this:
Thanks @autc04 for suggesting this might be specific to |
Until a recent patch in coreutils, gnus uname -p returned a different arch on apple silicon macs, compared to the uname shipped with macos. This causes config.guess to produce incorrect build system triplets for various projects on these systems when in a nix-shell.[23][42] As coreutils only releases every few months/years and no release is planned at the moment, I'm introducing the patch here. We can drop it once the next coreutils version is released. I made a tiny adjustment to the patch from [23]. I removed the usage of MAYBE_UNUSED, which currently only compiles against HEAD. [23] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52330 [42] NixOS#147914
Until a recent patch in coreutils, gnus uname -p returned a different arch on apple silicon macs, compared to the uname shipped with macos. This causes config.guess to produce incorrect build system triplets for various projects on these systems when in a nix-shell.[23][42] As coreutils only releases every few months/years and no release is planned at the moment, I'm introducing the patch here. We can drop it once the next coreutils version is released. I made a tiny adjustment to the patch from [23]. I removed the usage of MAYBE_UNUSED, which currently only compiles against HEAD. [23] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52330 [42] #147914
Describe the bug
I've discovered that the results of
uname -p
are different in Nix shell compared to all other shells:I do not know if this behavior is not causing other issues in other places.
Steps To Reproduce
nix-shell
of any kinduname -p
Expected behavior
I'm not 100% sure if the correct behavior is to show
arm
whenuname -p
is called, but this is what other shells do:uname -p
uname -m
/bin/bash
arm
arm64
/bin/zsh
arm
arm64
/opt/homebrew/bin/zsh
arm
arm64
nix-shell
arm64
arm64
Additional context
Discovered while trying to resolve build issues with SQLCipher for our application in status-im/status-mobile#12799.
This is causing a build failure for SQLCipher because the
configure
script expectsarm
instead ofarm64
.I have already opened an issue for that: sqlcipher/sqlcipher#413
Notify maintainers
Not sure who...
Metadata
Maintainer information:
The text was updated successfully, but these errors were encountered: