Help: `make install` fails on Termux

I'm trying to compile Racket 8.4(cs) on my Android phone with Termux, because the version provided in their repo is too old (7.4 bc).

I used ./configure --prefix=$PREFIX and it seems good, make also succeeded with no errors.
Everything went well until I reached make install part, where it fails:

make[4]: Entering directory '/data/data/com.termux/files/home/downloads/racket-8.4/src/cs/c'
/data/data/com.termux/files/usr/bin/racket -Z ../../../../../build/config -X "/data/data/com.termux/files/usr/share/racket/collects" -G "/data/data/com.termux/files/usr/etc/racket"  -Z ../../../../../build/config  -N "raco" -l- setup --no-user
ffi-lib: could not load foreign library
  path: [all opened]
  system error: unknown error
  context...:
   /data/data/com.termux/files/usr/share/racket/collects/ffi/unsafe.rkt:249:2: get-ffi-obj*
   body of "/data/data/com.termux/files/usr/share/racket/collects/net/win32-ssl.rkt"
   body of "/data/data/com.termux/files/usr/share/racket/collects/setup/main.rkt"
make[4]: *** [Makefile:500: do-setup-install] Error 1

Both minimal and full packages fail at the same place with this confusing error.
I also tried snapshot build, which errors even earlier at the beginning of make part.

Is there anything I can do in order to solve this?

3 Likes

Hi @spore
I’m sorry I don’t have an answer but have you tried a bc build? I’m just guessing from the text of your error message and the last time I saw this it was on bc.
Let us know how you get on.
Best regards
Stephen

I've tried BC and the only thing I can remember now is that it also failed...

Edit: Ok I will try it again and record the output.
Commands:

./configure --prefix=$PREFIX --enable-bconly
make
make install

And it failed at (roughly) the same place, giving output:

make[2]: Entering directory '/data/data/com.termux/files/home/downloads/racket-8.4/src/bc'
./racket3m -X "/data/data/com.termux/files/usr/share/racket/collects" -G "/data/data/com.termux/files/usr/etc/racket"  -Z ../../../../build/config  --no-user-path -N "raco" -l- setup --no-user
ffi-lib: couldn't open #f (unknown error)
   context...:
    /data/data/com.termux/files/usr/share/racket/collects/ffi/unsafe.rkt:131:0: get-ffi-lib
make[2]: *** [Makefile:476: install-setup-3m] Error 1

Which is equally confusing and not giving any additional information...

Sorry that wasn’t much help. I think someone on the discord was using tmux on Android but it was a year ago at least. Might be worth asking on there.

1 Like