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

Elliott Slaughter elliottslaughter at gmail.com
Mon Mar 2 06:48:45 UTC 2009


I'm trying to cross compile ECL for Linux on ARM EABI, and have run into
some problems, the end result being that ECL crashes on the target device. I
would appreciate any assistance in debugging or getting this build to work.
Thanks in advance.

I have outlined my steps below (some of this may or may not be related, so
please stay with me):

I am compiling using a x86 Linux machine to a Nokia n810 running Maemo (a
Linux derivative) on ARM EABI, using the Maemo SDK+ toolchain. I am trying
to compile ECL from the newest CVS, using an ECL I just built from CVS on
the build machine.

When I started the cross compile, I didn't know what values were appropriate
in cross_config for ARM processors, so I just left the defaults. (I can't
find any references online for this, so I still can't check whether they
were correct or not.) If any of the following configuration settings are
wrong, please let me know:

### 1.5) Can we guess how many characters are available for reading from
###      the FILE structure?
###          0 = no
###          1 = (f)->_IO_read_end - (f)->_IO_read_ptr
###          2 = (f)->_r
###          3 = (f)->_cnt

Continuing, the build process seemed to go well enough, except for a failure
to compile defsystem.lisp:

;;; No class named TOPOLOGICAL-SORT-NODE.
;;; Error: in file ext:defsystem;defsystem.lisp, position 117, and form
'TOPOLOGICAL-SORT-NODE-P) was not evaluated successfully.
Cannot find out entry point for binary file
;;; You are recommended to compile again.Broken at TOP-LEVEL. File:
#P"/home/elliott/src/ecl-9.1.0/src/lsp/top.lsp" (Form #26)No restarts

I figured I could live without defsystem, so I continued and finished the

The build compiled, and I built a debian package and attempted to install it
on the phone. I immediately found out that I was missing libgc1c2. Using
lenny debian sources, I found a binary, with one minor problem: it depended
on libc6 >= 2.7 and the device comes with 2.5. Hoping it would work anyways,
I installed libgc1c2, and then ecl. When I ran ecl, I got the following

# ecl

Internal or unrecoverable error in:

Lisp initialization error.

  [22: Invalid argument]

Hoping to find out more about this rather opaque error, I installed gdb and
got a backtrace:

# gdb ecl
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabi"...
(no debugging symbols found)
(gdb) run
Starting program: /usr/bin/ecl
(no debugging symbols found)

Internal or unrecoverable error in:

Lisp initialization error.

  [22: Invalid argument]

Program received signal SIGABRT, Aborted.
0x4024ce74 in raise () from /lib/libc.so.6
(gdb) where
#0  0x4024ce74 in raise () from /lib/libc.so.6
#1  0x4024e450 in abort () from /lib/libc.so.6
#2  0x4011a990 in ecl_internal_error ()
   from /usr/lib/libecl.so.9.1
#3  0x4011b19c in ?? ()
   from /usr/lib/libecl.so.9.1

Which still leaves me with no clear idea of what exactly is going wrong.

Given the above information, what seems the most likely cause of the error?
How might I be able to get better information for debugging?

Do I need to worry about compatibility with the libc version? (I have tried
and failed to upgrade libc on the device, so if this is the issue than I
probably need to go and compile libgc1c2 for the old libc, not the other way

Does anyone have recent experience with compiling ECL for an ARM (especially
EABI) device? Are there any known issues involved? Does anyone currently
have a working binary?

Thanks again. Any assistence would be appreciated.

On Mon, Feb 23, 2009 at 7:55 PM, Elliott Slaughter <
elliottslaughter at gmail.com> wrote:

> Hi,
> Has anyone here had any success in getting ECL to compile/run on a
> Nokia phone (e.g. the S60)?
> Is this something I could reasonably expect to get up and running in a
> week?
> Thanks.
> --
> Elliott Slaughter
> "Any road followed precisely to its end leads precisely nowhere." -
> Frank Herbert

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/20090301/0d4e56ee/attachment.html>

More information about the ecl-devel mailing list