BinaryBuilder.jl icon indicating copy to clipboard operation
BinaryBuilder.jl copied to clipboard

Binary builder fails on Termux (aarch64-unknown-linux-android)

Open freemin7 opened this issue 5 years ago • 3 comments

Termux is a slim Linux user space for Android. You can install Julia there in the following way:

  • Install Termux (free in F-Droid store)
  • run pkg update, pkg upgrade, pkg install tar gnupg wget
  • wget https://its-pointless.github.io/setup-pointless-repo.sh and run the script
  • pkg install julia

Any binary dependency fails:

Pkg.build("MbedTLS")                                   Building MbedTLS → `~/.julia/packages/MbedTLS/X4xar/deps/build.log`
┌ Error: Error building `MbedTLS`:
│ ┌ Warning: Platform `aarch64-unknown-linux-android` is not an officially supported platform
│ └ @ BinaryProvider ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:450
│ ERROR: LoadError: LoadError: KeyError: key "unknown" not found
│ in expression starting at /data/data/com.termux/files/home/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:685                                                          │ in expression starting at /data/data/com.termux/files/home/.julia/packages/BinaryProvider/U2dKK/src/BinaryProvider.jl:12
│ ERROR: LoadError: Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to /data/data/com.termux/files/home/.julia/compiled/v1.1/BinaryProvider/ek6VZ.ji.
│ in expression starting at /data/data/com.termux/files/home/.julia/packages/MbedTLS/X4xar/deps/build.jl:1              └ @ Pkg.Operations ~/julia/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075
Building FFMPEG ─→ `~/.julia/packages/FFMPEG/guN1x/deps/build.log`                                                    ┌ Error: Error building `FFMPEG`:
│ ┌ Warning: Platform `aarch64-unknown-linux-android` is not an officially supported platform
│ └ @ BinaryProvider ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:450
│ ERROR: LoadError: LoadError: KeyError: key "unknown" not found
│ in expression starting at /data/data/com.termux/files/home/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:685                                                          │ in expression starting at /data/data/com.termux/files/home/.julia/packages/BinaryProvider/U2dKK/src/BinaryProvider.jl:12
│ ERROR: LoadError: Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to /data/data/com.termux/files/home/.julia/compiled/v1.1/BinaryProvider/ek6VZ.ji.    │ in expression starting at /data/data/com.termux/files/home/.julia/packages/FFMPEG/guN1x/deps/build.jl:1               └ @ Pkg.Operations ~/julia/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

freemin7 avatar Jul 17 '20 23:07 freemin7

First off, we don't officially support Android, so you're going to be hitting codepaths that possibly noone else has ever hit. Fun!

You're running a very old version of Julia (v1.1). Is it possible to get a newer version? Have you tried downloading the official Linux aarch64 binaries and seeing if they run?

staticfloat avatar Jul 17 '20 23:07 staticfloat

I raised an issue with the package directory about Julia being out of date. https://github.com/its-pointless/gcc_termux/issues/93 I've tried to run the binary and was not successful. However i have not exhausted my means and will try things again tomorrow.

freemin7 avatar Jul 17 '20 23:07 freemin7

I'm curious what it says; I'm betting the libc is just completely wrong, and the loader is missing.

staticfloat avatar Jul 18 '20 08:07 staticfloat