views:

185

answers:

4

I have SBCL installed (via macports/darwinports) on my Intel Core 2 Duo Macbook running 10.5.8. I've installed several libraries like this:

(require 'asdf)
(require 'asdf-install)
(asdf-install:install 'cl-who)

But when I tried to install CLSQL this way ('clsql) after it downloaded, I got this:

...
; registering #<SYSTEM CLSQL-UFFI {123D9E01}> as CLSQL-UFFI
; $ cd /Users/ken/.sbcl/site/clsql-5.0.5/uffi/; make
cc -arch x86_64 -arch i386 -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress clsql_uffi.c -o clsql_uffi.dylib
ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/bundle1.o for architecture i386
ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/bundle1.o for architecture x86_64
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/Nf/Nf4o5ArDFaWBH2OwtnWM3E+++TQ/-Tmp-//ccJyZxou.out (No such file or directory)
make: *** [clsql_uffi.so] Error 1

Is there something I forgot, or some trick to get it to build on Mac OS X? I know very little about C libraries on the Mac these days, so I don't even know where to start on this.

Thanks!

+1  A: 

There are instructions here, have you done all of the preparation steps?

Amos
A: 

I'm having the same issue. Anyone have any ideas? The issue seems to be with the compilation of the shared libraries. Running the make file for both uffi (dependency) and clsql should be creating shared objects (clsql_uffi.so and clsql_mysql.so respectively). The error seems to be:

ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/bundle1.o for architecture i386
ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/bundle1.o for architecture x86_64

Kind of an old question, but it would be nice to get an answer. And yes, I did rtfm.

blazeprogrammer
A: 

Progress: inspired by this Asterisk bug report ("Including bundle1.o breaks Tiger and Leopard"), I removed -bundle /usr/lib/bundle1.o from all 4 places in ~/.sbcl/site/clsql-5.1.1/uffi/Makefile and reinstalled, and it got further before dying.

I'm now seeing:

debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread" RUNNING {1193E621}>:
  Couldn't load foreign library "clsql_uffi". (searched CLSQL-SYS:*FOREIGN-LIBRARY-SEARCH-PATHS*)

This is kind of bizarre, since:

  • clsql-sys:*foreign-library-search-paths* is (#P"/Users/ken/.sbcl/site/clsql-5.1.1/uffi/")

  • clsql-uffi-loader.lisp tries all of (uffi:foreign-library-types), which is ("dylib" "bundle")

  • there is a ~/.sbcl/site/clsql-5.1.1/uffi/clsql_uffi.dylib file built by the makefile

Ideas?

Ken
A: 

Did you get this resolved? I have seen there is a Macports problem installing/building libffcall ... which rather takes the fun out of things, I think ...

Tom Winans
Not sure but believe there is a dependency upon this lib ... macports breaks for me when installing it. Cannot seem to get cffi or uffi to play nice at present.
Tom Winans
Nope, never did get it figured out. When I have a little free time I'm going to install Debian in a Virtualbox and use that instead. I think the open-source Lisp community only cares about Linux, so I'll go there.
Ken