android-nixpkgs icon indicating copy to clipboard operation
android-nixpkgs copied to clipboard

Executables not runnable

Open RatCornu opened this issue 8 months ago • 3 comments

I tried to use some build tools, but I always get the same error: Could not start dynamically linked executable. It happened while I'm trying to build an Android app. The issue is not the same if running by hand or during a build env:

  • By hand:
    $ /nix/store/psrz7yh75aiblnwwjan08mi54mp2apf1-android-sdk-env/share/android-sdk/build-tools/34.0.0/zipalign 
    Could not start dynamically linked executable: /nix/store/psrz7yh75aiblnwwjan08mi54mp2apf1-android-sdk-env/share/android-sdk/build-tools/34.0.0/zipalign
    NixOS cannot run dynamically linked executables intended for generic
    linux environments out of the box. For more information, see:
    https://nix.dev/permalink/stub-ld
    
  • In a build env:
    > /nix/store/xfhkjnpqjwlf6hlk1ysmq3aaq80f3bjj-stdenv-linux/setup: line 123: /nix/store/w5fm31fb3lj7k8c518n7a36dh1kk667d-build-tools-34-0-0-34/zipalign: cannot execute: required file not found
    > /nix/store/xfhkjnpqjwlf6hlk1ysmq3aaq80f3bjj-stdenv-linux/setup: line 131: pop_var_context: head of shell_variables not a function context
    

The issue is the same with the following commands: aapt, aapt2, aidl, bcc_compat, d8, dexdump, lld, llvm-rs-cc, splitèselect and zipalign.

Seems related to #99 but I am not sure.

RatCornu avatar Jun 15 '24 12:06 RatCornu