|
From: Luigi B. <lui...@gm...> - 2019-07-03 12:49:31
|
On some systems, you might need to run "sudo ldconfig" after you install QuantLib (and before that, to make sure that the location of the libraries is listed somewhere in /etc/ld.so.conf or /etc/ld.so.conf.d). Apart from this, I'm all out of ideas... Luigi On Tue, Jul 2, 2019 at 11:43 PM Banerjee, Tapas K via QuantLib-dev < qua...@li...> wrote: > > > Hi Luigi & Qlib experts. > > > > As you suggested, I downloaded did FRESH install for quantlib, > quantlib-SWIF-1.15 > > Could able to build C++ .so, wrapper class libQuantLibJNI.so and > QuantLib.jar > > Make file issues resolved now. > > > > But, When I run make check, all example files compiled fine, while running > I get the same error > > > > *Exception in thread "main" java.lang.UnsatisfiedLinkError: > /home/myID/new_qlib/QuantLib-SWIG-1.15/Java/libQuantLibJNI.so: > /home/myID/new_qlib/QuantLib-SWIG-1.15/Java/libQuantLibJNI.so: undefined > symbol: _ZNK8QuantLib13TermStructure13referenceDateEv* > > > > Q: ibQuantLibJNI.so and QuantLib.jar exists in /Java dir as well as > /home/v574933/new_qlib/lib > > where my LD_LIBRRAY PATH is set > > > > What could be the issue? Any other trace I can try to pinpoint issue? > > > > Thanks, > > > > */home/myID/new_qlib/QuantLib-SWIG-1.15/Java* > > *bash-4.1$ ls *Qua** > > *libQuantLibJNI.so QuantLib.jar* > > > > */home/myID/new_qlib/QuantLib-SWIG-1.15/Java* > > *bash-4.1$ make check* > > *make check-am* > > *make[1]: Entering directory `/home/myID/new_qlib/QuantLib-SWIG-1.15/Java'* > > *make check-local* > > *make[2]: Entering directory `/home/myID/new_qlib/QuantLib-SWIG-1.15/Java'* > > */apps/icrd/java/jdk1.8.0.71/bin//javac -cp QuantLib.jar > examples/Bonds.java* > > */apps/icrd/java/jdk1.8.0.71/bin//javac -cp QuantLib.jar > examples/CallableBonds.java* > > */apps/icrd/java/jdk1.8.0.71/bin//javac -cp QuantLib.jar > examples/CallableBondsOAS.java* > > */apps/icrd/java/jdk1.8.0.71/bin//javac -cp QuantLib.jar > examples/DiscreteHedging.java* > > */apps/icrd/java/jdk1.8.0.71/bin//javac -cp QuantLib.jar > examples/EquityOptions.java* > > */apps/icrd/java/jdk1.8.0.71/bin//javac -cp QuantLib.jar > examples/FRA.java* > > */apps/icrd/java/jdk1.8.0.71/bin//javac -cp QuantLib.jar > examples/UnaryFunctions.java* > > *LD_LIBRARY_PATH=. /apps/icrd/java/jdk1.8.0.71/bin//java -cp > ".:QuantLib.jar" examples.Bonds* > > *Exception in thread "main" java.lang.UnsatisfiedLinkError: > /home/myID/new_qlib/QuantLib-SWIG-1.15/Java/libQuantLibJNI.so: > /home/myID/new_qlib/QuantLib-SWIG-1.15/Java/libQuantLibJNI.so: undefined > symbol: _ZNK8QuantLib13TermStructure13referenceDateEv* > > *at java.lang.ClassLoader$NativeLibrary.load(Native Method)* > > * at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)* > > * at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)* > > > > > > *From:* Luigi Ballabio [mailto:lui...@gm...] > *Sent:* Tuesday, July 02, 2019 10:40 AM > *To:* Banerjee, Tapas K <tap...@jp...> > *Cc:* QuantLib developers <qua...@li...> > *Subject:* Re: [Quantlib-dev] Help! Quantlib Java SWIG build issue > > > > Try running "make check" in QuantLib-SWIG/Java. It will try to run the > examples. If it works, you can try to see what it does differently... > > > > Luigi > > > > > > On Tue, Jul 2, 2019 at 4:31 PM Banerjee, Tapas K via QuantLib-dev < > qua...@li...> wrote: > > Hi Luigi, > > > > Thanks for your response . I set *LD_LIBRARY_PATH * before. > > Again tried, but no luck. (See below). > > > > Can version of library , g++/Linux cause this issue? Any other ideas I > can try? > > I am using QuantLib-SWIG-1.15, QuantLib--1.15, boost_1_68_0, *gcc version > 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)* > > > > *bash-4.1$ LD_LIBRARY_PATH=/home/v574933/quantlib/qlib/lib* > > *bash-4.1$ export LD_LIBRARY_PATH* > > *bash-4.1$ echo $LD_LIBRARY_PATH* > > > > *Exception in thread "main" java.lang.UnsatisfiedLinkError: > /home/v574933/quantlib/qlib/lib/libQuantLibJNI.so > <http://libQuantLibJNI.so>: > /home/v574933/quantlib/qlib/lib/libQuantLibJNI.so > <http://libQuantLibJNI.so>: undefined symbol: * > *_ZNK8QuantLib13TermStructure13referenceDateEv* > > > > > > *From:* Luigi Ballabio [mailto:lui...@gm...] > *Sent:* Tuesday, July 02, 2019 4:59 AM > *To:* Tapas Banerjee <ta...@ao...> > *Cc:* QuantLib developers <qua...@li...> > *Subject:* Re: [Quantlib-dev] Help! Quantlib Java SWIG build issue > > > > Try setting the environment variable LD_LIBRARY_PATH to <base-dir>/ > quantlib/qlib/lib > > > > Luigi > > > > > > On Tue, Jul 2, 2019 at 3:56 AM Tapas Banerjee via QuantLib-dev < > qua...@li...> wrote: > > > > Hi Luigi & experts, > > > > I need urgent help to build Quantlib SWIG for Java > > > > Using the step mentioned here > > https://sourceforge.net/p/quantlib/mailman/message/19608067/ > > I could build libQuantLibJNI.so, libQuantLib.so, QuantLib.jar suecssfully > > > > But while running example file, I am getting below error.. Any idea - what > I am doing wrong and how to fix? > > > > > > *_ZNK8QuantLib13TermStructure13referenceDateEv ......* > > > > *when I load System.loadLibrary("QuantLibJNI");* > > > > > > I created below simple example call stripping all Quantlib include, still > getting error > > > > > > ----- > > bash-4.1$ java -cp ./QuantLib.jar:. -Djava.library.path=/<base-dir>/quantlib/qlib/lib > ex.Test > > *Exception in thread "main" java.lang.UnsatisfiedLinkError: > /libQuantLibJNI.so <http://libQuantLibJNI.so>: / /libQuantLibJNI.so > <http://libQuantLibJNI.so>: undefined > symbol:_ZNK8QuantLib13TermStructure13referenceDateEv* > > * at java.lang.ClassLoader$NativeLibrary.load(Native Method)* > > * at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)* > > This message is confidential and subject to terms at: > https://www.jpmorgan.com/emaildisclaimer including on confidential, > privileged or legal entity information, viruses and monitoring of > electronic messages. If you are not the intended recipient, please delete > this message and notify the sender immediately. Any unauthorized use is > strictly prohibited. > > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > This message is confidential and subject to terms at: > https://www.jpmorgan.com/emaildisclaimer including on confidential, > privileged or legal entity information, viruses and monitoring of > electronic messages. If you are not the intended recipient, please delete > this message and notify the sender immediately. Any unauthorized use is > strictly prohibited. > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > |