[elephant-devel] "file is not of required architecture"

Sebastian Tennant sebyte at smolny.plus.com
Mon Nov 9 21:51:41 UTC 2009


Hi list,

elephant-1.0            (git)
SBCL                    (git)
Intel Core 2 Duo        MacOS X Leopard

I built and installed BerkeleyDB 4.5 as per /src/contrib/henrik's script.  It
compiled prefectly cleanly, withtout any problems at all.

my-config.sexp reads:

 ((:compiler . :gcc)
  (:berkeley-db-version . "4.5")
  (:berkeley-db-include-dir . "/usr/local/BerkeleyDB.4.5/include/")
  (:berkeley-db-lib-dir . "/usr/local/BerkeleyDB.4.5/lib/")
  (:berkeley-db-lib . "/usr/local/BerkeleyDB.4.5/lib/libdb-4.5.dylib")
  (:berkeley-db-deadlock . "/usr/local/BerkeleyDB.4.5/bin/db_deadlock")
  (:berkeley-db-cachesize . 20971520)
  (:berkeley-db-max-locks . 2000)
  (:berkeley-db-max-objects . 2000)
  (:berkeley-db-map-degree2 . t)
  (:berkeley-db-mvcc . nil)
  (:clsql-lib-paths . nil)
  (:prebuilt-libraries . nil))

I get the following error when I try and open a store:

 (asdf:operate 'asdf:load-op 'elephant)
 (use-package :elephant)
 (defconstant +store+ '(:BDB #p"/path/to/my/store/"))
 (open-store +store+)

 ;;; => erred while invoking #<COMPILE-OP NIL {1003FF3A01}> on
 ;;;    #<BDB-C-SOURCE "libberkeley-db" {1003FDF6F1}>
 ;;;       [Condition of type ASDF:OPERATION-ERROR]

Full text of error:

 Attempting to load libmemutil.dylib...
 Loaded /Users/admin/cl/clbuild/source/elephant/src/memutil/libmemutil.dylib
 ; $ gcc -L/usr/local/BerkeleyDB.4.5/lib/ -I/usr/local/BerkeleyDB.4.5/include/ -bundle -arch x86_64 -fPIC -Wall -g -O2 -g /Users/admin/cl/clbuild/source/elephant/src/db-bdb/libberkeley-db.c -o
 /Users/admin/cl/clbuild/source/elephant/src/db-bdb/libberkeley-db.dylib -lm -ldb-4.5
 /Users/admin/cl/clbuild/source/elephant/src/db-bdb/libberkeley-db.c: In function ‘lisp_compare2’:
 /Users/admin/cl/clbuild/source/elephant/src/db-bdb/libberkeley-db.c:1061: warning: unused variable ‘i’
 /Users/admin/cl/clbuild/source/elephant/src/db-bdb/libberkeley-db.c: In function ‘lisp_compare_key2’:
 /Users/admin/cl/clbuild/source/elephant/src/db-bdb/libberkeley-db.c:1155: warning: unused variable ‘i’
 ld warning: in /usr/local/BerkeleyDB.4.5/lib//libdb-4.5.dylib, file is not of required architecture
 Undefined symbols:                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   "_db_env_create", referenced from:
       _db_env_cr in cc1XG9uq.o
   "_db_strerror", referenced from:
       _db_strerr in cc1XG9uq.o
   "_db_create", referenced from:
       _db_cr in cc1XG9uq.o
   "_db_sequence_create", referenced from:
       _db_sequence_create2 in cc1XG9uq.o
 ld: symbol(s) not found
 collect2: ld returned 1 exit status
 erred while invoking #<COMPILE-OP NIL {1003FF3A01}> on
 #<BDB-C-SOURCE "libberkeley-db" {1003FDF6F1}>
    [Condition of type ASDF:OPERATION-ERROR]

Inspection shows:

 $ file /usr/local/BerkeleyDB.4.5/lib/libdb-4.5.dylib
 libdb-4.5.dylib: Mach-O dynamically linked shared library i386

But:

 $ file ~/clbuild/source/elephant/src/memutil/libmemutil.dylib
 libmemutil.dylib: Mach-O 64-bit bundle x86_64

so I wonder if there's a way to tell BDB to build 64-bit dynamic libraries, or
if that's even the problem.

Any help/tips/pointers much appreciated.

For instance, how to test my BerkeleyDB installation without using elephant?

Regards,

Seb
--
Emacs' AlsaPlayer - Music Without Jolts
Lightweight, full-featured and mindful of your idyllic happiness.
http://home.gna.org/eap





More information about the elephant-devel mailing list