On Thu, Nov 21, 2013 at 06:26:14AM -0800, Rajesh wrote: > Thanks James and Dimitri for your quick reply. > > As such I dont have any more versions installed in my machine other than the > 2.3.2 source compiled version. > > However, to be more precise on the issue, I have recompiled one more time, > and this time with all the dependencies starting from wxwidgets, eigen, gtk > etc., > > Please note I use 64 bit CentOS release 6.3 (Final) > > I have used 2.3.2 source code from which I have compiled two difference > versions one with SWIG turned on and other without SWIG. > > Commands I have used to generate binaries were : > > cmake ../openbabel-2.3.2 > -DCMAKE_INSTALL_PREFIX=~/Tools/Rajesh/openbabel-install31 -DJAVA_BINDINGS=ON > -DEIGEN2_INCLUDE_DIR=/opt/babecompiler/eigen-eigen-b23437e61a07 > -DRUN_SWIG=ON -DSWIG_EXECUTABLE=/usr/bin/swig > > cmake ../openbabel-2.3.2 > -DCMAKE_INSTALL_PREFIX=~/Tools/Rajesh/openbabel-install312 > -DJAVA_BINDINGS=ON > -DEIGEN2_INCLUDE_DIR=/opt/babecompiler/eigen-eigen-b23437e61a07 > > Upon installation, I have compiled and executed OBTest.java to validate java > binding. Unfortunately, it said "Benzene has 0 atoms" even after preloading > libopenbabel.so > > [root@localhost lib]# LD_PRELOAD=libopenbabel.so java OBTest > Running OBTest... > Benzene has 0 atoms. > > This shows even though both these versions generates babel binaries, none of > them produces valid java binding file ( libopenbabel_java.so / > libopenbabel_java.so ), atleast in my case.
Make sure Open Babel finds its plugins and data files. Manual has listed all the variables you can set to influence that [1]. Usually if `obabel -L formats` lists all of the formats you built then also bindings should work in that environment. ~$ CLASSPATH="$OB_JAVADIR/openbabel.jar" LD_LIBRARY_PATH="$OB_JAVADIR" javac OBTest.java ~$ CLASSPATH=".:$OB_JAVADIR/openbabel.jar" LD_LIBRARY_PATH="$OB_JAVADIR" java OBTest Running OBTest... Benzene has 6 atoms. Reinis [1] http://openbabel.org/docs/dev/Installation/install.html ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss