NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.35k stars 13.58k forks source link

Build failure: pkgsCross.aarch64-android.gettext #269172

Open axelkar opened 9 months ago

axelkar commented 9 months ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. Import nixpkgs with crossSystem = lib.systems.examples.aarch64-android-prebuilt;
  2. Use gettext or any package which depends on it, like gcc, binutils or binutils-unwrapped.

In short: nix build github:axelkar/min-gettext-bug-producer

Build log

https://gist.github.com/axelkar/49e60e508ef5dc8115091080575a350b

important:

./dcigettext.c:147:7: error: redeclaration of 'getcwd' must have the 'overloadable' attribute
char *getcwd ();
      ^
/nix/store/yjig1z72cqigrxlykkvm7i3235d7y3ag-aarch64-unknown-linux-android-ndk-toolchain-24.0.8215888/bin/../sysroot/usr/include/bits/fortify/unistd.h:105:7: note: previous overload of function is here
char* getcwd(char* const __pass_object_size buf, size_t size)
      ^
1 error generated.
make[5]: *** [Makefile:2144: dcigettext.lo] Error 1

Additional context

Add any other context about the problem here.

Notify maintainers

@zimbatm @vrthra

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.5.4, NixOS, 23.11 (Tapir), 23.11.20230919.5ba549e`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.0`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/store/cz973qsjldbw4x7fx0rwcvhr9k645vz2-source`

Priorities

Add a :+1: reaction to issues you find important.

btw, is there a prebuilt gcc with host = x86_64-linux and target = aarch64-android-prebuilt in the NixOS Hydra or somewhere else?

zimbatm commented 9 months ago

I'm not the right person to ask about cross issues. Maybe @amjoseph-nixpkgs or @samueldr ?

Atemu commented 9 months ago

Note that you're cross-compiling to an exotic Tier 4 platfrom here. It is not generally supported. Do not ping general package maintainers about its issues.

axelkar commented 9 months ago

Note that you're cross-compiling to an exotic Tier 4 platfrom here. It is not generally supported. Do not ping general package maintainers about its issues.

Sorry! I had no idea! Thanks for telling me.

ghost commented 9 months ago

Yeah, I mean, aarch64-android is like quadruply-exotic-extraterrestrial voodoo for nixpkgs.

I'm afraid I can't really help with this. I've never done any android stuff with nixpkgs at all.