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

Go cross compilation preparation #50885

Merged
merged 2 commits into from Nov 22, 2018
Merged

Go cross compilation preparation #50885

merged 2 commits into from Nov 22, 2018

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Nov 21, 2018

Motivation for this change

These are just two simple refactoring commits I picked from #50835
to prepare cross-compiling that should be non-controversial itself.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Since it was overriding configurePhase postConfigure has not be used in a while.
For cross compilation we want to skip installCheckPhase.
@Mic92
Copy link
Member Author

Mic92 commented Nov 21, 2018

@GrahamcOfBorg build go

@Mic92
Copy link
Member Author

Mic92 commented Nov 21, 2018

@GrahamcOfBorg build direnv

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: direnv

Partial log (click to expand)

strip is /nix/store/j13c9z0z495wxdc97if8z451x53m1j25-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/sbr79xbqxdzwnikqzp1w203fnha70zp8-direnv-2.17.0-bin/bin
patching script interpreter paths in /nix/store/sbr79xbqxdzwnikqzp1w203fnha70zp8-direnv-2.17.0-bin
checking for references to /build/ in /nix/store/sbr79xbqxdzwnikqzp1w203fnha70zp8-direnv-2.17.0-bin...
cannot find section .dynamic
shrinking RPATHs of ELF executables and libraries in /nix/store/3dmkr1iq9av12dbdh4qmwfpi5z65abrh-direnv-2.17.0
strip is /nix/store/j13c9z0z495wxdc97if8z451x53m1j25-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/3dmkr1iq9av12dbdh4qmwfpi5z65abrh-direnv-2.17.0
checking for references to /build/ in /nix/store/3dmkr1iq9av12dbdh4qmwfpi5z65abrh-direnv-2.17.0...
/nix/store/sbr79xbqxdzwnikqzp1w203fnha70zp8-direnv-2.17.0-bin

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: go_1_11

Partial log (click to expand)

/nix/store/1fsa6rjj8b3s1ds7kccql1sp1d0aq2zk-go-1.11.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: go

Partial log (click to expand)


##### ../test/bench/go1
testing: warning: no tests to run
PASS
ok      _/nix/store/1fsa6rjj8b3s1ds7kccql1sp1d0aq2zk-go-1.11.2/share/go/test/bench/go1  5.487s

##### ../test

ALL TESTS PASSED
/nix/store/1fsa6rjj8b3s1ds7kccql1sp1d0aq2zk-go-1.11.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: go

Partial log (click to expand)


##### ../test/bench/go1
testing: warning: no tests to run
PASS
ok      _/nix/store/sa7wl4n844rws28wzzx9wm56spdi3qfn-go-1.11.2/share/go/test/bench/go1  3.425s

##### ../test

ALL TESTS PASSED
/nix/store/sa7wl4n844rws28wzzx9wm56spdi3qfn-go-1.11.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: go_1_11

Partial log (click to expand)

  /nix/store/aac82p8805r99c0yfqm4na36q2fxsdlq-python3.7-lxml-4.2.5.drv
  /nix/store/5z18z7irb036dzq5p3rlsaclf6yd75sd-python3-3.7.1-env.drv
  /nix/store/4djy6dlamipmn4z94kckmpndwabmfzps-gnutls-3.6.2.drv
  /nix/store/jawrz8zfi8piwwc9xsm25qfnnrfm5wv1-libmicrohttpd-0.9.60.drv
  /nix/store/mg09vs06vss5nmlcp3najzqbd630q198-glib-2.56.0.drv
  /nix/store/scdwbg1xbhsha37x9mffjv2mx63xqya7-systemd-239.drv
  /nix/store/vpvn91iv8r37q75w31yyz0sxb5gl3czw-procps-3.3.15.drv
  /nix/store/27xichdcrapq3n5y24af77851k8byf0k-go-1.11.2.drv
waiting for locks or build slots...
/nix/store/sa7wl4n844rws28wzzx9wm56spdi3qfn-go-1.11.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: direnv

Partial log (click to expand)

strip is /nix/store/1jprj383qnzd50vn8qq3a0id6a08a9fi-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/6bbrn6giwqsvv44vkv74l9fjd4416v66-direnv-2.17.0-bin/bin
patching script interpreter paths in /nix/store/6bbrn6giwqsvv44vkv74l9fjd4416v66-direnv-2.17.0-bin
checking for references to /build/ in /nix/store/6bbrn6giwqsvv44vkv74l9fjd4416v66-direnv-2.17.0-bin...
cannot find section .dynamic
shrinking RPATHs of ELF executables and libraries in /nix/store/9z2d9c8d199ksfwsxd01x5ybcl805f7d-direnv-2.17.0
strip is /nix/store/1jprj383qnzd50vn8qq3a0id6a08a9fi-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/9z2d9c8d199ksfwsxd01x5ybcl805f7d-direnv-2.17.0
checking for references to /build/ in /nix/store/9z2d9c8d199ksfwsxd01x5ybcl805f7d-direnv-2.17.0...
/nix/store/6bbrn6giwqsvv44vkv74l9fjd4416v66-direnv-2.17.0-bin

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-darwin (full log)

Attempted: go

Partial log (click to expand)

cannot build derivation '/nix/store/3zm6i96v9zpbqwhv790ifb1gbh4iak32-developer_cmds-osx-10.11.6.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/h1vj8r17gzqg7w23bla0fg1ss5j9kn9h-libutil-osx-10.11.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/bqf8j43ky0vcb19xybg3dmn1h11fd4ql-Librpcsvc-osx-10.11.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/rgm9s1kwcb6ssrqalzls28g1wrp6rwcz-top-osx-10.11.6.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/vr7nc3nv0s1rsm31q9dfvpcifgzm5xq0-system_cmds-osx-10.11.6.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/m1i05ajvq9bb8c2lz667w22p6lakkkx0-top-1003.1-2008.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/p6rwnpl3fi06ap5x5rfh0y7j1x5phnlb-sysctl-1003.1-2008.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/as6xgj84yw3sqx6b4ry82p6qnj8sivmr-procps-1003.1-2008.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/y17ib12ql4y6l4n0q89hrs45rwn56ldz-go-1.11.2.drv': 11 dependencies couldn't be built
error: build of '/nix/store/y17ib12ql4y6l4n0q89hrs45rwn56ldz-go-1.11.2.drv' failed

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-darwin (full log)

Attempted: go_1_11

Partial log (click to expand)

cannot build derivation '/nix/store/3zm6i96v9zpbqwhv790ifb1gbh4iak32-developer_cmds-osx-10.11.6.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/h1vj8r17gzqg7w23bla0fg1ss5j9kn9h-libutil-osx-10.11.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/bqf8j43ky0vcb19xybg3dmn1h11fd4ql-Librpcsvc-osx-10.11.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/rgm9s1kwcb6ssrqalzls28g1wrp6rwcz-top-osx-10.11.6.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/vr7nc3nv0s1rsm31q9dfvpcifgzm5xq0-system_cmds-osx-10.11.6.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/m1i05ajvq9bb8c2lz667w22p6lakkkx0-top-1003.1-2008.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/p6rwnpl3fi06ap5x5rfh0y7j1x5phnlb-sysctl-1003.1-2008.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/as6xgj84yw3sqx6b4ry82p6qnj8sivmr-procps-1003.1-2008.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/y17ib12ql4y6l4n0q89hrs45rwn56ldz-go-1.11.2.drv': 11 dependencies couldn't be built
error: build of '/nix/store/y17ib12ql4y6l4n0q89hrs45rwn56ldz-go-1.11.2.drv' failed

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-darwin (full log)

Attempted: direnv

Partial log (click to expand)

cannot build derivation '/nix/store/bqf8j43ky0vcb19xybg3dmn1h11fd4ql-Librpcsvc-osx-10.11.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/rgm9s1kwcb6ssrqalzls28g1wrp6rwcz-top-osx-10.11.6.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/vr7nc3nv0s1rsm31q9dfvpcifgzm5xq0-system_cmds-osx-10.11.6.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/m1i05ajvq9bb8c2lz667w22p6lakkkx0-top-1003.1-2008.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/p6rwnpl3fi06ap5x5rfh0y7j1x5phnlb-sysctl-1003.1-2008.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/as6xgj84yw3sqx6b4ry82p6qnj8sivmr-procps-1003.1-2008.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/y17ib12ql4y6l4n0q89hrs45rwn56ldz-go-1.11.2.drv': 11 dependencies couldn't be built
cannot build derivation '/nix/store/9sn3931pwz3ikl5fa9x20c51l9qrfh79-govers-20150109-3b5f175.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/g9gzx5x7vjab8lm96iipkig4vs2vc9na-direnv-2.17.0.drv': 4 dependencies couldn't be built
error: build of '/nix/store/g9gzx5x7vjab8lm96iipkig4vs2vc9na-direnv-2.17.0.drv' failed

@globin globin merged commit 416d892 into NixOS:staging Nov 22, 2018
@Mic92 Mic92 deleted the go-refactoring branch November 22, 2018 10:05
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