[elephant-devel] 0.6.1 / OpenMCL / BDB
lists at infoway.net
lists at infoway.net
Wed Jan 24 16:22:43 UTC 2007
I have been trying to make 0.6.1 work under OpenMCL Version 1.1-pre-061231 (DarwinX8664). However, as I mentioned before, I have been having compilation problems.
They seem to be mainly related to libmemutil.
Out of the box attempt, I got the following error:
; $ /usr/bin/gcc -shared -Wall -fPIC -O3 -o /Users/dev/lisp/elephant/src/memutil/libmemutil.so /Users/dev/lisp/elephant/src/memutil/libmemutil.c -lm
i686-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
/usr/bin/ld: Undefined symbols:
collect2: ld returned 1 exit status
Upon inspection of elephant.asd, I made the following change:
(defmethod compiler-options ((compiler (eql :gcc)) (c elephant-c-source) &key input-file output-file)
"Default compile and link options to create a library; no -L or -I options included; math lib as default"
(unless (and input-file output-file)
(error "Must specify both input and output files"))
#-(or openmcl darwin macosx) "-shared"
#+(or openmcl darwin macosx) "-bundle"
What I basically did is I added "openmcl" to the conditionalization #- and #+. After making this change, it successfully builds the libmemutil.so file. However, while the file actually exists, it fails to load with the following message:
Error opening shared library "/Users/dev/lisp/elephant/src/memutil/libmemutil.so": dlopen(/Users/dev/lisp/elephant/src/memutil/libmemutil.so, 10): no suitable image found. Did find:
/Users/dev/lisp/elephant/src/memutil/libmemutil.so: mach-o, but wrong architecture
[Condition of type SIMPLE-ERROR]
FYI, my *FEATURES* is:
(:KMR-NORMAL-DSDC :KMR-NORMAL-CESD :KMR-MOP :ASDF :PRIMARY-CLASSES :COMMON-LISP :OPENMCL :CLOZURE :ANSI-CL :UNIX :OPENMCL-NATIVE-THREADS :OPENMCL-PARTIAL-MOP :MCL-COMMON-MOP-SUBSET :OPENMCL-MOP-2 :OPENMCL-PRIVATE-HASH-TABLES :OPENMCL-HASH-CONSING :X86-64 :X86-64 :X86-TARGET :X86-HOST :X8664-TARGET :X8664-HOST :DARWIN-HOST :DARWIN-TARGET :DARWINX86-TARGET :DARWINX8664-TARGET :DARWINX8664-HOST :POWEROPEN-TARGET :64-BIT-TARGET :64-BIT-HOST :LITTLE-ENDIAN-TARGET :LITTLE-ENDIAN-HOST :MCL)
I don't really know why it cannot load the shared library. I don't know if the problem is basically a compat issue with this CVS version of OpenMCL in this architecture and/or UFFI. However, I thought I would share this just in case anyone has information that could speed this process or any suggestions of what I may try next.
More information about the elephant-devel