[Ecls-list] ECL on iPhone

Red Daly reddaly at gmail.com
Wed Sep 10 06:57:50 UTC 2008


So I got it compiling and running on the iPhone.  Unfortunately it aborts
when I call cl_boot().  I get a console error:
Internal or unrecoverable error in:

Lisp initialization error.

I cannot inspect init_lib_LSP (which appears to be generated cod?) to get
closer to the problem.  A stack trace follows.

(gdb) backtrace
#0  0x31439134 in __kill ()
#1  0x31439110 in kill ()
#2  0x31439104 in raise ()
#3  0x314538ea in abort ()
#4  0x00068ec0 in ecl_internal_error (s=0x10b358 "\nLisp initialization
error.\n") at error.d:50
#5  0x000695b2 in universal_error_handler (narg=3, c=0x1, err=0x135be4,
args=0x411d41) at error.d:228
#6  0x0000c518 in APPLY (n=3, fn=0x69581 <universal_error_handler+1>,
x=0x14980c) at apply.d:28
#7  0x0004208a in ecl_apply_from_stack_frame (frame=0x2ffff270, x=0x137474)
at eval.d:76
#8  0x000425f2 in cl_funcall (narg=4, function=0x137474) at eval.d:202
#9  0x000697b0 in cl_error (narg=3, eformat=0x135be4) at error.d:301
#10 0x00069374 in FEundefined_function (fname=0x1391b4) at error.d:167
#11 0x00041fb6 in ecl_apply_from_stack_frame (frame=0x2ffff318, x=0x1391b4)
at eval.d:69
#12 0x000425f2 in cl_funcall (narg=3, function=0x1391b4) at eval.d:202
#13 0x0004b5e0 in compile_form (stmt=0x40f071, flags=2) at compiler.d:1961
#14 0x0004fad2 in si_eval_with_env (narg=1, form=0x40f071) at
compiler.d:2742
#15 0x00042826 in cl_eval (form=0x40f071) at eval.d:242
#16 0x000998fc in _eclbh4KmYm8_5T6h0Oy (flag=0x0) at
/Users/red/Projects/ecl/ecl-iphone/build/clos/combin.c:954
#17 0x00062fd2 in read_VV (block=0x3c79f0, entry_point=0x997c9
<_eclbh4KmYm8_5T6h0Oy+1>) at read.d:2142
#18 0x0009206a in init_lib_LSP (cblock=<value temporarily unavailable, due
to optimizations>) at
/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITYuwCKo.c:113
#19 0x00062fd2 in read_VV (block=0x3c7fc0, entry_point=0x91e5d
<init_lib_LSP+1>) at read.d:2142
#20 0x0000300c in cl_boot (argc=1, argv=0x2ffff5ac) at main.d:521
#21 0x0000208a in main (argc=1, argv=0x2ffff5ac) at
/Users/red/Projects/ecl/trivial-test/main.m:15

Your insights are appreciated!

Red

On Tue, Sep 9, 2008 at 2:12 PM, Red Daly <reddaly at gmail.com> wrote:

> This message just bounced:
>
> I have amended my configuration command to include LDFLAGS, not just
> CFLAGS.  I also disabled profiling and added a LIBRAN env variable. Now I'm
> breaking with these errors...
>
>
> ;;; Finished compiling ext:sockets;sockets.lisp.
> ;;; Note: Scanning #P"build:ext;sockets.o.NEWEST"
> ;;; Note: Found tag: "_ecl3HaOXjm8_TY2iyNy"
> ;;; Note: Invoking external command:
> ;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0
> -arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0
> -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden
> -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -miphoneos-version-min=2.0
> -I/Library/iPhone/include -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk
> -Ddarwin -I"/Users/red/Projects/ecl/ecl-iphone/src/c"
> "-I/Users/red/Projects/ecl/ecl-iphone/build/" -w -c
> "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITu3lxs7.c"
> -o
> "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITu3lxs7.o"
> ;;; Note: Invoking external command:
> ;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar cr
> libsockets.a
> /private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITu3lxs7.o
> /Users/red/Projects/ecl/ecl-iphone/build/ext/sockets.o
> ;;; Note: Invoking external command:
> ;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib
> libsockets.a
> ;;; Note: Invoking external command:
> ;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0
> -arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0
> -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden
> -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -miphoneos-version-min=2.0
> -I/Library/iPhone/include -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk
> -Ddarwin -I"/Users/red/Projects/ecl/ecl-iphone/src/c"
> "-I/Users/red/Projects/ecl/ecl-iphone/build/" -w -c
> "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITqICIO4.c"
> -o
> "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITqICIO4.o"
> ;;; Note: Invoking external command:
> Undefined symbols:
>   "___data_start", referenced from:
>       ___data_start$non_lazy_ptr in libeclgc.a(os_dep.o)
>   "___stack_base__", referenced from:
>       ___stack_base__$non_lazy_ptr in libeclgc.a(os_dep.o)
>   "_end", referenced from:
>       _end$non_lazy_ptr in libeclgc.a(os_dep.o)
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
>
> ;;; Warning: Ignoring definition for class SIMPLE-PROGRAM-ERROR
> Not a condition type: SIMPLE-PROGRAM-ERROR
> ;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 -o
> "/Users/red/Projects/ecl/ecl-iphone/build/bin/ecl"
> -L"/Users/red/Projects/ecl/ecl-iphone/build/"
> "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITqICIO4.o"
> "-lsockets" "-lcmp" "-L./"  -arch armv6 -pipe -std=c99 -gdwarf-2 -mthumb
> -I/Library/iPhone/include -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk
> libecl.a -leclgc    -lm  Broken at TOP-LEVEL. File:
> #P"/Users/red/Projects/ecl/ecl-iphone/src/lsp/top.lsp" (Form #26)No restarts
> available.
> Top level.
> SI>
>
>
> thanks for the help!  I'm sure this will be building soon :)
>
> Red
>
>
> On Tue, Sep 9, 2008 at 1:33 PM, Juan Jose Garcia-Ripoll <
> juanjose.garciaripoll at googlemail.com> wrote:
>
>> On Tue, Sep 9, 2008 at 9:34 PM, Red Daly <reddaly at gmail.com> wrote:
>>
>>> Unfortunately, I am still having problems.  I believe I am getting
>>> through the configuration process without any warnings (at least when I
>>> compile without GMP). There are new problems in what appears to be the lisp
>>> phase of the build. [...]
>>> ;;; Compiling (DEFVAR *PROFILED-FUN-NAME->INFO* ...).
>>> ;;; Warning: Ignoring definition for class PROFILE-INFO
>>> ;;; No class named PROFILE-INFO.
>>>
>>
>> This is a contributed module which sometimes causes problems. You can
>> deactivate it with --without-profile
>>
>>>
>>> From what I can tell, one problem is that not all the GCC flags I
>>> specified in the configuration stage are preserved in this latter stage of
>>> the build.[...]
>>> does not contain the -arch arm etc. flags specified in my call to
>>> configure.  However, many other calls to gcc do have those flags.
>>>
>>
>> That is because that last phase is not compiling anything: it is linking.
>> So, the appropriate flags are LDFLAGS. Seems you should add -arch arm and
>> similar to that variable as well.
>>
>>
>>> The AR value I specify also does not make it all the way to the lisp
>>> stage
>>>
>>
>> My fault. I have not included this as a configurable command. I will
>> search the code and see what I can change. Momentarily, could you edit
>> cmpmain.lsp and add the right commands?
>>
>> Juanjo
>>
>> --
>> Instituto de Física Fundamental
>> CSIC, Serrano, 113, Madrid 28040 (Spain)
>> http://juanjose.garciaripoll.googlepages.com
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20080909/388e965c/attachment.html>


More information about the ecl-devel mailing list