shigemichik
2021-8-21 14:36:15

@shigemichik has joined the channel


shigemichik
2021-8-21 14:37:35

I’m trying to build Racket for my Android Termux app. In the process, I noticed that passing #f to the ffi-lib function of the ffi/unsafe library results in an error. This causes the do-setup-install target in cs/c/Makefile to fail to execute. How can I get this to work?



madeinquant
2021-8-21 14:42:57

@madeinquant has joined the channel


soegaard2
2021-8-21 15:49:44

Hi @shigemichik

I read this part of the error: Welcome to Racket v8.2 [cs]. *; Warning: no readline support (ffi-lib: could not load foreign library path: libedit.so.3 system error: dlopen failed: library "libedit.so.3" not found) This means that the ffi-lib works, nut that the readline library isn’t installed on your system.


soegaard2
2021-8-21 15:51:02

Which system are you compiling on? And how did you start the build process?


shigemichik
2021-8-21 23:50:37
  1. Install Termux on your Android phone (I’m using SHARP SH-M11) via F-Droid.
  2. pkg update
  3. pkg install clang make libedit
  4. curl -LO <https://download.racket-lang.org/installers/8.2/racket-8.2-src-builtpkgs.tgz>
  5. tar xf racket-8.2-src-builtpkgs.tgz
  6. cd racket-8.2/src &amp;&amp; mkdir build &amp;&amp; cd build
  7. ../configure --prefix=$HOME/rkt
  8. make
  9. make install (but this will fail)

shigemichik
2021-8-21 23:53:33

https://github.com/racket/racket/blob/dfb48087a5bcdad077a2a780c5a044c60f76367c/racket/collects/openssl/mzssl.rkt#L229 I tried running the source code line by line, and I get an unknown error at this line.


shigemichik
2021-8-22 00:02:11

I read the source code and tried to understand what was happening. The following code reproduces the problem. (require '#%foreign) (ffi-lib #f)