chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] static compile with eggs


From: Daishi Kato
Subject: [Chicken-users] static compile with eggs
Date: Sat, 23 Jul 2005 00:33:37 +0900
User-agent: Wanderlust/2.15.1 (Almost Unreal) Emacs/21.4 Mule/5.0 (SAKAKI)

This may be a faq, but I could not find
related subjects in the mailing list archive.

Is it possible to build a static excecutable that uses eggs?
I'm trying with a simple example, which turned to be not working.
Here is the log what I've done.

8<------8<------8<------8<------8<------8<------8<------
%cat foo.scm
#!/usr/local/bin/csi -script
(require-extension gdbm)
(define db (gdbm-open "foo.db"))
(gdbm-store db "knock knock" "who's there")
(display (gdbm-fetch db "knock knock"))
(newline)
(gdbm-close db)
%./foo.scm
who's there
%csc -static foo.scm
%./foo
Error: (load) unable to load compiled module
"/usr/local/lib/chicken/gdbm.so"
"can not load compiled code dynamically - this is a statically linked 
executable"

##sys#require   <--

%chicken foo.scm -feature chicken-compile-static
compiling `foo.scm' ...
generating `foo.c' ...
%chicken gdbm.scm -feature chicken-compile-static
compiling `gdbm.scm' ...
Warning: global variable `make_string_with_len' is never used
generating `gdbm.c' ...
%gcc foo.c -g -DHAVE_CHICKEN_CONFIG_H -c -DC_NO_PIC_NO_DLL -I 
/usr/local/chicken/include
%gcc gdbm.c -g -DHAVE_CHICKEN_CONFIG_H -DC_EMBEDDED -c -DC_NO_PIC_NO_DLL -I 
/usr/local/chicken/include 
%gcc foo.o gdbm.o /usr/local/chicken/lib/libchicken.a /usr/lib/libgdbm.a 
-L/usr/local/chicken/lib -Wl,-R/usr/local/chicken/lib -static -ldl -lpcre -lm 
gdbm.o: In function `C_toplevel':
.../gdbm.c:261: multiple definition of `C_toplevel'
foo.o:.../foo.c:48: first defined here
/usr/bin/ld: Warning: size of symbol `C_toplevel' changed from 698 in foo.o to 
923 in gdbm.o
collect2: ld returned 1 exit status
8<------8<------8<------8<------8<------8<------8<------

I also tried to include gdbm.scm into foo.scm, but it gives me an error.

Any clue?

Daishi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]