egallesio / STklos

STklos Scheme
http://stklos.net
GNU General Public License v2.0
69 stars 17 forks source link

Small build problem on android #658

Open jpellegrini opened 2 months ago

jpellegrini commented 2 months ago

Hi @egallesio !

I got a new Android phone, and tried compiling STklos.

It initially seems that PCRE will work:

***** Regexp support
*****
checking for pcre2_config_8 in -lpcre2-8... yes
... Using system libpcre2 library
*****

And the summary is:

SUMMARY
*******
               System:  Linux-4.14.113-g1cb23d5d0f9e
              OS nick:  LINUX_4_14
              OS type:  unix
       Install prefix:  /data/data/com.termux/files/usr
           C compiler:  gcc
    Compilation flags:  -g -O2
               Loader:  ld
       Thread support:  pthreads
     Case sensitivity:  true (by default)
Control fx parameters:  yes
System libraries used:  libffi libpcre2 libgmp libgc
   Compiled libraries: 
 Documentation update:  no (install Asciidoctor to rebuild documentation)

However, the generated Makefile does not link with -lpcre2-8, as determined in the configure phase, but with -lpcre-8 (without the 2):

gcc  -g -O2 -rdynamic  -o stklos base64.o boolean.o boot.o box.o char.o cond.o cpointer.o dynload.o env.o error.o extend.o ffi.o fixnum.o fport.o gnu-getopt.o hash.o keyword.o lib.o list.o misc.o md5.o number.o object.o parameter.o path.o port.o print.o proc.o process.o promise.o read.o regexp.o signal.o sio.o socket.o sport.o stklos.o str.o struct.o symbol.o syntax.o system.o utf8.o uvector.o vector.o vm.o vport.o thread-common.o thread-pthreads.o mutex-common.o mutex-pthreads.o -lgmp -lpcre-8 -lpcre2-posix -lffi -lgc -lm -lpthread 
ld.lld: error: unable to find library -lpcre-8
gcc: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:584: stklos] Error 1
make[2]: Leaving directory '/data/data/com.termux/files/home/STklos/src'
make[1]: *** [Makefile:489: all] Error 2
make[1]: Leaving directory '/data/data/com.termux/files/home/STklos/src'
make: *** [Makefile:438: all-recursive] Error 1

I'm not sure why this happened, or how to fix it...