RE: [Quickfix-developers] JNI dynamic linking problems on Solaris
Brought to you by:
orenmnero
From: Chuck H. <zzc...@xc...> - 2003-03-10 20:06:33
|
I tried adding -lgcc, but libtool complains that it doesn't exist (it = exists as a static library down in = /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3). Do I need a shared = library version of libgcc.a? Below is the libtools call. =20 Thanks - Chuck =20 /bin/sh ../../libtool --mode=3Dlink c++ -fexceptions -Wall = -I/usr/local/include/s tlport -I/usr/local/include/libxml2 -I/usr/j2se/include = -I/usr/j2se/include/sol aris -o libquickfix_jni.la -rpath /usr/local/lib -version-info 0:1:0 = JVM.lo Con versions.lo JavaApplication.lo JavaLog.lo JavaLogFactory.lo = JavaMessageStore.lo JavaMessageStoreFactory.lo org_quickfix_FileStore.lo = org_quickfix_FileStoreFacto ry.lo org_quickfix_FileLog.lo org_quickfix_FileLogFactory.lo = org_quickfix_Group. lo org_quickfix_MemoryStore.lo org_quickfix_Message.lo = org_quickfix_MySQLStore.l o org_quickfix_MySQLStoreFactory.lo org_quickfix_MySQLLog.lo = org_quickfix_MySQLL ogFactory.lo org_quickfix_ScreenLog.lo org_quickfix_ScreenLogFactory.lo = org_quic kfix_Session.lo org_quickfix_SessionID.lo org_quickfix_Settings.lo = org_quickfix_ SocketAcceptor.lo org_quickfix_SocketInitiator.lo = org_quickfix_ThreadedSocketAcc eptor.lo org_quickfix_ThreadedSocketInitiator.lo -L../../src/C++ = -lquickfix -lst dc++ -lgcc -L/usr/local/lib -lstlport_gcc -L/usr/local/lib = -R/usr/local/lib -lxm l2 -lz -lm -lsocket -lnsl -liberty rm -fr .libs/libquickfix_jni.la .libs/libquickfix_jni.* = .libs/libquickfix_jni.* =20 *** Warning: This library needs some functionality provided by = -lquickfix. *** I have the capability to make that library automatically link in = when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. =20 *** Warning: This library needs some functionality provided by -lgcc. *** I have the capability to make that library automatically link in = when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it. /usr/ccs/bin/ld -G -h libquickfix_jni.so.0 -o = .libs/libquickfix_jni.so.0.0.1 JV M.lo Conversions.lo JavaApplication.lo JavaLog.lo JavaLogFactory.lo = JavaMessageS tore.lo JavaMessageStoreFactory.lo org_quickfix_FileStore.lo = org_quickfix_FileSt oreFactory.lo org_quickfix_FileLog.lo org_quickfix_FileLogFactory.lo = org_quickfi x_Group.lo org_quickfix_MemoryStore.lo org_quickfix_Message.lo = org_quickfix_MySQ LStore.lo org_quickfix_MySQLStoreFactory.lo org_quickfix_MySQLLog.lo = org_quickfi x_MySQLLogFactory.lo org_quickfix_ScreenLog.lo = org_quickfix_ScreenLogFactory.lo org_quickfix_Session.lo org_quickfix_SessionID.lo = org_quickfix_Settings.lo org_q uickfix_SocketAcceptor.lo org_quickfix_SocketInitiator.lo = org_quickfix_ThreadedS ocketAcceptor.lo org_quickfix_ThreadedSocketInitiator.lo = -L../../src/C++ -lstdc ++ -L/usr/local/lib -lstlport_gcc -lxml2 -lz -lm -lsocket -lnsl -liberty = -lc (cd .libs && rm -f libquickfix_jni.so.0 && ln -s = libquickfix_jni.so.0.0.1 libqui ckfix_jni.so.0) (cd .libs && rm -f libquickfix_jni.so && ln -s libquickfix_jni.so.0.0.1 = libquick fix_jni.so) ar cru .libs/libquickfix_jni.a JVM.o Conversions.o JavaApplication.o = JavaLog.o JavaLogFactory.o JavaMessageStore.o JavaMessageStoreFactory.o = org_quickfix_FileS tore.o org_quickfix_FileStoreFactory.o org_quickfix_FileLog.o = org_quickfix_FileL ogFactory.o org_quickfix_Group.o org_quickfix_MemoryStore.o = org_quickfix_Message .o org_quickfix_MySQLStore.o org_quickfix_MySQLStoreFactory.o = org_quickfix_MySQL Log.o org_quickfix_MySQLLogFactory.o org_quickfix_ScreenLog.o = org_quickfix_Scree nLogFactory.o org_quickfix_Session.o org_quickfix_SessionID.o = org_quickfix_Setti ngs.o org_quickfix_SocketAcceptor.o org_quickfix_SocketInitiator.o = org_quickfix_ ThreadedSocketAcceptor.o org_quickfix_ThreadedSocketInitiator.o ranlib .libs/libquickfix_jni.a creating libquickfix_jni.la (cd .libs && rm -f libquickfix_jni.la && ln -s ../libquickfix_jni.la = libquickfix _jni.la) rm -f ../../lib/libquickfix_jni.so ln -s ../src/java/.libs/libquickfix_jni.so ../../lib/libquickfix_jni.so -----Original Message----- From: Oren Miller [mailto:ore...@ya...] Sent: Friday, March 07, 2003 5:56 PM To: Chuck Houpt; qui...@li... Subject: Re: [Quickfix-developers] JNI dynamic linking problems on = Solaris You should be able to fix this by adding -lgcc to the = libquickfix_jni_la_LIBADD line in the src/java Makefile.am. You will = then need to relink.=20 Chuck Houpt <zzc...@xc...> wrote:=20 Thanks to Bud and Oren, I've got quickfix bootstrapped, configure, build = and installed on Solaris (gcc 2.95.3+stlport). The cpp programs seem to = run fine, but I'm still having trouble getting the java programs to run. I'm now getting the same error messages that Gary Mui was seeing in = October. Was a solution to this found? Thanks - Chuck From:=20 trouble running JNI example on Solaris=20 2002-10-30 14:22=20 I seem to be having some problems with JNI under Solaris. I think I got everything compiled successfully and I can run the C++ version of executor. But when I try running the java version, I get the following: Exception in thread "main" java.lang.UnsatisfiedLinkError: /u03/export/home/gmui/build/quickfix/src/java/.libs/libquickfix_jni.so.0.= 0.1: ld.so.1: /usr/bin/../java/bin/../bin/sparc/native_threads/java: = fatal: relocation error: file /u03/export/home/gmui/build/quick fix/src/java/.libs/libquickfix_jni.so.0.0.1: symbol __pure_virtual: referenced symbol not found at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1419) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1343) at java.lang.Runtime.loadLibrary0(Runtime.java:749) at java.lang.System.loadLibrary(System.java:820) at Executor.(Executor.java:58) |