nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.23k stars 65 forks source link

can't build exa #9

Closed bbigras closed 4 years ago

bbigras commented 5 years ago

not sure if related to #8

I tried to install 'exa' with home-manager. I get those error.

The weird thing is that if I run home-manager switch again I don't have any errors but I can't run the exa command. I get command not found.

Do I need the storage permission for this or is the permission only so I can access my phone's file from Nix?

first home-manager run:

GC Warning: Couldn't read /proc/stat
GC Warning: Couldn't read /proc/stat
these derivations will be built:
  /nix/store/06fi3aigs1wlbbbd3b4q6hfg7nly33ka-exa-0.8.0.drv
  /nix/store/pqchpgln0fakk3qpqavim71la1617qzc-home-manager-path.drv
  /nix/store/hz5c6218yf1k6px4zb3xa6g02j10gd4m-activation-script.drv
  /nix/store/2175bk5bi1bv4lpldc4h9d5a2bkny7sy-home-manager-generation.drv
these paths will be fetched (152.90 MiB download, 601.26 MiB unpacked):
  /nix/store/088br4d3rk7lhpxnpfrifkhsk1f1ahbn-pkg-config-0.29.2
  /nix/store/0amchd0rpnarzvgrcarpxad8kly85ic5-perl5.28.1-HTTP-Date-6.02
  /nix/store/0dyywz80hkkndj6bighqq392ppszy7sf-perl5.28.1-Encode-Locale-1.05
  /nix/store/133di3cs8b8gbcg1850rdiffafwjr3lx-python-2.7.16
  /nix/store/2gvf6yxkzkd0mi0yss69dl56vhawv9lh-llvm-7.0.1-lib
  /nix/store/2v9zmq2nqygqk1sh0a29420na6ws55qs-gdbm-1.18.1
  /nix/store/380glr4r5jyhb6pk6kmdvivpnrpx37yi-openssh-7.9p1
  /nix/store/3wrcg1zy6k70pvf4dma3xv5h1kgqjxb1-gcc-wrapper-7.4.0
  /nix/store/4gr9c2161slg0x5r3lwqmkajb2da25rb-expat-2.2.6
  /nix/store/50792v9mrzxja3cc4s3i7h2bcd0brb7z-perl5.28.1-Test-RequiresInternet-0.05
  /nix/store/53cms7ayg0hdm46g9g89dc5xzavvb8c6-git-2.19.2
  /nix/store/5d2pwfgk42p3knphm7rmcmqi79iazfyq-perl5.28.1-HTTP-Daemon-6.01
  /nix/store/5qj51mzplnxdfra88fxj7q0k5ki4r68a-binutils-2.31.1
  /nix/store/6dc1i53b00gqdp6mvav4f574admb38fl-linux-headers-4.19.16
  /nix/store/6l7v4g34mx6ycp1r3n46cgbimxf3m259-perl5.28.1-URI-1.74
  /nix/store/7a21rfc96j21bwnlfkjsz5zd8nc2xw9j-exa-0.8.0-vendor
  /nix/store/84q5kyffv30hbw80ywh05m4b18s0vhza-zlib-1.2.11-dev
  /nix/store/8ad1hjyd8464l74q2qn64sh6dzlzgkdq-rhash-1.3.8
  /nix/store/8k2szzqh9na9w64akfbyhxhw0nr4nw2z-perl5.28.1-libwww-perl-6.36
  /nix/store/8mkrm2kxv7zz02zza3xd33ldm6b0wiy7-perl5.28.1-HTML-Parser-3.72
  /nix/store/93c3l5pdxnmnrq8ryh0jaln7npp343ip-gcc-7.4.0
  /nix/store/9lqrs6ii8nzq58j62slwgmp6mmg9kyff-glibc-2.27-dev
  /nix/store/ab4nnspb6f8imn7wyxgrc3gy0i1cmdpc-expand-response-params
  /nix/store/b5j3wy8j2hvlhkh7zyy0fcxha9m5xkaq-stdenv-linux
  /nix/store/bqlj9j4pg202nafdjdy7chyrwf18myhr-libedit-20180525-3.1
  /nix/store/cy9k6b706yixdg6jwh4az9wr846dqnjk-perl5.28.1-Test-Needs-0.002005
  /nix/store/f8al0sbbbscxvq5xm6vqi2i086msbp4q-perl5.28.1-File-Listing-6.04
  /nix/store/fqwsi5mhrl6568c1rfx1jl8vxnvbvnvz-source
  /nix/store/fz4iksqmxv9dz096b7gbsbzw4sb47rf3-libgit2-0.26.6
  /nix/store/hyi769dbhf8p8sx70gnrpsamil6pb0qx-cmake-3.13.4
  /nix/store/iki0dvhrw9nvj1pmka9z0z4332r76ya4-readline-6.3p08
  /nix/store/jpajm1g87vmdbcslwf3n82phcq7xdhdq-gettext-0.19.8.1
  /nix/store/kfqsff3308ra0dbh3aig9xg9gv182spw-perl5.28.1-HTTP-Cookies-6.04
  /nix/store/kwgwvh7gr1xv56nfkjd3mpwcrx1vddky-libarchive-3.3.3-lib
  /nix/store/q9bm3i7zlxjmdv469spb6cma5cfih0ls-perl5.28.1-Test-Fatal-0.014
  /nix/store/qlgnvv94qba9c7zi3bif04z730k5pwgs-perl5.28.1-IO-HTML-1.001
  /nix/store/r047a4brgc5yh9wdh63kxp0hhsx1y5xl-http-parser-2.9.0
  /nix/store/r1f6kq7pj7qgi6hs7jqzdi784r0qjlz5-binutils-wrapper-2.31.1
  /nix/store/ryq0pzfqdpjbzx9vxqyavw76zssrac7i-rustc-1.32.0
  /nix/store/sfmn4jykwrf9fgsahrmy28ww0hgd3lv2-perl5.28.1-TermReadKey-2.37
  /nix/store/sl99nsf27mgfmigcnbh1nxkyvzjvmvg1-perl5.28.1-HTML-Tagset-3.20
  /nix/store/vj0mnryjvfcv8302wrdrxmda8da9kc46-libuv-1.26.0
  /nix/store/vyx4da3sk0jnybbks1717rklvv0zd659-perl5.28.1-Try-Tiny-0.30
  /nix/store/w56xmk58q44czl33jn9gl5f310ff1akc-perl5.28.1-WWW-RobotRules-6.02
  /nix/store/x90hsr3ww113rz0658w6ay3rvlgmp5y3-perl5.28.1-Net-HTTP-6.18
  /nix/store/xk02njxh2v1hvqpvwp3i91yrk5q06wfw-perl5.28.1-HTTP-Message-6.18
  /nix/store/ynxlmwlhczm5y4i2qwxjj3xw00nfxdiy-perl5.28.1-HTTP-Negotiate-6.01
  /nix/store/zc9zvgjig6mnccwbavx8kyrb5yzg7ns3-cargo-1.32.0
  /nix/store/zg2w3viqsc8cxpfwjaqif8jqfn6gcjn3-perl5.28.1-LWP-MediaTypes-6.02
copying path '/nix/store/7a21rfc96j21bwnlfkjsz5zd8nc2xw9j-exa-0.8.0-vendor' from 'https://cache.nixos.org'...
copying path '/nix/store/5qj51mzplnxdfra88fxj7q0k5ki4r68a-binutils-2.31.1' from 'https://cache.nixos.org'...
copying path '/nix/store/ab4nnspb6f8imn7wyxgrc3gy0i1cmdpc-expand-response-params' from 'https://cache.nixos.org'...
copying path '/nix/store/4gr9c2161slg0x5r3lwqmkajb2da25rb-expat-2.2.6' from 'https://cache.nixos.org'...
copying path '/nix/store/2v9zmq2nqygqk1sh0a29420na6ws55qs-gdbm-1.18.1' from 'https://cache.nixos.org'...
copying path '/nix/store/jpajm1g87vmdbcslwf3n82phcq7xdhdq-gettext-0.19.8.1' from 'https://cache.nixos.org'...
copying path '/nix/store/r047a4brgc5yh9wdh63kxp0hhsx1y5xl-http-parser-2.9.0' from 'https://cache.nixos.org'...
copying path '/nix/store/kwgwvh7gr1xv56nfkjd3mpwcrx1vddky-libarchive-3.3.3-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/bqlj9j4pg202nafdjdy7chyrwf18myhr-libedit-20180525-3.1' from 'https://cache.nixos.org'...
copying path '/nix/store/fz4iksqmxv9dz096b7gbsbzw4sb47rf3-libgit2-0.26.6' from 'https://cache.nixos.org'...
copying path '/nix/store/vj0mnryjvfcv8302wrdrxmda8da9kc46-libuv-1.26.0' from 'https://cache.nixos.org'...
copying path '/nix/store/6dc1i53b00gqdp6mvav4f574admb38fl-linux-headers-4.19.16' from 'https://cache.nixos.org'...
copying path '/nix/store/2gvf6yxkzkd0mi0yss69dl56vhawv9lh-llvm-7.0.1-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/9lqrs6ii8nzq58j62slwgmp6mmg9kyff-glibc-2.27-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/380glr4r5jyhb6pk6kmdvivpnrpx37yi-openssh-7.9p1' from 'https://cache.nixos.org'...
copying path '/nix/store/r1f6kq7pj7qgi6hs7jqzdi784r0qjlz5-binutils-wrapper-2.31.1' from 'https://cache.nixos.org'...
copying path '/nix/store/93c3l5pdxnmnrq8ryh0jaln7npp343ip-gcc-7.4.0' from 'https://cache.nixos.org'...
copying path '/nix/store/0dyywz80hkkndj6bighqq392ppszy7sf-perl5.28.1-Encode-Locale-1.05' from 'https://cache.nixos.org'...
copying path '/nix/store/3wrcg1zy6k70pvf4dma3xv5h1kgqjxb1-gcc-wrapper-7.4.0' from 'https://cache.nixos.org'...
copying path '/nix/store/sl99nsf27mgfmigcnbh1nxkyvzjvmvg1-perl5.28.1-HTML-Tagset-3.20' from 'https://cache.nixos.org'...
copying path '/nix/store/0amchd0rpnarzvgrcarpxad8kly85ic5-perl5.28.1-HTTP-Date-6.02' from 'https://cache.nixos.org'...
copying path '/nix/store/8mkrm2kxv7zz02zza3xd33ldm6b0wiy7-perl5.28.1-HTML-Parser-3.72' from 'https://cache.nixos.org'...
copying path '/nix/store/f8al0sbbbscxvq5xm6vqi2i086msbp4q-perl5.28.1-File-Listing-6.04' from 'https://cache.nixos.org'...
copying path '/nix/store/qlgnvv94qba9c7zi3bif04z730k5pwgs-perl5.28.1-IO-HTML-1.001' from 'https://cache.nixos.org'...
copying path '/nix/store/zg2w3viqsc8cxpfwjaqif8jqfn6gcjn3-perl5.28.1-LWP-MediaTypes-6.02' from 'https://cache.nixos.org'...
copying path '/nix/store/sfmn4jykwrf9fgsahrmy28ww0hgd3lv2-perl5.28.1-TermReadKey-2.37' from 'https://cache.nixos.org'...
copying path '/nix/store/cy9k6b706yixdg6jwh4az9wr846dqnjk-perl5.28.1-Test-Needs-0.002005' from 'https://cache.nixos.org'...
copying path '/nix/store/50792v9mrzxja3cc4s3i7h2bcd0brb7z-perl5.28.1-Test-RequiresInternet-0.05' from 'https://cache.nixos.org'...
copying path '/nix/store/vyx4da3sk0jnybbks1717rklvv0zd659-perl5.28.1-Try-Tiny-0.30' from 'https://cache.nixos.org'...
copying path '/nix/store/6l7v4g34mx6ycp1r3n46cgbimxf3m259-perl5.28.1-URI-1.74' from 'https://cache.nixos.org'...
copying path '/nix/store/q9bm3i7zlxjmdv469spb6cma5cfih0ls-perl5.28.1-Test-Fatal-0.014' from 'https://cache.nixos.org'...
copying path '/nix/store/xk02njxh2v1hvqpvwp3i91yrk5q06wfw-perl5.28.1-HTTP-Message-6.18' from 'https://cache.nixos.org'...
copying path '/nix/store/x90hsr3ww113rz0658w6ay3rvlgmp5y3-perl5.28.1-Net-HTTP-6.18' from 'https://cache.nixos.org'...
copying path '/nix/store/kfqsff3308ra0dbh3aig9xg9gv182spw-perl5.28.1-HTTP-Cookies-6.04' from 'https://cache.nixos.org'...
copying path '/nix/store/5d2pwfgk42p3knphm7rmcmqi79iazfyq-perl5.28.1-HTTP-Daemon-6.01' from 'https://cache.nixos.org'...
copying path '/nix/store/ynxlmwlhczm5y4i2qwxjj3xw00nfxdiy-perl5.28.1-HTTP-Negotiate-6.01' from 'https://cache.nixos.org'...
copying path '/nix/store/w56xmk58q44czl33jn9gl5f310ff1akc-perl5.28.1-WWW-RobotRules-6.02' from 'https://cache.nixos.org'...
copying path '/nix/store/088br4d3rk7lhpxnpfrifkhsk1f1ahbn-pkg-config-0.29.2' from 'https://cache.nixos.org'...
copying path '/nix/store/8k2szzqh9na9w64akfbyhxhw0nr4nw2z-perl5.28.1-libwww-perl-6.36' from 'https://cache.nixos.org'...
copying path '/nix/store/iki0dvhrw9nvj1pmka9z0z4332r76ya4-readline-6.3p08' from 'https://cache.nixos.org'...
copying path '/nix/store/8ad1hjyd8464l74q2qn64sh6dzlzgkdq-rhash-1.3.8' from 'https://cache.nixos.org'...
copying path '/nix/store/133di3cs8b8gbcg1850rdiffafwjr3lx-python-2.7.16' from 'https://cache.nixos.org'...
copying path '/nix/store/hyi769dbhf8p8sx70gnrpsamil6pb0qx-cmake-3.13.4' from 'https://cache.nixos.org'...
copying path '/nix/store/53cms7ayg0hdm46g9g89dc5xzavvb8c6-git-2.19.2' from 'https://cache.nixos.org'...
copying path '/nix/store/ryq0pzfqdpjbzx9vxqyavw76zssrac7i-rustc-1.32.0' from 'https://cache.nixos.org'...
copying path '/nix/store/fqwsi5mhrl6568c1rfx1jl8vxnvbvnvz-source' from 'https://cache.nixos.org'...
copying path '/nix/store/zc9zvgjig6mnccwbavx8kyrb5yzg7ns3-cargo-1.32.0' from 'https://cache.nixos.org'...
copying path '/nix/store/b5j3wy8j2hvlhkh7zyy0fcxha9m5xkaq-stdenv-linux' from 'https://cache.nixos.org'...
copying path '/nix/store/84q5kyffv30hbw80ywh05m4b18s0vhza-zlib-1.2.11-dev' from 'https://cache.nixos.org'...
GC Warning: Couldn't read /proc/stat
building '/nix/store/06fi3aigs1wlbbbd3b4q6hfg7nly33ka-exa-0.8.0.drv'...
unpacking sources
unpacking source archive /nix/store/fqwsi5mhrl6568c1rfx1jl8vxnvbvnvz-source
source root is source
unpacking source archive /nix/store/7a21rfc96j21bwnlfkjsz5zd8nc2xw9j-exa-0.8.0-vendor
patching sources
updateAutotoolsGnuConfigScriptsPhase
configuring
building
Running cargo build --release 
   Compiling winapi-build v0.1.1
   Compiling libc v0.2.30
   Compiling num-traits v0.1.40
   Compiling rustc-serialize v0.3.24
   Compiling pkg-config v0.3.9
   Compiling gcc v0.3.53
   Compiling winapi v0.2.8
   Compiling matches v0.1.6
   Compiling unicode-normalization v0.1.5
   Compiling nom v1.2.4
   Compiling unicode-width v0.1.4
   Compiling percent-encoding v1.0.0
   Compiling utf8-ranges v0.1.3
   Compiling regex-syntax v0.3.9
   Compiling byteorder v0.4.2
   Compiling log v0.3.8
   Compiling bitflags v0.9.1
   Compiling getopts v0.2.14
   Compiling ansi_term v0.8.0
   Compiling lazy_static v0.2.8
   Compiling glob v0.2.11
   Compiling natord v1.0.9
   Compiling scoped_threadpool v0.1.7
   Compiling unicode-bidi v0.3.4
   Compiling kernel32-sys v0.2.2
   Compiling rand v0.3.16
   Compiling memchr v0.1.11
   Compiling locale v0.2.2
   Compiling users v0.5.3
   Compiling term_size v0.3.0
   Compiling num_cpus v1.6.2
   Compiling pad v0.1.4
   Compiling term_grid v0.1.6
   Compiling num-integer v0.1.35
   Compiling number_prefix v0.2.7
   Compiling iso8601 v0.1.1
   Compiling cmake v0.1.25
   Compiling libz-sys v1.0.16
   Compiling aho-corasick v0.5.3
   Compiling idna v0.1.4
   Compiling num-complex v0.1.40
   Compiling num-bigint v0.1.40
   Compiling num-iter v0.1.34
   Compiling thread-id v2.0.0
   Compiling thread_local v0.2.7
   Compiling regex v0.1.80
   Compiling libgit2-sys v0.6.14
   Compiling url v1.5.1
   Compiling num-rational v0.1.39
   Compiling num v0.1.40
   Compiling datetime v0.4.5
   Compiling zoneinfo_compiled v0.4.5
   Compiling env_logger v0.3.5
   Compiling git2 v0.6.8
   Compiling exa v0.8.0 (/tmp/nix-build-exa-0.8.0.drv-0/source)
warning: use of deprecated item 'std::ascii::AsciiExt': use inherent methods instead
  --> src/fs/file.rs:98:13
   |
98 |         use std::ascii::AsciiExt;
   |             ^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(deprecated)] on by default

warning: unused import: `std::ascii::AsciiExt`
  --> src/fs/file.rs:98:13
   |
98 |         use std::ascii::AsciiExt;
   |             ^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_imports)] on by default

    Finished release [optimized] target(s) in 3m 50s
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/k7j593q28g0w01xa0g5jnxm2fmm9877x-exa-0.8.0
gzipping man pages under /nix/store/k7j593q28g0w01xa0g5jnxm2fmm9877x-exa-0.8.0/share/man/
strip is /nix/store/5qj51mzplnxdfra88fxj7q0k5ki4r68a-binutils-2.31.1/bin/strip
patching script interpreter paths in /nix/store/k7j593q28g0w01xa0g5jnxm2fmm9877x-exa-0.8.0
checking for references to /data/data/com.termux.nix/files/usr/tmp/nix-build-exa-0.8.0.drv-0/ in /nix/store/k7j593q28g0w01xa0g5jnxm2fmm9877x-exa-0.8.0...
error (ignored): getting status of '/data/data/com.termux.nix/files/usr/tmp/nix-build-exa-0.8.0.drv-0/source/target/release/deps/exa-f09ef4abfab971d3': Operation not permitted
error: getting status of '/data/data/com.termux.nix/files/usr/tmp/nix-build-exa-0.8.0.drv-0/source/target/release/deps/exa-f09ef4abfab971d3': Operation not permitted

There are 76 unread and relevant news items.
Read them by running the command 'home-manager news'.

second home-manager run:

GC Warning: Couldn't read /proc/stat
GC Warning: Couldn't read /proc/stat
these derivations will be built:
  /nix/store/pqchpgln0fakk3qpqavim71la1617qzc-home-manager-path.drv
  /nix/store/hz5c6218yf1k6px4zb3xa6g02j10gd4m-activation-script.drv
  /nix/store/2175bk5bi1bv4lpldc4h9d5a2bkny7sy-home-manager-generation.drv
building '/nix/store/pqchpgln0fakk3qpqavim71la1617qzc-home-manager-path.drv'...
created 340 symlinks in user environment
building '/nix/store/hz5c6218yf1k6px4zb3xa6g02j10gd4m-activation-script.drv'...
building '/nix/store/2175bk5bi1bv4lpldc4h9d5a2bkny7sy-home-manager-generation.drv'...
/nix/store/4swy9x7p4fwagfv4hw4xfx6f7pi87sf8-home-manager-generation
Starting home manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
GC Warning: Couldn't read /proc/stat
replacing old 'home-manager-path'
installing 'home-manager-path'
building '/nix/store/04s3847cxrwm4i1yy2j973r0nl3121l5-user-environment.drv'...
created 6 symlinks in user environment
Activating linkGeneration
Cleaning up orphan links from /data/data/com.termux.nix/files/home
Creating profile generation 3
Creating home file links in /data/data/com.termux.nix/files/home
Activating onFilesChange
Activating reloadSystemD
User systemd daemon not running. Skipping reload.
Activating xdgCreateCache

There are 76 unread and relevant news items.
Read them by running the command 'home-manager news'.
t184256 commented 5 years ago

Yeah, seems like a simpler reproducer to #8, many thanks for reporting. Seems to be related to --link-to-symlink. Possible fix found, stay tuned...

t184256 commented 5 years ago

OK, sorry, I give up for now.

I've fixed an issue with hardlink emulation in d76c378 and reuploaded the bootstrap archive to nix-on-droid.unboiled.info, but there seems more to it.

For some twisted reason, aarch64 builds of Rust applications end up with no binaries in the output, on both 19.03 and trunk. This seems to be the case for all Rust apps, and I'm not sure that works on real aarch64 boxes, as aarch64 builds of Rust apps have been disabled on Hydra, so I have a strong suspicion that Rust support on aarch64 is just broken in general.

The weird thing is that it worked for me, but just once. I even started writing a reply that everything is cool now, but decided to re-test it in a clean installation, and I cannot replicate the success ever since.

bbigras commented 4 years ago

I have a strong suspicion that Rust support on aarch64 is just broken in general.

Termux seems able to build Rust apps on aarch64:

image

t184256 commented 4 years ago

Sure. I meant that Nix in general could have problems with that.

Nix-on-Droid particularly builds exa just fine, and then, for the reason I cannot adequately debug into, just does not put the resulting binary into the output. The same problem is exhibited with some other Rust packages.

Another question that I don't have a satisfactory answer to, is why does it attempt building it on its own in the first place. The absence of a suitable build in the Hydra cache prompted me to ask whether there is a problem with building Rust packages for aarch64 in general. I've tried to solve that by asking for access to a 'proper' aarch64 nix box (community builder), but this process has been stalled due to 'and who are you, huh'? I'm aiming to get it unstuck during the following NixCon by contacting the right people directly.

The other possibility is that the build system does some twisted magic at the end of the build that confuses proot and it's a bug in proot.

So, I did not forget about the issue, but I haven't progressed much too.

t184256 commented 4 years ago

I've dutifully re-verified the presence of this bug after big changes, and after today's updates I'm happy to note that nix run nixpkgs.exa on a clean install just downloads and installs a perfectly working precompiled exa.

I'm not sure if it correctly builds on device though, but it's a turn for the better anyway.

bbigras commented 4 years ago

Nice. I just tested and I'm able to use Rust apps.

bbigras commented 4 years ago

Maybe we can close this and reopen if it still causes me problem in the future.