[elephant-devel] 0.6.1 / OpenMCL / BDB

lists at infoway.net lists at infoway.net
Mon Feb 5 16:53:52 UTC 2007


Ian,

Sorry for the delay. I've been way too busy lately.

Anyway, I made another attempt after getting the latest CVS of Elephant and BDB 4.5. Elephant loaded just fine as you also experienced. I compiled BDB with CFLAGS="-arch x86_64" and LDFLAGS="-arch x86_64" in order to compile it for 64-bit. It compiled just fine and seems to run the Berkely test suite just fine.

However, after several attempts and tweaks, when I try loading :ele-bdb, I keep getting stuck here:

/Users/dev/lisp/elephant/src/db-bdb/libberkeley-db.c: In function 'db_set_dup_compare':
/Users/dev/lisp/elephant/src/db-bdb/libberkeley-db.c:820: error: 'struct __db' has no member named 'set_dup_compare'
/Users/dev/lisp/elephant/src/db-bdb/libberkeley-db.c: In function 'db_set_lisp_compare':
/Users/dev/lisp/elephant/src/db-bdb/libberkeley-db.c:1129: error: 'struct __db' has no member named 'set_bt_compare'
/Users/dev/lisp/elephant/src/db-bdb/libberkeley-db.c:1131: error: 'struct __db' has no member named 'set_bt_compare'
/Users/dev/lisp/elephant/src/db-bdb/libberkeley-db.c: In function 'db_set_lisp_dup_compare':
/Users/dev/lisp/elephant/src/db-bdb/libberkeley-db.c:1138: error: 'struct __db' has no member named 'set_dup_compare'
/Users/dev/lisp/elephant/src/db-bdb/libberkeley-db.c:1140: error: 'struct __db' has no member named 'set_dup_compare'


erred while invoking #<COMPILE-OP NIL #x30004114D59D> on
#<BDB-C-SOURCE "libberkeley-db" #x30004115093D>
   [Condition of type ASDF:OPERATION-ERROR]

Restarts:
 0: [RETRY] Retry performing #<COMPILE-OP NIL #x30004114D59D> on #<BDB-C-SOURCE "libberkeley-db" #x30004115093D>.
 1: [ACCEPT] Continue, treating #<COMPILE-OP NIL #x30004114D59D> on #<BDB-C-SOURCE "libberkeley-db" #x30004115093D> as having been successful.
 2: [ABORT] Return to SLIME's top level.
 3: [ABORT-BREAK] Reset this process
 4: [ABORT] Kill this process

Backtrace:
  0: (#<STANDARD-METHOD ASDF:PERFORM (ASDF:COMPILE-OP
                                     ELEPHANT-SYSTEM:ELEPHANT-C-SOURCE)> #<COMPILE-OP NIL #x30004114D59D>)
  1: (CCL::%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE '(NIL
       #<STANDARD-METHOD ASDF:PERFORM (ASDF:COMPILE-OP
                                       ELEPHANT-SYSTEM:ELEPHANT-C-SOURCE)>
       . 6095616))
  2: (CCL::%%STANDARD-COMBINED-METHOD-DCODE '(#<RESTART ASDF:RETRY #x421758D> #<RESTART ASDF:ACCEPT #x42175DD>) #<RESTART ASDF:RETRY #x421758D>)
  3: (ASDF:OPERATE 'ASDF:LOAD-OP ':ELE-BDB)
  4: (CCL::CALL-CHECK-REGS 'ASDF:OOS)

Any ideas?

Thanks.
Daniel

On Wed, January 31, 2007 5:32 pm, Ian Eslick <eslick at csail.mit.edu> said:

> I can get OpenMCL 1.1 to compile build and launch, but BDB cannot
> open a newly created DB in open-store-controller.  I'm wondering if
> this is due to UFFI's handling of types such that we're getting 32-
> bit instead of 64-bit pointers out of the underlying C API (int vs.
> long)?
> 
> The steps to getting this far are:
> OpenMCL 1.1 for x86-64
> Configure and compile BDB 4.5 with -arch x86_64
>     (something like: env LDFLAGS="-arch x86_64" CFLAGS="-arch x86_64"
> configure from build_unix)
> Latest Elephant 0.6.1 from CVS (as of 1/31/07)
> 
> Daniel, want to take another crack at this?
> 
> Thanks,
> Ian
> 
> On Jan 24, 2007, at 11:22 AM, lists at infoway.net 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 at common-lisp.net
>> http://common-lisp.net/mailman/listinfo/elephant-devel
> 
> 




More information about the elephant-devel mailing list