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
Fix androidndk "ensure unaffected test" #44308
Fix androidndk "ensure unaffected test" #44308
Conversation
@@ -52,7 +53,7 @@ stdenv.mkDerivation rec { | |||
outputs = [ "bin" "dev" "out" ]; # small man pages in $bin | |||
|
|||
nativeBuildInputs = | |||
[ gtk-doc pkgconfig autoreconfHook intltool gobjectIntrospection ] | |||
[ gtk-doc pkgconfig autoreconfHook intltool buildPackages.gobjectIntrospection ] |
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.
Huh?
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.
Yeah that wasn't needed after all.
98ded0f
to
ea58ae3
Compare
|
||
src = fetchurl { | ||
url = "mirror://savannah/lzip/${name}.tar.gz"; | ||
sha256 = "0319q59kb8g324wnj7xzbr7vvlx5bcs13lr34j0zb3kqlyjq2fy9"; | ||
}; | ||
|
||
configureFlags = "CPPFLAGS=-DNDEBUG CFLAGS=-O3 CXXFLAGS=-O3" + stdenv.lib.optionalString stdenv.isCross " CXX=${stdenv.cc.targetPrefix}c++"; | ||
configureFlags = "CPPFLAGS=-DNDEBUG CFLAGS=-O3 CXXFLAGS=-O3" | ||
+ stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) " CXX=${stdenv.cc.targetPrefix}c++"; |
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.
Is explicit CXX
actually needed here?
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.
Looks like it. I think it makes sense to make it unconditional though.
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.
If you make it unconditional, there's a risk that someone notices it native-compiles fine and removes it completely. So I would keep it conditional.
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.
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.
No, that's not something to be expected from a standard native-compiling environment.
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" | ||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}" | ||
"-DTARGET_TRIPLE=${stdenv.targetPlatform.config}" | ||
"-DLLVM_HOST_TRIPLE=${stdenv.buildPlatform.config}" |
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.
This is very awkward but what I had to do to get equal hashes for these commmands:
$ nix-instantiate -A buildPackages.buildPackages.androidndk --arg crossSystem '{config = "mips64el-apple-windows-gnu"; libc = "glibc"; }'
$ nix-instantiate -A buildPackages.androidndk --arg crossSystem '{config = "mips64el-apple-windows-gnu"; libc = "glibc"; }'
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.
llvm is being pulled in through jdk & mesa-noglu.
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.
Wait no they should all be host. llvm
uses the terminology correctly here. We'd just make the last one host not target for sake of the "ensure unaffected" test.
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.
How do you do that? I definitely don't want ensure unaffected to break LLVM cross.
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.
LLVM_DEFAULT_TARGET_TRIPLE
is just the default. It would be the host forensureUnaffected
's sake.LLVM_TARGETS_TO_BUILD
we keep unset to build them allTARGET_TRIPLE
I don't even know whether it exists, or why we used it. @dtzWill can we remove it? `
@@ -22,6 +23,5 @@ stdenv.mkDerivation rec { | |||
homepage = http://www.nongnu.org/lzip/lzip.html; | |||
description = "A lossless data compressor based on the LZMA algorithm"; | |||
license = stdenv.lib.licenses.gpl3Plus; | |||
platforms = stdenv.lib.platforms.unix; |
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.
platforms.all
, otherwise Hydra stops building it.
ea58ae3
to
761d5ce
Compare
Failure on x86_64-darwin (full log) Attempted: libgcrypt, libtasn1, llvm, lzip The following builds were skipped because they don't evaluate on x86_64-darwin: libapparmor Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libapparmor, libgcrypt, libtasn1, llvm, lzip Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: libgcrypt, libtasn1, llvm, lzip, polkit The following builds were skipped because they don't evaluate on x86_64-darwin: libapparmor Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libapparmor, libgcrypt, libtasn1, llvm, lzip, polkit Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: libgcrypt, libtasn1, llvm, lzip The following builds were skipped because they don't evaluate on x86_64-darwin: libapparmor Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: libapparmor, libgcrypt, libtasn1, llvm, lzip, polkit Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: libapparmor, libgcrypt, libtasn1, llvm, lzip Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libapparmor, libgcrypt, libtasn1, llvm, lzip Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: libapparmor, libgcrypt, libtasn1, llvm, lzip Partial log (click to expand)
|
761d5ce
to
de2dfff
Compare
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.
Looks good! Note I think enough of this to get the tests passing can go direct to master. (If TARGET_TRIPLE
really is not a thing, then it shouldn't hurt to temporarily keep it defined as hostPlatform.config
.)
Rebased to avoid conflicting with #44367. |
Failure on x86_64-linux (full log) Attempted: libtasn1, llvm, lzip Partial log (click to expand)
|
llvm is a library so it should just need to know about build & host. GCC will already have a cross compiler built. /cc @Ericson2314 @dtzWill
de2dfff
to
1461b90
Compare
Success on aarch64-linux (full log) Attempted: libtasn1, llvm, lzip Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: llvm Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: llvm Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: llvm Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: libtasn1, llvm, lzip Partial log (click to expand)
|
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)