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

yosys: fix build on darwin #38826

Merged
merged 2 commits into from Apr 16, 2018
Merged

yosys: fix build on darwin #38826

merged 2 commits into from Apr 16, 2018

Conversation

vbgl
Copy link
Contributor

@vbgl vbgl commented Apr 12, 2018

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.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: yosys

Partial log (click to expand)

shrinking /nix/store/zlwwc2dhdfh5xsb6268k0h4lkndmggfx-yosys-2018.03.21/bin/yosys-filterlib
shrinking /nix/store/zlwwc2dhdfh5xsb6268k0h4lkndmggfx-yosys-2018.03.21/bin/yosys-abc
shrinking /nix/store/zlwwc2dhdfh5xsb6268k0h4lkndmggfx-yosys-2018.03.21/bin/yosys
strip is /nix/store/j7d4mr0ikv974ig7yzhknpsq288js4bs-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/zlwwc2dhdfh5xsb6268k0h4lkndmggfx-yosys-2018.03.21/bin
patching script interpreter paths in /nix/store/zlwwc2dhdfh5xsb6268k0h4lkndmggfx-yosys-2018.03.21
/nix/store/zlwwc2dhdfh5xsb6268k0h4lkndmggfx-yosys-2018.03.21/bin/yosys-smtbmc: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/qxix1jzfslmcbd75b024sgz704r94qxl-python3-3.6.5/bin/python3"
/nix/store/zlwwc2dhdfh5xsb6268k0h4lkndmggfx-yosys-2018.03.21/bin/yosys-config: interpreter directive changed from "/bin/bash" to "/nix/store/adw9jx59wnrh5659wz43nbjya3m4b3gl-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/zlwwc2dhdfh5xsb6268k0h4lkndmggfx-yosys-2018.03.21...
/nix/store/zlwwc2dhdfh5xsb6268k0h4lkndmggfx-yosys-2018.03.21

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: yosys

Partial log (click to expand)

shrinking /nix/store/bmvwwrvfl03381vzhmdgf5cpy1l76w62-yosys-2018.03.21/bin/yosys
shrinking /nix/store/bmvwwrvfl03381vzhmdgf5cpy1l76w62-yosys-2018.03.21/bin/yosys-filterlib
shrinking /nix/store/bmvwwrvfl03381vzhmdgf5cpy1l76w62-yosys-2018.03.21/bin/yosys-abc
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/bmvwwrvfl03381vzhmdgf5cpy1l76w62-yosys-2018.03.21/bin
patching script interpreter paths in /nix/store/bmvwwrvfl03381vzhmdgf5cpy1l76w62-yosys-2018.03.21
/nix/store/bmvwwrvfl03381vzhmdgf5cpy1l76w62-yosys-2018.03.21/bin/yosys-smtbmc: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/96wn2gz3mwi71gwcrvpfg39bsymd7gqx-python3-3.6.5/bin/python3"
/nix/store/bmvwwrvfl03381vzhmdgf5cpy1l76w62-yosys-2018.03.21/bin/yosys-config: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
checking for references to /tmp/nix-build-yosys-2018.03.21.drv-0 in /nix/store/bmvwwrvfl03381vzhmdgf5cpy1l76w62-yosys-2018.03.21...
/nix/store/bmvwwrvfl03381vzhmdgf5cpy1l76w62-yosys-2018.03.21

@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {

enableParallelBuilding = true;
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ tcl readline libffi python3 bison flex ];
buildInputs = [ gcc tcl readline libffi python3 bison flex ];
Copy link
Member

Choose a reason for hiding this comment

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

Why does this need gcc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess you should ask the authors…

There is a “config-clang” target in the makefile, but I did not manage to get the build go through (I got an error related to C++ header files). Should I investigate further or is the work-around of using GCC acceptable?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry for the delay. Just adding gcc doesn't work properly so I don't think it's actually needed. But if you don't want to spend more time on this, overriding the stdenv in all-packages.nix is the proper way to use gcc in all platforms.

{
  foo = callPackage ./foo { stdenv = gccStdenv; };
}

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: yosys

Partial log (click to expand)

shrinking /nix/store/8p25wqryrc0yyn4xgabiyxyc13dyzgkp-yosys-2018.03.21/bin/yosys-filterlib
shrinking /nix/store/8p25wqryrc0yyn4xgabiyxyc13dyzgkp-yosys-2018.03.21/bin/yosys-abc
shrinking /nix/store/8p25wqryrc0yyn4xgabiyxyc13dyzgkp-yosys-2018.03.21/bin/yosys
strip is /nix/store/j7d4mr0ikv974ig7yzhknpsq288js4bs-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/8p25wqryrc0yyn4xgabiyxyc13dyzgkp-yosys-2018.03.21/bin
patching script interpreter paths in /nix/store/8p25wqryrc0yyn4xgabiyxyc13dyzgkp-yosys-2018.03.21
/nix/store/8p25wqryrc0yyn4xgabiyxyc13dyzgkp-yosys-2018.03.21/bin/yosys-smtbmc: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/qxix1jzfslmcbd75b024sgz704r94qxl-python3-3.6.5/bin/python3"
/nix/store/8p25wqryrc0yyn4xgabiyxyc13dyzgkp-yosys-2018.03.21/bin/yosys-config: interpreter directive changed from "/bin/bash" to "/nix/store/adw9jx59wnrh5659wz43nbjya3m4b3gl-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/8p25wqryrc0yyn4xgabiyxyc13dyzgkp-yosys-2018.03.21...
/nix/store/8p25wqryrc0yyn4xgabiyxyc13dyzgkp-yosys-2018.03.21

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: symbiyosys, yosys

Partial log (click to expand)

patching script interpreter paths in /nix/store/v6pzsb8hv4kd17fgkrnaflvpprrqhbml-symbiyosys-2018.03.21/bin/sby
/nix/store/v6pzsb8hv4kd17fgkrnaflvpprrqhbml-symbiyosys-2018.03.21/bin/sby: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/qxix1jzfslmcbd75b024sgz704r94qxl-python3-3.6.5/bin/python3"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/v6pzsb8hv4kd17fgkrnaflvpprrqhbml-symbiyosys-2018.03.21
strip is /nix/store/j7d4mr0ikv974ig7yzhknpsq288js4bs-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/v6pzsb8hv4kd17fgkrnaflvpprrqhbml-symbiyosys-2018.03.21/bin
patching script interpreter paths in /nix/store/v6pzsb8hv4kd17fgkrnaflvpprrqhbml-symbiyosys-2018.03.21
checking for references to /build in /nix/store/v6pzsb8hv4kd17fgkrnaflvpprrqhbml-symbiyosys-2018.03.21...
/nix/store/v6pzsb8hv4kd17fgkrnaflvpprrqhbml-symbiyosys-2018.03.21
/nix/store/8p25wqryrc0yyn4xgabiyxyc13dyzgkp-yosys-2018.03.21

@vbgl
Copy link
Contributor Author

vbgl commented Apr 16, 2018

Thanks for the tip, @LnL7. Meanwhile I figured out how to fix the build of yosys with clang without breaking the one of abc. There is thus no more need for gcc.

@LnL7 LnL7 merged commit 6f416dc into NixOS:master Apr 16, 2018
@vbgl vbgl deleted the darwin-yosys branch April 16, 2018 20:06
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: symbiyosys, yosys

Partial log (click to expand)

  /nix/store/fg6asqlsnc0wnv9fj6zp29w9aadbm6ir-libffi-3.2.1-dev
  /nix/store/giabbzm4axssp5na7idb1bs4my3zzbf5-symbiyosys-2018.03.21
  /nix/store/pngdvgswl82dgfh4pk4rnjg0ihzllhzs-yosys-2018.03.21
copying path '/nix/store/fg6asqlsnc0wnv9fj6zp29w9aadbm6ir-libffi-3.2.1-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/b7hyq78gna2lj3p44pfwmvimhaj1cwkb-tcl-8.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/96wn2gz3mwi71gwcrvpfg39bsymd7gqx-python3-3.6.5' from 'https://cache.nixos.org'...
copying path '/nix/store/pngdvgswl82dgfh4pk4rnjg0ihzllhzs-yosys-2018.03.21' from 'https://cache.nixos.org'...
copying path '/nix/store/giabbzm4axssp5na7idb1bs4my3zzbf5-symbiyosys-2018.03.21' from 'https://cache.nixos.org'...
/nix/store/giabbzm4axssp5na7idb1bs4my3zzbf5-symbiyosys-2018.03.21
/nix/store/pngdvgswl82dgfh4pk4rnjg0ihzllhzs-yosys-2018.03.21

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