[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool $libs question
From: |
Peter O'Gorman |
Subject: |
Re: libtool $libs question |
Date: |
Thu, 29 Jul 2004 07:54:56 +0900 |
User-agent: |
Mozilla Thunderbird 0.6 (Macintosh/20040502) |
Chris Burdess wrote:
I need a bit of help fixing the JNI build for gnujaxp, perhaps someone
familiar with libtool could comment:
All goes well until the link step. Then, under Darwin, I'm issuing the
following:
/bin/sh ./libtool --mode=link gcc -shared -rpath /usr/local/lib
-release 0.99 -export-dynamic -D_JNI_IMPLEMENTATION_ -L/usr/local/lib
-lxslt -lxml2 -lz -lpthread -liconv -lm -shrext .jnilib -o libxmlj.la
xmlj_dom.lo xmlj_error.lo xmlj_io.lo xmlj_node.lo xmlj_sax.lo
xmlj_transform.lo xmlj_util.lo xmlj_xpath.lo
libtool converts this to
gcc -dynamiclib -flat_namespace -undefined suppress -o
.libs/libxmlj-0.99.jnilib .libs/xmlj_dom.o .libs/xmlj_error.o
.libs/xmlj_io.o .libs/xmlj_node.o .libs/xmlj_sax.o
.libs/xmlj_transform.o .libs/xmlj_util.o .libs/xmlj_xpath.o
-L/usr/local/lib /usr/local/lib/libxslt.dylib /usr/lib/libm.dylib
/usr/local/lib/libxml2.dylib /usr/lib/libpthread.dylib
/usr/lib/libz.dylib -lz -lpthread /usr/lib/libiconv.dylib -lm
-install_name /usr/local/lib/libxmlj-0.99.jnilib
Problem is, this is wrong, and results in an unlinkable shared object.
How do I get libtool to leave the -l arguments alone?
What's wrong with it exactly? This is on a Mac OS X/darwin system, right?
Since it looks like you are building a loadable java extension, you might
like to try the -module flag. -export-dynamic is meant (as far as I know)
for building executables, it allows the executables global symbols to be
made available to modules.
Hope this helps,
Peter
--
Peter O'Gorman - http://www.pogma.com