Shared library for Mac(Mach-O) /w LW

Jong-won Choi <jc-xSFJPxfsWWz7Za/[email protected]>
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Hi

To run CLSQL with LW Mac, following two lines in clsql/uffi/make.sh
should be changed:

ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o
$BASE.dylib $OBJECT
ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress
/usr/lib/libz.dylib -o z.dylib
->
cc -dynamiclib /usr/lib/bundle1.o -flat_namespace -undefined suppress -o
$BASE.dylib $OBJECT
cc -dynamiclib /usr/lib/bundle1.o -flat_namespace -undefined suppress
/usr/lib/libz.dylib -o z.dylib

Though I'm not a Mac expert, it seems they are two quite different
things. Shared libraries have (usually) extension '.dylib' and loadable
modules have extension '.so'. And CLSQL only successfuly runs with
shared library(comes from -dynamiclib option) on LW Mac.

Based on the extesion(.dylib) in the make.sh, I guess the author of
CLSQL wanted to use dynamic library(not loadable module).

Also, there is a similar problem in Postgresql - no libpq.dylib but only
libpq.so(loadable module). So to use Postgresql with LW Mac + CLSQL(with
above change), need to compile libpq.dylib similar way.

With those changes CLSQL runs pretty well on LW Mac.

(I spent a half day to figure this out, and don't want to make other
guys waste time on the same problem)

Cheers

Jong-won Choi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.