failing unit with csi on android pasted by klm` on Wed Jun 19 11:05:35 2013
1|root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi -R posix CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) ; loading /system/lib/chicken/7/posix.import.so ... ; loading library posix ... [panic] nursery is too small - try higher setting using the `-:s' option - execution terminated
some units working, some not pasted by klm` on Wed Jun 19 11:14:17 2013
70|root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi -R tcp CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) ; loading /system/lib/chicken/7/tcp.import.so ... ; loading library tcp ... [panic] nursery is too small - try higher setting using the `-:s' option - execution terminated 1|root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi -R posix CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) ; loading /system/lib/chicken/7/posix.import.so ... ; loading library posix ... [panic] nursery is too small - try higher setting using the `-:s' option - execution terminated /chicken/7 csi -R data-structures < CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) #;1> (exit) root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi -R files CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) ; loading /system/lib/chicken/7/files.import.so ... ; loading library files ... [panic] nursery is too small - try higher setting using the `-:s' option - execution terminated 1|root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi -R srfi-1 CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) ; loading /system/lib/chicken/7/srfi-1.import.so ... ; loading library srfi-1 ... [panic] nursery is too small - try higher setting using the `-:s' option - execution terminated 1|root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi -R srfi-4 CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) ; loading /system/lib/chicken/7/srfi-4.import.so ... ; loading library srfi-4 ... [panic] nursery is too small - try higher setting using the `-:s' option - execution terminated 1|root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi -R utils CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) ; loading /system/lib/chicken/7/utils.import.so ... ; loading library utils ... [panic] nursery is too small - try higher setting using the `-:s' option - execution terminated 1|root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi -R lolevel CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) ; loading /system/lib/chicken/7/lolevel.import.so ... ; loading library lolevel ... [panic] nursery is too small - try higher setting using the `-:s' option - execution terminated 1|root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi -R ports CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) #;1> (exit)
works in compiled code pasted by klm` on Wed Jun 19 11:17:59 2013
;;; posix-test.scm (use posix) (print (directory? "/cache")) (repl) ;; android-csc posix-test.scm && adb push posix-test /cache ;;; EOF ;; I don't need repository-path from compiled code 1|root@android:/ # /cache/posix-test #t #;> (repository-path) "/system/lib" #;> (exit) ;; re-using posix still crashes from csi (now I need repo-path): 1|root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 /cache/posix-test #t #;> (use posix) ; loading /system/lib/chicken/7/posix.import.so ... ; loading library posix ... [panic] nursery is too small - try higher setting using the `-:s' option - execution terminated
nursery size pasted by klm` on Wed Jun 19 11:20:22 2013
70|root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi -:s10m CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) #;1> ,r Features: arm chicken chicken-4 chicken-4.8 csi data-structures dload extras gnu hygienic-macros irregex-is-core-unit linux little-endian module-environments ports ptables srfi-0 srfi-10 srfi-11 srfi-12 srfi-15 srfi-16 srfi-17 srfi-2 srfi-23 srfi-26 srfi-28 srfi-30 srfi-31 srfi-39 srfi-46 srfi-55 srfi-6 srfi-6 srfi-61 srfi-62 srfi-8 srfi-88 srfi-9 srfi-98 syntax-rules unix Machine type: arm Software type: unix Software version: linux Build platform: gnu Installation prefix: /system Extension path: /system/lib/chicken/7 Include path: (/system/share/chicken) Keyword style: suffix Symbol-table load: 0.54 Avg bucket length: 1.3 Total symbol count: 1622 Memory: heap size is 262144 bytes with 261424 bytes currently in use nursery size is 10485760 bytes, stack grows downward Command line: ("csi" "-:s10m") interrupts are enabled #;1> ^D root@android:/ # CHICKEN_REPOSITORY=/system/lib/chicken/7 csi CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-12 on kth (Linux) #;1> ,r Features: arm chicken chicken-4 chicken-4.8 csi data-structures dload extras gnu hygienic-macros irregex-is-core-unit linux little-endian module-environments ports ptables srfi-0 srfi-10 srfi-11 srfi-12 srfi-15 srfi-16 srfi-17 srfi-2 srfi-23 srfi-26 srfi-28 srfi-30 srfi-31 srfi-39 srfi-46 srfi-55 srfi-6 srfi-6 srfi-61 srfi-62 srfi-8 srfi-88 srfi-9 srfi-98 syntax-rules unix Machine type: arm Software type: unix Software version: linux Build platform: gnu Installation prefix: /system Extension path: /system/lib/chicken/7 Include path: (/system/share/chicken) Keyword style: suffix Symbol-table load: 0.54 Avg bucket length: 1.3 Total symbol count: 1622 Memory: heap size is 524300 bytes with 392478 bytes currently in use nursery size is 262144 bytes, stack grows downward Command line: ("csi") interrupts are enabled
rebuilding with print pasted by klm` on Wed Jun 19 11:40:47 2013
[klm@kth chicken-core]$ git diff -U10 posixunix.c diff --git a/posixunix.c b/posixunix.c index ba13510..0952423 100644 --- a/posixunix.c +++ b/posixunix.c @@ -11139,20 +11139,22 @@ static void C_fcall toplevel_trampoline(void *dummy) C_regparm C_noret; C_regparm static void C_fcall toplevel_trampoline(void *dummy){ C_posix_toplevel(2,C_SCHEME_UNDEFINED,C_restore);} void C_ccall C_posix_toplevel(C_word c,C_word t0,C_word t1){ C_word tmp; C_word t2; C_word t3; C_word *a; if(toplevel_initialized) C_kontinue(t1,C_SCHEME_UNDEFINED); else C_toplevel_entry(C_text("posix_toplevel")); +printf("%d %d %d\n", words, stack_size, + C_bytes_to_words(stack_size)); C_check_nursery_minimum(3); if(!C_demand(3)){ C_save(t1); C_reclaim((void*)toplevel_trampoline,NULL);} toplevel_initialized=1; if(!C_demand_2(3374)){ C_save(t1); C_rereclaim2(3374*sizeof(C_word), 1); t1=C_restore;} a=C_alloc(3); ;;; buidling [klm@kth android-chicken]$ make target mkdir -p build/target cd src/chicken-core; \ PATH=$PWD/toolchain/android-14/bin:$PATH make PLATFORM=android \ CHICKEN=./chicken-boot \ HOSTSYSTEM=arm-linux-androideabi \ TARGET_FEATURES="-no-feature x86 -no-feature x86-64 -feature arm -feature android" \ DEBUGBUILD= \ ARCH= \ PREFIX=/system \ DESTDIR=/home/klm/opt/android-chicken/build/target \ EGGDIR=/system/lib \ all make[1]: Entering directory `/home/klm/opt/android-chicken/src/chicken-core' make -f ./Makefile.android CONFIG= all make[2]: Entering directory `/home/klm/opt/android-chicken/src/chicken-core' arm-linux-androideabi-gcc -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -c -Os -fomit-frame-pointer -DC_BUILDING_LIBCHICKEN posixunix.c -o posixunix-static.o -I. -I./ posixunix.c: In function 'C_posix_toplevel': posixunix.c:11149: error: 'words' undeclared (first use in this function) posixunix.c:11149: error: (Each undeclared identifier is reported only once posixunix.c:11149: error: for each function it appears in.) posixunix.c:11149: error: 'stack_size' undeclared (first use in this function) make[2]: *** [posixunix-static.o] Error 1 make[2]: Leaving directory `/home/klm/opt/android-chicken/src/chicken-core' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/klm/opt/android-chicken/src/chicken-core' make: *** [target] Error 2
config.mk pasted by klm` on Wed Jun 19 11:49:19 2013
# Configuration for building a custom Cross-CHICKEN # # Copy this file to "config.mk" and make all necessary changes to reflect the configuration # of your environment. # Path to Android NDK tools NDK_PATH ?= ~/opt/android-ndk-r8 # Platform-ID ANDROID_PLATFORM ?= android-14 # Name of the final application-package #PACKAGE_NAME ?= my.package TARGET_BASEPATH = /system # Host-system architecture, on which the application is built HOST_ARCH ?= linux-x86 # Target-system architecture, on which the application will run ARCH ?= armeabi # Enable this to build libraries with debug-information #DEBUGBUILD ?= 1
make target (runtime.c patch) pasted by klm` on Wed Jun 19 11:54:20 2013
diff --git a/runtime.c b/runtime.c index 5ce267e..31a4018 100644 --- a/runtime.c +++ b/runtime.c @@ -1210,6 +1210,9 @@ void C_do_resize_stack(C_word stack) void C_check_nursery_minimum(C_word words) { + printf("%d %d %d\n", words, stack_size, + C_bytes_to_words(stack_size)); + if(words >= C_bytestowords(stack_size)) panic(C_text("nursery is too small - try higher setting using the `-:s' option")); } ;;;; ********* [klm@kth android-chicken]$ make target mkdir -p build/target cd src/chicken-core; \ PATH=$PWD/toolchain/android-14/bin:$PATH make PLATFORM=android \ CHICKEN=./chicken-boot \ HOSTSYSTEM=arm-linux-androideabi \ TARGET_FEATURES="-no-feature x86 -no-feature x86-64 -feature arm -feature android" \ DEBUGBUILD= \ ARCH= \ PREFIX=/system \ DESTDIR=/home/klm/opt/android-chicken/build/target \ EGGDIR=/system/lib \ all make[1]: Entering directory `/home/klm/opt/android-chicken/src/chicken-core' make -f ./Makefile.android CONFIG= all make[2]: Entering directory `/home/klm/opt/android-chicken/src/chicken-core' arm-linux-androideabi-gcc -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -c -Os -fomit-frame-pointer -DC_BUILDING_LIBCHICKEN runtime.c -o runtime-static.o -I. -I./ runtime.c:38:23: error: sysexits.h: No such file or directory runtime.c: In function 'C_number_to_string': runtime.c:7767: warning: assignment makes pointer from integer without a cast make[2]: *** [runtime-static.o] Error 1 make[2]: Leaving directory `/home/klm/opt/android-chicken/src/chicken-core' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/klm/opt/android-chicken/src/chicken-core' make: *** [target] Error 2
find libchicken pasted by klm` on Wed Jun 19 14:28:30 2013
127|root@android:/data/data/com.example.xyz # busybox find / -name "libchicken>
/system/lib/libchicken.a
/system/lib/libchicken.so
/data/data/com.example.xyz/lib/libchicken.a
/data/data/com.example.xyz/lib/libchicken.so
/data/data/com.example.xyz/lib/libchicken.so.7
no title pasted by klm` on Wed Jun 19 14:30:06 2013
/data/data/com.example.xyz/lib/libchicken.so.7 -l lib/libchicken* < -rw-rw-rw- root root 4813796 2013-06-19 12:06 libchicken.a lrwxrwxrwx root root 2013-06-19 12:10 libchicken.so -> libchicken.so.7 -rwxrwxrwx root root 4212629 2013-06-19 12:06 libchicken.so.7
ls -l all libchicken pasted by klm` on Wed Jun 19 14:36:21 2013
$ busybox find / -name "libchicken*" | busybox xargs ls -l
-rw-rw-rw- 1 0 0 4813796 Jun 19 12:06 /data/data/com.example.xyz/lib/libchicken.a
lrwxrwxrwx 1 0 0 15 Jun 19 12:10 /data/data/com.example.xyz/lib/libchicken.so -> libchicken.so.7
-rwxrwxrwx 1 0 0 4212629 Jun 19 12:06 /data/data/com.example.xyz/lib/libchicken.so.7
-rw-rw-rw- 1 0 0 4814192 Jun 12 13:41 /system/lib/libchicken.a
lrwxrwxrwx 1 0 0 15 Jun 19 09:22 /system/lib/libchicken.so -> libchicken.so.7
trying again pasted by klm` on Wed Jun 19 14:41:13 2013
LD_LIBRARY_PATH=./lib CHICKEN_REPOSITORY=./lib/chicken/7/ ./bin/csi -R posix -:d [debug] application startup... [debug] heap resized to 262144 bytes [debug] stack bottom is 0xbeefd9c8. [debug] entering toplevel toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel library_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel build_2dversion_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel eval_toplevel... KLMPATCH 3 262144 65536 [debug] resizing mutation-stack from 4k to 8k ... [debug] entering toplevel expand_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel modules_toplevel... KLMPATCH 3 262144 65536 [debug] resizing mutation-stack from 8k to 16k ... [debug] entering toplevel chicken_2dsyntax_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel ports_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel extras_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel data_2dstructures_toplevel... KLMPATCH 3 262144 65536 CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-19 on kth (Linux) ; loading ./lib/chicken/7//posix.import.so ... [debug] resizing heap dynamically from 256k to 512k ... Error: (load) during expansion of (import ...) - unable to load compiled module - Cannot load library: load_library[1091]: Library './lib/chicken/7//posix.import.so' not found: "./lib/chicken/7//posix.import.so" Call history: <syntax> (##core#require-extension (posix) #t) <syntax> (##core#begin (##core#begin (##sys#load-library (quote posix) #f) (import posix)) (##core#undefined)... <syntax> (##core#begin (##sys#load-library (quote posix) #f) (import posix)) <syntax> (##sys#load-library (quote posix) #f) <syntax> (quote posix) <syntax> (##core#quote posix) <syntax> (import posix) <-- ata/data/com.example.xyz/lib/chicken/7/ ./bin/csi -R posix -:d < [debug] application startup... [debug] heap resized to 262144 bytes [debug] stack bottom is 0xbe9c09a8. [debug] entering toplevel toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel library_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel build_2dversion_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel eval_toplevel... KLMPATCH 3 262144 65536 [debug] resizing mutation-stack from 4k to 8k ... [debug] entering toplevel expand_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel modules_toplevel... KLMPATCH 3 262144 65536 [debug] resizing mutation-stack from 8k to 16k ... [debug] entering toplevel chicken_2dsyntax_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel ports_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel extras_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel data_2dstructures_toplevel... KLMPATCH 3 262144 65536 CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-19 on kth (Linux) ; loading /data/data/com.example.xyz/lib/chicken/7//posix.import.so ... [debug] resizing heap dynamically from 256k to 512k ... [debug] loading compiled module `/data/data/com.example.xyz/lib/chicken/7//posix.import.so' (handle is 0xb000a4d8) [debug] entering toplevel toplevel... KLMPATCH 3 262144 65536 ; loading library posix ... [debug] loading compiled module `libchicken.so.7' (handle is 0xb000a5f0) KLMPATCH 3 0 0 [panic] nursery is too small - try higher setting using the `-:s' option - execution terminated $ busybox find / -name "libchicken*" | busybox xargs ls -l -rw-rw-rw- 1 0 0 4813796 Jun 19 12:06 /data/data/com.example.xyz/lib/libchicken.a lrwxrwxrwx 1 0 0 15 Jun 19 12:10 /data/data/com.example.xyz/lib/libchicken.so -> libchicken.so.7 -rwxrwxrwx 1 0 0 4212629 Jun 19 12:06 /data/data/com.example.xyz/lib/libchicken.so.7
data-struct output pasted by klm` on Wed Jun 19 14:55:30 2013
1|root@android:/data/data/com.example.xyz # CHICKEN_REPOSITORY=/data/data/com.example.xyz/lib/chicken/7 LD_LIBRARY_PATH=/data/data/com.example.xyz/lib ./bin/csi -R data-structures -:d ple.xyz/lib ./bin/csi -R data-structures -:d [debug] application startup... [debug] heap resized to 262144 bytes [debug] stack bottom is 0xbebf0988. [debug] entering toplevel toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel library_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel build_2dversion_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel eval_toplevel... KLMPATCH 3 262144 65536 [debug] resizing mutation-stack from 4k to 8k ... [debug] entering toplevel expand_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel modules_toplevel... KLMPATCH 3 262144 65536 [debug] resizing mutation-stack from 8k to 16k ... [debug] entering toplevel chicken_2dsyntax_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel ports_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel extras_toplevel... KLMPATCH 3 262144 65536 [debug] entering toplevel data_2dstructures_toplevel... KLMPATCH 3 262144 65536 CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (android) (rev ed1f1d6) linux-unix-gnu-arm [ dload ptables ] compiled 2013-06-19 on kth (Linux) #;1>
load instead of use works pasted by klm` on Wed Jun 19 16:23:37 2013
LD_LIBRARY_PATH=./lib csi -p "(load \"/cache/7/posix.import.so\")" KLMPATCH 3 262144 65536 KLMPATCH 3 262144 65536 KLMPATCH 3 262144 65536 KLMPATCH 3 262144 65536 KLMPATCH 3 262144 65536 KLMPATCH 3 262144 65536 KLMPATCH 3 262144 65536 KLMPATCH 3 262144 65536 KLMPATCH 3 262144 65536 KLMPATCH 3 262144 65536 KLMPATCH 3 262144 65536 #<unspecified> ;; does not crash!
explicit load added by klm` on Wed Jun 19 18:09:51 2013
$ LD_LIBRARY_PATH=./lib csi -p "(load \"/cache/7/posix.import.so\")" -:d [debug] application startup... [debug] heap resized to 262144 bytes [debug] stack bottom is 0xbef8c9c8. [debug] entering toplevel toplevel... [debug] entering toplevel library_toplevel... [debug] entering toplevel build_2dversion_toplevel... [debug] entering toplevel eval_toplevel... [debug] resizing mutation-stack from 4k to 8k ... [debug] entering toplevel expand_toplevel... [debug] entering toplevel modules_toplevel... [debug] resizing mutation-stack from 8k to 16k ... [debug] entering toplevel chicken_2dsyntax_toplevel... [debug] entering toplevel ports_toplevel... [debug] entering toplevel extras_toplevel... [debug] entering toplevel data_2dstructures_toplevel... ; loading /cache/7/posix.import.so ... [debug] loading compiled module `/cache/7/posix.import.so' (handle is 0xb000a4d8) [debug] entering toplevel toplevel... [debug] resizing heap dynamically from 256k to 523k ... #<unspecified> [debug] forcing finalizers... [debug] application terminated normall