libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool $libs question


From: Chris Burdess
Subject: Re: libtool $libs question
Date: Thu, 29 Jul 2004 19:41:41 +0100

Peter O'Gorman 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.

Thanks for the reply. Under Darwin, -module ends up as -bundle, which is not appropriate for a JNI library (?) but you're right, I don't need -export-dynamic.

I've tracked down the problem - it's not the rewriting of $libs that causes it, it's compiling against an incompatible version of jni.h.

Thanks anyway
--
Chris Burdess





reply via email to

[Prev in Thread] Current Thread [Next in Thread]