Bugs item #3286756, was opened at 2011-04-14 22:22
Message generated for change (Tracker Item Submitted) made by 
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3286756&group_id=40728

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library Functions
Group: 2.3.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Martin Kamp Jensen ()
Assigned to: Nobody/Anonymous (nobody)
Summary: Java bindings trouble

Initial Comment:
There are serious problems with the Java bindings. It took me quite a while to 
get them working in both Linux and Mac OS. In Windows 7 x64 I had no problems. 
I just needed openbabel_java.dll from the OpenBabelGUI package to be in 
java.library.path.

Mac OS: I built the Java bindings using the instructions at [1] (including 
using Eigen2). However, it turns out that it is not sufficient to just place 
the resulting libopenbabel_java.so file in java.library.path. It needs to be 
renamed to libopenbabel_java.jnilib and the (advanced) instructions at [2] need 
to be followed because apparently there is some setup/compile glitch regarding 
where the compiled .so file will think its required library files are located.

Linux: Using "ld" I could see that the glitch from above is also present in 
Linux. I did not find a tool similar to "install_name_tool" so instead I found 
out that I needed to follow the instructions in the Java README [3]. There is a 
typo (openbabel_java.cpp needs to be openbabel-java.cpp) and there will be 
complaining about a "babelconfig.h" file which I copied from the build 
directory created using CMake as described in [4]. In the end, the resulting 
libopenbabel_java.so file needs to be in java.library.path and I needed to do 
the LD_PRELOAD trick.

To sum up, I think that there is room for improvement :) Thanks for your work 
so far!

[1] http://openbabel.org/docs/2.3.0/Installation/install.html#compile-bindings
[2] 
http://forums.openbabel.org/help-segmentation-fault-with-Pybel-on-Mac-OS-x-td3327036.html
[3] openbabel-2.3.0/scripts/java/README in openbabel-2.3.0.tar.gz
[4] 
http://openbabel.org/docs/2.3.0/Installation/install.html#basic-build-procedure

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3286756&group_id=40728

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to