Skip to content
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

Merged
merged 1 commit into from Feb 21, 2018
Merged

racket-minimal: build on darwin #35285

merged 1 commit into from Feb 21, 2018

Conversation

clacke
Copy link
Contributor

@clacke clacke commented Feb 21, 2018

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • [✓] macOS
    • [✓] other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • [✓] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • [✓] Tested execution of all binary files (usually in ./result/bin/)
  • [✓] Fits CONTRIBUTING.md.

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")
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(on darwin)

Copy link
Member

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.

@LnL7
Copy link
Member

LnL7 commented Feb 21, 2018

@GrahamcOfBorg build racket-minimal

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Partial log (click to expand)

cp "../COPYING-libscheme.txt" "../COPYING_LESSER.txt" "../COPYING.txt" "/nix/store/20jh9mdzw4ngyg6h2205lfpwhcjwj0ca-racket-minimal-6.12/share/racket"/
make[2]: Leaving directory '/private/tmp/nix-build-racket-minimal-6.12.drv-0/racket-6.12/src/build'
make[1]: Leaving directory '/private/tmp/nix-build-racket-minimal-6.12.drv-0/racket-6.12/src/build'
post-installation fixup
gzipping man pages under /nix/store/20jh9mdzw4ngyg6h2205lfpwhcjwj0ca-racket-minimal-6.12/share/man/
strip is /nix/store/v8ifq0hapblpr2z0hx4wvwg02w4aczqy-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/20jh9mdzw4ngyg6h2205lfpwhcjwj0ca-racket-minimal-6.12/lib  /nix/store/20jh9mdzw4ngyg6h2205lfpwhcjwj0ca-racket-minimal-6.12/bin
patching script interpreter paths in /nix/store/20jh9mdzw4ngyg6h2205lfpwhcjwj0ca-racket-minimal-6.12
/nix/store/20jh9mdzw4ngyg6h2205lfpwhcjwj0ca-racket-minimal-6.12/bin/.raco-wrapped: interpreter directive changed from "/bin/sh" to "/nix/store/19cc89zq5n68ibr53izy4zgcr5qg2rza-bash-4.4-p12/bin/sh"
/nix/store/20jh9mdzw4ngyg6h2205lfpwhcjwj0ca-racket-minimal-6.12

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

shrinking /nix/store/7v26yfzgjys8130jqprvnhcdxr5dd6n9-racket-minimal-6.12/lib/racket/mzdyn3m.o
wrong ELF type
gzipping man pages under /nix/store/7v26yfzgjys8130jqprvnhcdxr5dd6n9-racket-minimal-6.12/share/man/
strip is /nix/store/adidfx4pa7vmvby0gjqqmiwg2x49yr27-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/7v26yfzgjys8130jqprvnhcdxr5dd6n9-racket-minimal-6.12/lib  /nix/store/7v26yfzgjys8130jqprvnhcdxr5dd6n9-racket-minimal-6.12/bin 
patching script interpreter paths in /nix/store/7v26yfzgjys8130jqprvnhcdxr5dd6n9-racket-minimal-6.12
/nix/store/7v26yfzgjys8130jqprvnhcdxr5dd6n9-racket-minimal-6.12/bin/.raco-wrapped: interpreter directive changed from "/bin/sh" to "/nix/store/fcxliihmhm2ak9z4890gk0qw63zsbrcx-bash-4.4-p12/bin/sh"
checking for references to /tmp/nix-build-racket-minimal-6.12.drv-0 in /nix/store/7v26yfzgjys8130jqprvnhcdxr5dd6n9-racket-minimal-6.12...
wrong ELF type
/nix/store/7v26yfzgjys8130jqprvnhcdxr5dd6n9-racket-minimal-6.12

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

shrinking /nix/store/yh3i5irfkpc6w41gjhcv4n3qr7lp6c41-racket-minimal-6.12/lib/racket/starter
shrinking /nix/store/yh3i5irfkpc6w41gjhcv4n3qr7lp6c41-racket-minimal-6.12/bin/.racket-wrapped
gzipping man pages under /nix/store/yh3i5irfkpc6w41gjhcv4n3qr7lp6c41-racket-minimal-6.12/share/man/
strip is /nix/store/skd6ix5ipkyhxzq7naylj4digawakl4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/yh3i5irfkpc6w41gjhcv4n3qr7lp6c41-racket-minimal-6.12/lib  /nix/store/yh3i5irfkpc6w41gjhcv4n3qr7lp6c41-racket-minimal-6.12/bin
patching script interpreter paths in /nix/store/yh3i5irfkpc6w41gjhcv4n3qr7lp6c41-racket-minimal-6.12
/nix/store/yh3i5irfkpc6w41gjhcv4n3qr7lp6c41-racket-minimal-6.12/bin/.raco-wrapped: interpreter directive changed from "/bin/sh" to "/nix/store/shjmvsnwrlg7rd8m0kzgpygqq4if312z-bash-4.4-p12/bin/sh"
checking for references to /build in /nix/store/yh3i5irfkpc6w41gjhcv4n3qr7lp6c41-racket-minimal-6.12...
wrong ELF type
/nix/store/yh3i5irfkpc6w41gjhcv4n3qr7lp6c41-racket-minimal-6.12

@@ -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")
Copy link
Member

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.

@LnL7 LnL7 merged commit 13187cb into NixOS:master Feb 21, 2018
@clacke clacke deleted the racket-darwin branch February 21, 2018 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants