Re: [Chicken-users] static compile with eggs
On 7/22/05, Daishi Kato [EMAIL PROTECTED] wrote: 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. [...] You should do the following: % csc gdbm.scm -unit gdbm -c -O2 -d0 % csc foo.scm -uses gdbm -prelude '(provide (quote gdbm))' gdbm.o % ./foo cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] static compile with eggs
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 ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users