Conversation
|
|
|
It works! |
|
buildGoPackage still needs a fix to not put all binaries into a subdirectory: |
|
The cross-compiled go compiler suffers from the same problem: @Ericson2314 I am pretty sure there is an easy fix to distinguish between a go compiler |
|
Success on aarch64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
|
There was a problem hiding this comment.
I wonder if we should remove the prefix already in the buildPhase in case someone breaks it by overriding installPhase?
|
Success on x86_64-darwin (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Success on x86_64-darwin (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Also support C bindings like a charm! |
|
@GrahamcOfBorg build pkgsCross.aarch64-multiplatform.direnv |
|
Unexpected error: command failed with exit code 1 on x86_64-linux (full log) Attempted: pkgsCross.aarch64-multiplatform.direnv Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: pkgsCross.aarch64-multiplatform.direnv Partial log (click to expand)
|
|
Failure on aarch64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
@GrahamcOfBorg build direnv |
|
@GrahamcOfBorg build pkgsCross.aarch64-multiplatform.direnv |
|
Success on aarch64-linux (full log) Attempted: direnv Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: pkgsCross.aarch64-multiplatform.direnv Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: pkgsCross.aarch64-multiplatform.direnv Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: direnv Partial log (click to expand)
|
There was a problem hiding this comment.
@dtzWill is cross compilation for pkgsCross.musl64 something we aim for?
The go compiler would break in this case because ${GOHOSTOS}_${GOHOSTARCH} is equal to
${GOOS}_${GOARCH}, which means it would delete the go binaries in that case.
There was a problem hiding this comment.
You could probably make make the condition GOOS != GOHOSTOS etc. since go doesn’t use a libc it’s kind of irrelevant here… but it should still work in the sense that you have a working compiler.
There was a problem hiding this comment.
It does link against glibc for things like gethostbyname via nss modules.
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: direnv Partial log (click to expand)
|
|
Failure on x86_64-darwin (full log) Attempted: pkgsCross.aarch64-multiplatform.direnv Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: go_1_11 Partial log (click to expand)
|
|
|
||
| # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those | ||
| # to be different from CC/CXX | ||
| CC_FOR_TARGET = if (stdenv.hostPlatform != stdenv.targetPlatform) then |
There was a problem hiding this comment.
That comment was pending and I forgot to submit it.
There was a problem hiding this comment.
Putting my thing another way, you can do either way (manual var or depsBuildBuild) the same way for !(build == host == target)
Motivation for this change
Mentally prepare myself to cross-compile rust.
Things that work:
Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)