I finally figured out what was going on. I hadn't realized that 1.1
was only a x86_64 distribution (will only work on the new Core 2 Duo
Intel chips or old PPC chips).
So there's a nice set of problems:
OpenMCL needs to link to 64-bit libraries, so we need to build 64-bit
versions of libmemutil and libberkeley-db.
So in elephant.asd we need to add a line to the gcc compiler options:
(list
#-(or darwin macosx darwin-host) "-shared"
#+(or darwin macosx darwin-host) "-bundle"
#+(or x8664-target) "-arch x86_64"
"-Wall"
"-fPIC"
"-O3"
"-o" output-file
input-file
"-lm"))
So that's great and I can load libmemutil without a problem.
However, when it comes time to load ele-bdb, you also need a 64-bit
version of berkeley db for the -ldb option, so you're going to need
to build or download a 64-bit version of that.
I don't have time to do that just now, but if you want to give that a
try and let me know how it works that would be helpful!
Ian
On Jan 24, 2007, at 11:22 AM, [EMAIL PROTECTED] wrote:
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:
_main
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"))
(list
#-(or openmcl darwin macosx) "-shared"
#+(or openmcl darwin macosx) "-bundle"
"-Wall"
"-fPIC"
"-O3"
"-o" output-file
input-file
"-lm"))
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.
Thanks,
Daniel
_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel
_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel