Hi, ElephantIt seems that "gcc" on Mac OS X 10.6 compiles to 64-bit executes by default. And if I load Elephant-1.0 in a 32-bit CL, libberkeley-db.c cannot compile correctly: (I'm under 32-bit LispWorks)
; $ gcc -L/sw64/lib/ -I/sw64/include/db4/ -bundle -fPIC -Wall -g -O2 - g /Users/binghe/Lisp/packages/elephant-1.0/src/db-bdb/libberkeley-db.c -o /Users/binghe/Lisp/packages/elephant-1.0/src/db-bdb/libberkeley- db.dylib -lm -ldb-4.7 /Users/binghe/Lisp/packages/elephant-1.0/src/db-bdb/libberkeley-db.c: In function 'lisp_compare2': /Users/binghe/Lisp/packages/elephant-1.0/src/db-bdb/libberkeley-db.c: 1061: warning: unused variable 'i' /Users/binghe/Lisp/packages/elephant-1.0/src/db-bdb/libberkeley-db.c: In function 'lisp_compare_key2': /Users/binghe/Lisp/packages/elephant-1.0/src/db-bdb/libberkeley-db.c: 1155: warning: unused variable 'i' ld: warning: in /sw64/lib//libdb-4.7.dylib, file is not of required architecture
Undefined symbols:
"_db_sequence_create", referenced from:
_db_sequence_create2 in ccpBICdb.o
"_db_env_create", referenced from:
_db_env_cr in ccpBICdb.o
"_db_create", referenced from:
_db_cr in ccpBICdb.o
"_db_strerror", referenced from:
_db_strerr in ccpBICdb.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Error: erred while invoking #<ASDF:COMPILE-OP NIL 2259272B> on
#<ELE-BDB-SYSTEM::BDB-C-SOURCE "libberkeley-db" 200DF123>
1 (continue) Retry performing #<ASDF:COMPILE-OP NIL 2259272B> on
#<ELE-BDB-SYSTEM::BDB-C-SOURCE "libberkeley-db"
200DF123>.
2 Continue, treating #<ASDF:COMPILE-OP NIL 2259272B> on#<ELE-BDB-SYSTEM::BDB-C-SOURCE "libberkeley-db" 200DF123> as having been successful.
3 (abort) Return to level 0. 4 Return to top loop level 0.One solution may be explicit add a "-m32" compiler option for all 32- bit CL platforms under Mac OS X. A small patch as in attach could fix this, also paste here:
diff -rN -u old-elephant-1.0/elephant.asd new-elephant-1.0/elephant.asd
--- old-elephant-1.0/elephant.asd 2009-10-10 09:31:52.000000000 +0800
+++ new-elephant-1.0/elephant.asd 2009-10-10 09:31:52.000000000 +0800
@@ -225,6 +225,7 @@
#-(or darwin macosx darwin-host) "-shared"
#+(or darwin macosx darwin-host) "-bundle"
#+(and X86-64 (or macosx darwin darwin-host)) "-arch x86_64"
+ #+(and X86 (or macosx darwin darwin-host)) "-m32" ; Snow Leopard
#+(and X86-64 linux) "-march=x86-64"
"-fPIC"
"-Wall"
Please confirm and merge it.
Regards,
Chun Tian (binghe)
compiler-options.diff
Description: Binary data
_______________________________________________ elephant-devel site list [email protected] http://common-lisp.net/mailman/listinfo/elephant-devel
