[Openmcl-devel] clozure ccl on android

Renee Klawitter deepestthought42 at gmail.com
Thu Apr 18 03:13:00 PDT 2013


Cyrille Duret <cduret <at> gmail.com> writes:
> 
> 
> hello,
> I try to setup a running ccl instance on android and followed this thread
> 
> http://clozure.com/pipermail/openmcl-devel/2011-November/013183.html
> 
> I tried to compile the kernel but without success since I am running
freeBSD, I tried to compile from Windows/cygwin (I don't have linux nor MAC OS)
> 
> I tried to upload the prebuild image (aarmcl, aarmcl.image and aarmcl.so)
from svn but I got an exception :
> 
> unhandled exception 11 at 0x50066b68, context->regs at #xbef113d8
> received signal 11; faulting address: 0x1
> address not mapped to object
> ? for help
> [24515] Clozure CL kernel debugger:
> 
> 
> My phone's CPU is
> 
> # cat /proc/cpuinfo
> Processor   : ARMv7 Processor rev (v71)
> BogoMIPS : 509.54
> Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3
> ..
> ..
> Hardware : bravo
> 
> Is there any way to cross compile the lisp kernel with windows OS ?
> 
> thanks
> Cyrille
> 
> 
> 
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel <at> clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
> 


                     
Hi!

I've also tried to compile and run CCL on android and I am running into a
similar issue: 

As my build system is linuxx86_64 I had to made the following changes to 
the kernel makefile:

--- Makefile	(revision 15793)
+++ Makefile	(working copy)
@@ -14,10 +14,10 @@
 #   http://opensource.franz.com/preamble.html
 
 LIBBASE = 0x04001000
-NDK = /usr/local/android-ndk-r8c
+NDK = /home/renee/android-ndk/
 UNAME_S = $(shell uname -s)
 ifeq ($(UNAME_S),Linux)
-HOST = linux-x86

+HOST = linux-x86_64
 else
 ifeq ($(UNAME_S),Darwin)
 HOST = darwin-x86

Also, I had to change armandroid.x as the linker was complaining about
multiple defined symbols (might be a clue ?):

--- armandroid.x	(revision 15793)
+++ armandroid.x	(working copy)
@@ -145,8 +145,8 @@
     SORT(CONSTRUCTORS)
   }
   .data1          : { *(.data1) }
-  _edata = .; PROVIDE (edata = .);
-  __bss_start = .;
+  /*_edata = .;*/ PROVIDE (edata = .);
+  /*__bss_start = .;*/
   __bss_start__ = .;
   .bss            :
   {
@@ -164,7 +164,7 @@
   . = ALIGN(32 / 8);
   . = ALIGN(32 / 8);
   __end__ = . ;
-  _end = .; PROVIDE (end = .);

+  /*_end = .;*/ PROVIDE (end = .);
   /* Stabs debugging sections.  */
   .stab          0 : { *(.stab) }
   .stabstr       0 : { *(.stabstr) }

I have to admit that I don't really know what I am doing here, but the
libaarmcl.so compiled afterwards.

I can also run it on my device, but it bails with the following output:

;Loading level-1.aafsl
;Loading ./l1-fasls/l1-cl-package.aafsl
;Loading ./l1-fasls/l1-utils.aafsl
;Loading ./l1-fasls/l1-init.aafsl
;Loading ./l1-fasls/l1-symhash.aafsl
;Loading ./l1-fasls/l1-numbers.aafsl
;Loading ./l1-fasls/l1-aprims.aafsl
;Loading ./l1-fasls/arm-callback-support.aafsl
;Loading ./l1-fasls/l1-callbacks.aafsl
;Loading ./l1-fasls/l1-sort.aafsl
;Loading ./bin/lists.aafsl
;Loading ./bin/sequences.aafsl
;Loading ./l1-fasls/l1-dcode.aafsl
;Loading ./l1-fasls/l1-clos-boot.aafsl
;Loading ./bin/hash.aafsl
;Loading ./l1-fasls/l1-clos.aafsl
;Loading ./bin/defstruct.aafsl
;Loading ./bin/dll-node.aafsl
;Loading ./l1-fasls/l1-unicode.aafsl
;Loading ./l1-fasls/l1-streams.aafsl
;Loading ./l1-fasls/linux-files.aafsl
;Loading ./bin/chars.aafsl
;Loading ./l1-fasls/l1-files.aafsl
;Loading ./l1-fasls/l1-typesys.aafsl
;Loading ./l1-fasls/sysutils.aafsl
;Loading ./l1-fasls/arm-threads-utils.aafsl
;Loading ./l1-fasls/l1-lisp-threads.aafsl
;Loading ./l1-fasls/l1-application.aafsl
;Loading ./l1-fasls/l1-processes.aafsl
;Loading ./l1-fasls/l1-io.aafsl
;Loading ./l1-fasls/l1-reader.aafsl
;Loading ./l1-fasls/l1-readloop.aafsl
;Loading ./l1-fasls/l1-readloop-lds.aafsl
;Loading ./l1-fasls/l1-error-system.aafsl
;Loading ./l1-fasls/l1-events.aafsl
;Loading ./l1-fasls/arm-trap-support.aafsl
;Loading ./l1-fasls/l1-format.aafsl
;Loading ./l1-fasls/l1-sysio.aafsl
;Loading ./l1-fasls/l1-pathnames.aafsl
;Loading ./l1-fasls/l1-boot-lds.aafsl
;Loading ./l1-fasls/l1-boot-1.aafsl
;Loading ./l1-fasls/l1-boot-2.aafsl
;Loading ./l1-fasls/arm-error-signal.aafsl
;Loading ./l1-fasls/l1-error-signal.aafsl
;Loading ./l1-fasls/l1-sockets.aafsl
;Loading ./bin/sort.aafsl
;Loading ./bin/numbers.aafsl
;Loading ./bin/subprims.aafsl
;Loading ./bin/arm-arch.aafsl
;Loading /data/local/ccl/bin/arch.aafsl
;Loading ./bin/vreg.aafsl
;Loading ./bin/arm-asm.aafsl
;Loading ./bin/vinsn.aafsl
;Loading /data/local/ccl/bin/backend.aafsl
;Loading ./bin/reg.aafsl
;Loading ./bin/arm-lap.aafsl
;Loading ./bin/backend.aafsl
;Loading ./bin/nx2.aafsl
;Loading ./bin/acode-rewrite.aafsl
;Loading ./l1-fasls/nx.aafsl
;Loading /data/local/ccl/bin/hash.aafsl
;Loading ./bin/arm2.aafsl
;Loading /data/local/ccl/bin/arm-backend.aafsl
;Loading /data/local/ccl/bin/nxenv.aafsl
;Loading /data/local/ccl/bin/armenv.aafsl
;Loading /data/local/ccl/bin/arm-vinsns.aafsl
;Loading ./bin/level-2.aafsl
;Loading ./bin/macros.aafsl
;Loading ./bin/setf.aafsl
;Loading ./bin/setf-runtime.aafsl
;Loading ./bin/format.aafsl
;Loading ./bin/streams.aafsl
;Loading ./bin/optimizers.aafsl
;Loading ./bin/defstruct-macros.aafsl
;Loading ./bin/defstruct-lds.aafsl
;Loading ./bin/nfcomp.aafsl
;Loading ./bin/backquote.aafsl
;Loading ./bin/backtrace-lds.aafsl
;Loading ./bin/backtrace.aafsl
;Loading /data/local/ccl/bin/arm-backtrace.aafsl
;Loading ./bin/read.aafsl
;Loading ./bin/arrays-fry.aafsl
;Loading ./bin/apropos.aafsl
;Loading ./bin/source-files.aafsl
;Loading ./bin/arm-disassemble.aafsl
;Loading ./bin/arm-lapmacros.aafsl
;Loading ./bin/foreign-types.aafsl
;Loading ./bin/ffi-androidarm.aafsl
;Loading ./bin/db-io.aafsl
Unhandled exception 11 at 0x5007a8cc, context->regs at #xbe80abf8
received signal 11; faulting address: 0xfffffff8
address not mapped to object
? for help
[7058] Clozure CL kernel debugger: B
current thread: tcr = 0x5749a0, native thread ID = 0x1b92, interrupts disabled


(#xBE80AEC0) #x54AAB3D0 : #<Function CDB-CHECK-TRAILER #x54aab90e> + 124
(#xBE80AED0) #x54AC6AB8 : #<Function DB-RECORDS #x54ac6b0e> + 92
(#xBE80AEE0) #x54AEA2BC : #<Function LOAD-RECORD #x54aea33e> + 336
(#xBE80AEF0) #x54A76490 : #<Function ENSURE-FOREIGN-TYPE-BITS #x54a767ce> + 164
(#xBE80AF00) #x54A80D28 : #<Function (:INTERNAL ARRAY
INSTALL-STANDARD-FOREIGN-TYPES) #x54a80fc6> + 660
(#xBE80AF20) #x04002AB4 : (subprimitive ret1valn)
(#xBE80AF30) #x54A30560 : #<Function PARSE-FOREIGN-TYPE #x54a3057e> + 204
(#xBE80AF40) #x54A851A4 : #<Function (:INTERNAL
CANONICALIZE-FOREIGN-TYPE-ORDINAL CANONICALIZE-FOREIGN-TYPE-ORDINALS)
#x54a85296> + 136
(#xBE80AF50) #x54A854B4 : #<Function CANONICALIZE-FOREIGN-TYPE-ORDINALS
#x54a85656> + 504
(#xBE80AF68) #x5458E4E8 : #<Anonymous Function #x5458ef1e> + 4156
(#xBE80AF98) #x5458D4D0 : #<Anonymous Function #x5458ef1e> + 36
(#xBE80AFF0) #x5009BBBC : #<Function $FASL-LFUNCALL #x5403527e> + 72
(#xBE80B000) #x500A214C : #<Function %FASLOAD #x54037d96> + 1080
(#xBE80B030) #x500A1ED8 : #<Function %FASLOAD #x54037d96> + 452
(#xBE80BD00) #x5406BF8C : #<Anonymous Function #x5406bfb6> + 1128
(#xBE80BD10) #x5009BBBC : #<Function $FASL-LFUNCALL #x5403527e> + 72
(#xBE80BD20) #x500A214C : #<Function %FASLOAD #x54037d96> + 1080
(#xBE80BD50) #x500A1ED8 : #<Function %FASLOAD #x54037d96> + 452
(#xBE80CA20) #x04006098 : (subprimitive (null))
(#xBE80CA50) #x04006088 : (subprimitive (null))
(#xBE80CAA8) #x04006138 : (subprimitive start_lisp)
[7058] Clozure CL kernel debugger: L
rcontext = 0x5749A0 
nargs = 2
r11 (fn) = #<Function --2 #x5402ac9e>
r04 (arg_z) = 512
r05 (arg_y) = 
r06 (arg_x) = "ccl:android-headers;libc;records.cdb.newest"
r07 (temp0) = 0
r08 (temp1/fname/next_method_context) = --2
r09 (temp2/nfn) = #<Function --2 #x5402ac9e>
[7058] Clozure CL kernel debugger: 

So, something to do with the foreign type definitions probably ? 

Any help is greatly appriciated as CCL could be a really nice prototyping
platform for native apps on android/etc.

Thanks and best regards, Renee.





More information about the Openmcl-devel mailing list