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
racket-minimal: build on darwin #35285
Conversation
Technically, racket compiles and packages too, but it doesn't pass all tests yet, so the build fails. gcc7Stdenv is GCC 7 with the MacOS-specific adaptations retained. Building on MacOS with that works, but we should be using clang. I'm hoping that the next person wanting to override the compiler version in some other derivation sees that attribute and doesn't inadvertently break a MacOS build again.
@@ -47,9 +48,13 @@ stdenv.mkDerivation rec { | |||
|
|||
FONTCONFIG_FILE = fontsConf; | |||
LD_LIBRARY_PATH = libPath; | |||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.cc.isGNU "-lgcc_s"; | |||
NIX_LDFLAGS = stdenv.lib.concatStringsSep " " [ | |||
(stdenv.lib.optionalString (stdenv.cc.isGNU && ! stdenv.isDarwin) "-lgcc_s") |
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.
Isn't just isGNU
enough?
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.
It is possible, if you want to for whatever reason, to build this package with gcc7Stdenv, just pass that as the stdenv, and in case you do, you need to not use -lgcc_s.
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.
(on darwin)
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.
That's not something we usually worry about, but I guess it doesn't hurt.
@GrahamcOfBorg build racket-minimal |
Success on x86_64-darwin (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
@@ -47,9 +48,13 @@ stdenv.mkDerivation rec { | |||
|
|||
FONTCONFIG_FILE = fontsConf; | |||
LD_LIBRARY_PATH = libPath; | |||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.cc.isGNU "-lgcc_s"; | |||
NIX_LDFLAGS = stdenv.lib.concatStringsSep " " [ | |||
(stdenv.lib.optionalString (stdenv.cc.isGNU && ! stdenv.isDarwin) "-lgcc_s") |
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.
That's not something we usually worry about, but I guess it doesn't hurt.
Technically, racket compiles and packages too, but it doesn't pass all
tests yet, so the build fails.
gcc7Stdenv is GCC 7 with the MacOS-specific adaptations retained.
Building on MacOS with that works, but we should be using clang.
I'm hoping that the next person wanting to override the compiler
version in some other derivation sees that attribute and doesn't
inadvertently break a MacOS build again.
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)