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
Even more android fixes #42412
Even more android fixes #42412
Conversation
Success on aarch64-linux (full log) Attempted: libiconv Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: libiconv Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: libiconv Partial log (click to expand)
|
4dd5a98
to
92e8d15
Compare
Success on x86_64-darwin (full log) Attempted: libiconv Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libiconv Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: libiconv Partial log (click to expand)
|
92e8d15
to
2399442
Compare
Success on aarch64-linux (full log) Attempted: libiconv Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: libiconv Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: libiconv Partial log (click to expand)
|
23e7aeb
to
2d0b156
Compare
Success on x86_64-linux (full log) Attempted: libiconv Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: libiconv Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: libiconv Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libiconv Partial log (click to expand)
|
@@ -84,6 +84,7 @@ rec { | |||
$out/bin/${targetPlatform.config}-g++ \ | |||
-e '130i extraBefore+=(-Wl,--fix-cortex-a8)' \ | |||
-e 's|^(extraBefore=)\(\)$|\1(${builtins.toString flags})|' | |||
echo "-no-pie" >> $out/nix-support/cc-cflags |
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.
/cc @Ericson2314 Is this okay to do globally?
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 sounds good. I'd maybe put it in the extraBefore
thing above, but fine either way.
{ stdenv, appleDerivation, autoreconfHook, targetPlatform, enableStatic ? targetPlatform.isiOS }: | ||
{ stdenv, appleDerivation, lib, autoreconfHook, targetPlatform | ||
, enableStatic ? targetPlatform.isiOS | ||
, enableShared ? !targetPlatform.isiOS }: |
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.
can the }:
be on its own line?
sed -i 's/darwin\*/ios\*/g' configure libcharset/configure | ||
''; | ||
|
||
configureFlags = stdenv.lib.optionals enableStatic [ "--enable-static" "--disable-shared" ]; | ||
configureFlags = lib.optional enableStatic "--enable-static" |
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.
let's use https://github.com/NixOS/nixpkgs/blob/master/lib/strings.nix#L415 on staging after. Sound good?
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.
Sounds good
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.
(And same for normal libiconv
)
2d0b156
to
ff0c98d
Compare
Waiting on: https://hydra.reflex-frp.org/build/685 |
Success on x86_64-linux (full log) Attempted: libiconv Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: libiconv Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: ghc, libiconv Partial log (click to expand)
|
@@ -83,5 +83,6 @@ import ./. (builtins.removeAttrs args [ "system" "platform" ] // { | |||
inherit config overlays crossSystem; | |||
# Fallback: Assume we are building packages on the current (build, in GNU | |||
# Autotools parlance) system. | |||
localSystem = { system = builtins.currentSystem; } // localSystem; | |||
localSystem = (if args ? localSystem then {} | |||
else { system = builtins.currentSystem; }) // localSystem; |
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.
Ah, nice catch.
0a086ba
to
8425cc7
Compare
Success on x86_64-linux (full log) Attempted: ghc, libiconv Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libiconv The following builds were skipped because they don't evaluate on aarch64-linux: ghc Partial log (click to expand)
|
8425cc7
to
6188a0c
Compare
Success on x86_64-linux (full log) Attempted: ghc, libiconv Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: ghc, libiconv Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libiconv The following builds were skipped because they don't evaluate on aarch64-linux: ghc Partial log (click to expand)
|
6188a0c
to
3e75f5e
Compare
Success on x86_64-linux (full log) Attempted: ghc, libiconv Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libiconv The following builds were skipped because they don't evaluate on aarch64-linux: ghc Partial log (click to expand)
|
3e75f5e
to
e0e2af0
Compare
Success on aarch64-linux (full log) Attempted: libiconv The following builds were skipped because they don't evaluate on aarch64-linux: ghc Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: ghc, libiconv Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: ghc, libiconv Partial log (click to expand)
|
When false, shared libraries will be disabled. also adds patch to *really* disable shared libiconv.
the gcc in android does not have this on by default. Doing this will fix some of the errors in cross-trunk: https://hydra.nixos.org/build/76354538/nixlog/11 This is related to how separate debug info is handled in Nixpkgs.
Setting this to true will disable removing some of the unused parts of the NDK toolchain that is unused in Nixpkgs but may be used by others. /cc @bkchr
We run into issues otherwise
This is needed for targeting older apis.
If we passed a localSystem in, we don’t want the current system to override it. Now we check for localSystem first to avoid getting "mixed" localSystem values from commands like this: nix-build --arg localSystem '{config="x86_64-unknown-linux-musl";}' -A hello Which would eventually evaluate localSystem to this: { config = "x86_64-unknown-linux-musl"; system = "x86_64-darwin"; } & Nix would not be able to run it correctly. Fixes NixOS#41599 /cc @Ericson2314
This breaks some library symbols apparently. ARM symbols must be incorrectly stripped. Also some very weird issues with patchelf.
e0e2af0
to
69cad91
Compare
Success on x86_64-darwin (full log) Attempted: ghc, libiconv Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libiconv The following builds were skipped because they don't evaluate on aarch64-linux: ghc Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: ghc, libiconv Partial log (click to expand)
|
Thanks! he "impure.nix: fix handling of localSystem" explains why it was such a pain for me to pass that argument. |
Motivation for this change
This is a collection of tweaks for handling android. dc261f6896106deab2efd6329479d536d3e9c255 is the commit that solves my original problem & definitely should be merged if possible as it isn't a mass rebuild.
On the other hand, 62024d280eb7ecd1f49d80406193a65901317bcb, may not be that useful but it seems like a safe thing to just disable stripping & patchelf in cross drvs. Interested in feedback on whether this is a good idea.
It doesn't seem like 25e54c53a25f673f2ada852ae143f17dd1280842 should be needed but it fixed a non-fatal warning I was getting & might give us trouble if we don't properly set up the rpath.