guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling for Android


From: beuc
Subject: Re: Compiling for Android
Date: Sun, 22 Jun 2014 16:08:29 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Sat, Jun 21, 2014 at 11:34:18PM +0200, Ludovic Courtès wrote:
> address@hidden skribis:
> > Selected bits:
> >
> >   configure:14688: checking for libunistring
> >   configure:14710: arm-linux-androideabi-gcc -o conftest -g -O2 
> > -I/usr/src/ndk-standalone-12/sysroot/usr/include  conftest.c 
> > /usr/src/ndk-standalone-12/sysroot/usr/lib/libunistring.so -Wl,-rpath 
> > -Wl,/usr/src/ndk-standalone-12/sysroot/usr/lib  >&5
> >   
> > /usr/src/ndk-standalone-12/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
> >  /usr/src/ndk-standalone-12/sysroot/usr/lib/libunistring.so: error: 
> > undefined reference to 'frexp'
> >   collect2: ld returned 1 exit status
> 
> It looks like a libunistring issue no?  Namely, libunistring assumed
> frexp to be available in libc, and it isn’t.
> 
> Does Bionic provide that function in libm or something?

(Whoever decided to make "-lm" mandatory in GCC probably has a few
 thousands curses set on him on his family for at least 5 generations ;))

There's a -lm in Android.
$ ls -1 /usr/src/ndk-standalone-12-arm/sysroot/usr/lib/libm*
/usr/src/ndk-standalone-12-arm/sysroot/usr/lib/libm.a
/usr/src/ndk-standalone-12-arm/sysroot/usr/lib/libm_hard.a
/usr/src/ndk-standalone-12-arm/sysroot/usr/lib/libm.so
# 'hard' must be for hard-float archs

You're right that it's an issue in libunistring, and I'm surprised it
doesn't show up in GNU/Linux.


Incidentally I switched to static builds and I don't have the problem
for now, but dynamic builds may be required to be included in
https://code.google.com/p/android-scripting/
which is a widespread platform for scripting languages.


> >> > Which version of libgc do you recommend?
> >> 
> >> 7.4.0 should be good.
> >
> > Hmmm, the one that requires yet another dependency (libatomic)? T-T
> 
> It’s just a part of libgc that has been separated.

Yeah but deps are painful when you manually recompile them one by one ;)
Anyway, I bit the bullet and installed v2.4.2 which compiles fine!


Another issue: ./configure went well but I wasn't told iconv.h was
required:
../../libguile/print.c:27:19: fatal error: iconv.h: No such file or directory


There's also an issue in libffi.pc where a '(libdir)' is copied
verbatim in LIBS, causing bash error at link time, which I hand-fixed
for now.



In the end, I got a classical Android issue:
    CCLD     guile
  
/usr/src/ndk-standalone-12-arm/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
 ./.libs/libguile-2.0.a(libguile_2.0_la-threads.o): in function 
scm_cancel_thread:../../libguile/threads.c:1175: error: undefined reference to 
'pthread_cancel'

... classical because Bionic intentionally doesn't implement this function.


Cheers!
Sylvain



reply via email to

[Prev in Thread] Current Thread [Next in Thread]