[Ecls-list] Help cross-compiling ECL for ARM EABI (was: Can ECL run on the Nokia S60?)

Elliott Slaughter elliottslaughter at gmail.com
Wed Mar 4 06:51:45 UTC 2009

I made three different compilation attempts. Hopefully one of them will give
us a lead as to what to try next.

When compiling with ./configure --host=armel --build=armel --with-fpe=no , I
get the following error:

if [ -f CROSS-COMPILER ]; then \
        touch ecl_min; \
    else \
        gcc  -o ecl_min cinit.o c/all_symbols.o -L./ libeclmin.a -leclgmp
-lm  -lgc;\
libeclmin.a(print.o): In function
`edit_double':/home/elliott/src/ecl-9.1.0-e/src/c/print.d:513: undefined
reference to `isfinite'
libeclmin.a(number.o): In function
undefined reference to `isfinite'
:/home/elliott/src/ecl-9.1.0-e/src/c/number.d:158: undefined reference to
libeclmin.a(number.o): In function
undefined reference to `isfinite'
:/home/elliott/src/ecl-9.1.0-e/src/c/number.d:181: undefined reference to

Strangely enough, how far I get in the compilation process is determined by
what host and build settings I use. If instead I choose arm-linux-gnueabi,
which is what dh_make would have chosen, I get the following. (For some
reason, I don't appear to have gdb installed on the emulator, so I can't
really give you more information that this, although I suppose I could try
reinstalling the SDK if this seems important.)

if [ -f CROSS-COMPILER ]; then \
        ./CROSS-COMPILER compile; \
    else \
        ECLDIR=`pwd`/ ./ecl_min compile; \

Internal or unrecoverable error in:
Got signal before environment was installed on our thread.
  [22: Invalid argument]
/bin/sh: line 4: 10213 Aborted                 ECLDIR=`pwd`/ ./ecl_min

Finally, I managed to compile on the device itself (after fighting to get
enough room to fit gcc), but the compiled binary crashed with the error
"Illegal instruction". I have attached a gdb backtrace, in case you can make
sense of it:

/media/mmc2 # gdb ecl
GNU gdb 6.8-debian
This GDB was configured as "arm-linux-gnueabi"...
(gdb) run
Starting program: /usr/bin/ecl
[Thread debugging using libthread_db enabled]
[New Thread 0x4001fc40 (LWP 9556)]

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 0x4001fc40 (LWP 9556)]
0x4026a138 in __sigsetjmp () from /lib/libc.so.6
(gdb) where
#0  0x4026a138 in __sigsetjmp ()
   from /lib/libc.so.6
#1  0x4010db7c in read_VV (block=0x24f578,
    entry_point=0x872c <init_ECL_PROGRAM>)
    at /media/mmc2/ecl/src/c/read.d:2203
#2  0x00008798 in main (
    argc=<value optimized out>,
    argv=<value optimized out>)
    at /media/mmc2/ecl/build/ECLINITSrP7rJ.c:50

Although I'm wondering if this failure wasn't really the result of using
different libc6 versions--since the only binaries I could find for armel
were the main debian repositories, I used libc6 version 2.7 and associated
binaries instead of the version 2.5 binaries the Nokia-provided SDK uses. As
such these results may not be worth anything.

(Actually, it confuses me that ECL can fail this badly after getting all the
way through the compilation process, considering that it has to load and run
ecl_min to even compile the rest of the executable.)

Again, thanks for your support.

On Tue, Mar 3, 2009 at 12:55 AM, Juan Jose Garcia-Ripoll <
juanjose.garciaripoll at googlemail.com> wrote:

> On Tue, Mar 3, 2009 at 12:51 AM, Elliott Slaughter
> <elliottslaughter at gmail.com> wrote:
> > If I can't cross compile, then as I see it, I have two options: Either
> > I can compile on the device itself, or I can emulate an ARM CPU on my
> > x86 machine and pretend that it's compiling on the real thing.
> I have been using the second one in the past, when I had a Linux box
> available. QEMU was running fine with ARM but, again, I had to use
> --with-fpe=no at configuration time to disable floating point
> exceptions, because the kernel library for them was buggy.
> > ;;;   arm-linux-gnueabi-gcc -o
> > "/home/elliott/src/ecl-9.1.0/build/libecl.so"
> > -L"/home/elliott/src/ecl-9.1.0/build/" "c/main.o" "c/all_symbols2.o"
> > "liblsp.a" "libeclmin.a"      -leclgmp    -lm   -lgcBroken at
> This step is trying to build the shared library with all of ECL in it.
> However I see that this command is missing a flag: -shared, that
> indicates that the output is a DLL and not a program. This flag is
> automatically detected by the configuration process, that is unless
> the host detection step (config.guess and config.sub) fails to
> identify your system.
> Juanjo
> --
> Instituto de Física Fundamental, CSIC
> c/ Serrano, 113b, Madrid 28009 (Spain)
> http://juanjose.garciaripoll.googlepages.com

Elliott Slaughter

"Any road followed precisely to its end leads precisely nowhere." - Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20090303/a6f0e9af/attachment.html>

More information about the ecl-devel mailing list