[Ecls-list] Two-level dependency "segmentation violation"

William Robinson airbaggins at gmail.com
Sat Jan 26 19:40:01 UTC 2008


Hi,

I have run into a problem, while trying to create a .fas out of an ASDF 
system with a dependency. I've attached some super-simple code to 
hopefully demonstrate this. I have a "program.lisp" loading a 
"helper.fas", which is built from an ASDF package, which, in turn, 
depends on "library.asd". The build process appears to statically link 
"library" when it builds "helper.fas", but when I try to load the .fas 
(from either a REPL or program.lisp), there is a "Segmentation violation".

Here is what the output looks like, when I run the builder.lisp script 
in the attached tarball.
Thanks in advance.

bill
:)





ecl -load builder.lisp

;;; Loading 
"/home/bill/programming/test-lisp/ecl-two-level-deps/builder.lisp"
;;; Loading #P"/usr/local/lib/ecl/cmp.fas"
;;; Loading #P"/usr/local/lib/ecl/sysfun.lsp"
;;; Loading #P"/usr/local/lib/ecl/asdf.fas"
; loading system definition from helper.asd into #<ASDF49 package>
;;; Loading "/home/bill/programming/test-lisp/ecl-two-level-deps/helper.asd"
; registering #<SYSTEM #:HELPER 144763952> as HELPER
; loading system definition from library.asd into #<ASDF52 package>
;;; Loading 
"/home/bill/programming/test-lisp/ecl-two-level-deps/library.asd"
; registering #<SYSTEM #:LIBRARY 145125568> as LIBRARY
;;; Loading 
"/home/bill/programming/test-lisp/ecl-two-level-deps/library.lisp"
;;; Loading 
"/home/bill/programming/test-lisp/ecl-two-level-deps/helper.lisp"
;;; Compiling 
/home/bill/programming/test-lisp/ecl-two-level-deps/library.lisp.
;;; Compiling (DEFUN ADD ...).
;;; End of Pass 1.  
;;; Note: Emiting FUNCALL for SI::DODEFPACKAGE
;;; Emitting code for ADD.
;;; Calling the C compiler...
;;; Note: Invoking external command:
;;; gcc  -D_GNU_SOURCE -g -O2 -fPIC -D_THREAD_SAFE  -fstrict-aliasing 
-Dlinux -O "-I/usr/local/include/" -w -c 
"/home/bill/programming/test-lisp/ecl-two-level-deps/library.c" -o 
"/home/bill/programming/test-lisp/ecl-two-level-deps/library.o"

;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3
;;; Finished compiling 
/home/bill/programming/test-lisp/ecl-two-level-deps/library.lisp.
;;; Note: Invoking external command:
;;; gcc  -D_GNU_SOURCE -g -O2 -fPIC -D_THREAD_SAFE  -fstrict-aliasing 
-Dlinux -O "-I/usr/local/include/" -w -c 
"/home/bill/programming/test-lisp/ecl-two-level-deps/ECLINITQBs3z9.c" -o 
"/home/bill/programming/test-lisp/ecl-two-level-deps/ECLINITQBs3z9.o"

;;; Note: Invoking external command:
;;; ar cr 
/home/bill/programming/test-lisp/ecl-two-level-deps/liblibrary.a 
/home/bill/programming/test-lisp/ecl-two-level-deps/ECLINITQBs3z9.o 
/home/bill/programming/test-lisp/ecl-two-level-deps/library.o

;;; Note: Invoking external command:
;;; ranlib /home/bill/programming/test-lisp/ecl-two-level-deps/liblibrary.a

;;; Compiling 
/home/bill/programming/test-lisp/ecl-two-level-deps/helper.lisp.
;;; Compiling (DEFUN HELP-ME ...).
;;; End of Pass 1.  
;;; Note: Emiting FUNCALL for SI::DODEFPACKAGE
;;; Emitting code for HELP-ME.
;;; Note: Emitting linking call for ADD
;;; Calling the C compiler...
;;; Note: Invoking external command:
;;; gcc  -D_GNU_SOURCE -g -O2 -fPIC -D_THREAD_SAFE  -fstrict-aliasing 
-Dlinux -O "-I/usr/local/include/" -w -c 
"/home/bill/programming/test-lisp/ecl-two-level-deps/helper.c" -o 
"/home/bill/programming/test-lisp/ecl-two-level-deps/helper.o"

;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3
;;; Finished compiling 
/home/bill/programming/test-lisp/ecl-two-level-deps/helper.lisp.
;;; Note: Invoking external command:
;;; gcc  -D_GNU_SOURCE -g -O2 -fPIC -D_THREAD_SAFE  -fstrict-aliasing 
-Dlinux -O "-I/usr/local/include/" -w -c 
"/home/bill/programming/test-lisp/ecl-two-level-deps/ECLINITxJowE3.c" -o 
"/home/bill/programming/test-lisp/ecl-two-level-deps/ECLINITxJowE3.o"

;;; Note: Invoking external command:
;;; gcc -o 
"/home/bill/programming/test-lisp/ecl-two-level-deps/helper.fas" 
-L"/usr/local/lib/" 
"/home/bill/programming/test-lisp/ecl-two-level-deps/ECLINITxJowE3.o" 
"/home/bill/programming/test-lisp/ecl-two-level-deps/liblibrary.a" 
"/home/bill/programming/test-lisp/ecl-two-level-deps/helper.o"  
-Wl,--rpath,/usr/local/lib/ -shared    -lecl -lpthread -ldl  -lm   -lgmp

;;; Compiling program.lisp.
;;; Compiling (DEFUN MAIN ...).
;;; End of Pass 1.  
;;; Emitting code for MAIN.
;;; Note: Emitting linking call for HELP-ME
;;; Calling the C compiler...
;;; Note: Invoking external command:
;;; gcc  -D_GNU_SOURCE -g -O2 -fPIC -D_THREAD_SAFE  -fstrict-aliasing 
-Dlinux -O "-I/usr/local/include/" -w -c 
"/home/bill/programming/test-lisp/ecl-two-level-deps/program.c" -o 
"/home/bill/programming/test-lisp/ecl-two-level-deps/program.o"

;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3
;;; Finished compiling program.lisp.
;;; Note: Invoking external command:
;;; gcc  -D_GNU_SOURCE -g -O2 -fPIC -D_THREAD_SAFE  -fstrict-aliasing 
-Dlinux -O "-I/usr/local/include/" -w -c 
"/home/bill/programming/test-lisp/ecl-two-level-deps/ECLINITIWx49Y.c" -o 
"/home/bill/programming/test-lisp/ecl-two-level-deps/ECLINITIWx49Y.o"

;;; Note: Invoking external command:
;;; gcc -o "/home/bill/programming/test-lisp/ecl-two-level-deps/program" 
-L"/usr/local/lib/" 
"/home/bill/programming/test-lisp/ecl-two-level-deps/ECLINITIWx49Y.o" 
"/home/bill/programming/test-lisp/ecl-two-level-deps/program.o"  
-Wl,--rpath,/usr/local/lib/   -lecl -lpthread -ldl  -lm   -lgmp


./program

;;; Loading "/home/bill/programming/test-lisp/ecl-two-level-deps/helper.fas"
Segmentation violation.
Broken at SI:TOP-LEVEL.No restarts available.
Top level.
 >

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecl-two-level-deps.tgz
Type: application/x-compressed-tar
Size: 747 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20080126/f2b71a21/attachment.bin>


More information about the ecl-devel mailing list