[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling for Android
From: |
Ludovic Courtès |
Subject: |
Re: Compiling for Android |
Date: |
Tue, 24 Jun 2014 09:56:07 +0200 |
User-agent: |
Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) |
address@hidden skribis:
> Hey,
>
> On Mon, Jun 23, 2014 at 09:59:24AM +0200, Ludovic Courtès wrote:
>> address@hidden skribis:
>> > 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
>>
>> Hmm, could you run “grep -i 'iconv.h' config.log”? There is a check for
>> that, and normally Gnulib provides a replacement if needed.
>>
>> Apparently lib/iconv.h doesn’t exist here, right?
>
> Not if I don't install it.
I was referring to $top_builddir/lib/iconv.h in Guile. Normally Gnulib
would create it as it sees fit. Is it the case here?
> $ grep -i -C2 'iconv\.h' config.log # tests excerpts removed
Hmm, I don’t see GL_GENERATE_ICONV_H_TRUE here.
>> > 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.
>>
>> What does libffi.pc look like?
>
> prefix=/usr/src/ndk-standalone-12-arm/sysroot/usr
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> toolexeclibdir=$(libdir)
> ...
> (instead of ${libdir})
That’s weird, libffi 3.0.13 doesn’t have this problem. What version is it?
>> > 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.
>>
>> You could either comment out the related code in libguile, or build
>> Guile --without-threads.
>
> libguile-2.0 builds (yay!) and we start getting interesting errors:
Cool! :-)
> make[2]: Entering directory '/mnt/workdir/guile/cross-android/module'
> GUILEC ice-9/eval.go
> Backtrace:
> In ice-9/boot-9.scm:
> 157: 8 ;;; note: source file
> /home/personnel/workdir/guile/cross-android/../module/system/vm/frame.scm
> ;;; newer than compiled /usr/lib/guile/2.0/ccache/system/vm/frame.go
> ;;; note: source file
> /home/personnel/workdir/guile/cross-android/../module/system/vm/program.scm
> ;;; newer than compiled /usr/lib/guile/2.0/ccache/system/vm/program.go
> ;;; note: source file
> /home/personnel/workdir/guile/cross-android/../module/system/vm/instruction.scm
> ;;; newer than compiled
> /usr/lib/guile/2.0/ccache/system/vm/instruction.go
> ;;; note: source file
> /home/personnel/workdir/guile/cross-android/../module/system/vm/objcode.scm
> ;;; newer than compiled /usr/lib/guile/2.0/ccache/system/vm/objcode.go
> ;;; note: source file
> /home/personnel/workdir/guile/cross-android/../module/srfi/srfi-26.scm
> ;;; newer than compiled /usr/lib/guile/2.0/ccache/srfi/srfi-26.go
> [catch #t #<catch-closure 179d080> ...]
> In unknown file:
> ?: 7 [apply-smob/1 #<catch-closure 179d080>]
> In ice-9/boot-9.scm:
> 63: 6 [call-with-prompt prompt0 ...]
> In ice-9/eval.scm:
> 432: 5 [eval # #]
> 387: 4 [eval # #]
> In srfi/srfi-1.scm:
> 619: 3 [for-each #<procedure 1894f00 at scripts/compile.scm:179:14 (file)> #]
> In scripts/compile.scm:
> 182: 2 [#<procedure 1894f00 at scripts/compile.scm:179:14 (file)>
> "../../module/ice-9/eval.scm"]
> In system/base/target.scm:
> 57: 1 [with-target "arm-unknown-linux-androideabi" ...]
> In unknown file:
> ?: 0 [scm-error misc-error #f "~A ~S" ("unknown CPU endianness" "arm") #f]
>
> ERROR: In procedure scm-error:
> ERROR: unknown CPU endianness "arm"
> Makefile:2167: recipe for target 'ic
This patch should solve the problem:
diff --git a/module/system/base/target.scm b/module/system/base/target.scm
index c74ae67..cefa951 100644
--- a/module/system/base/target.scm
+++ b/module/system/base/target.scm
@@ -1,6 +1,6 @@
;;; Compilation targets
-;; Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@@ -72,6 +72,8 @@
(endianness big))
((string-match "^arm.*el" cpu)
(endianness little))
+ ((string=? "arm" cpu) ;ARMs are LE by default
+ (endianness little))
(else
(error "unknown CPU endianness" cpu)))))
Just to be sure, could you run config.guess on the target machine?
>> Is the rest of pthreads implemented? If yes, then we should add a test
>> for pthread_cancel and arrange for that.
>
> Apparently yes and that'd be the only missing function.
OK, I’ll commit something to disable handle that case.
Thanks!
Ludo’.
- Compiling for Android, beuc, 2014/06/18
- Re: Compiling for Android, Ludovic Courtès, 2014/06/20
- Re: Compiling for Android, beuc, 2014/06/21
- Re: Compiling for Android, Ludovic Courtès, 2014/06/21
- Re: Compiling for Android, beuc, 2014/06/22
- Re: Compiling for Android, Ludovic Courtès, 2014/06/23
- Re: Compiling for Android, beuc, 2014/06/23
- Re: Compiling for Android,
Ludovic Courtès <=
- Re: Compiling for Android, beuc, 2014/06/25
- Re: Compiling for Android, Ludovic Courtès, 2014/06/25
- Re: Compiling for Android, Mark H Weaver, 2014/06/24
- Re: libunistring test, beuc, 2014/06/22
- Re: libunistring test, Ludovic Courtès, 2014/06/23
- Re: libunistring test, beuc, 2014/06/23