Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java bindings undefined symbol: _ZTVN9OpenBabel30OBMinimizingRMSDConformerScoreE #1868

Closed
1 task
kmvinoth opened this issue Jul 13, 2018 · 2 comments
Closed
1 task

Comments

@kmvinoth
Copy link

kmvinoth commented Jul 13, 2018

  • [*] I believe this to be a bug with Open Babel
  • This is a feature request

Environment Information

Open Babel version: 2.4.0
Operating system and version: Ubuntu 16.04

Actual Behavior

I am using openbabel in my java application(app). I want to distribute my application as jar file(app.jar). My jar file library contains openbabel.jar and other jar files required for the application to run in the lib directory.

I complied java bindings for openbabel using the command

sudo cmake /home/vin/openbabel2.4 
-DCMAKE_INSTALL_PREFIX=~/Tools 
-DCMAKE_BUILD_TYPE=DEBUG  
-DJAVA_BINDINGS=ON 
-DEIGEN3_INCLUDE_DIR=/home/vin/Eigen3 
-DSWIG_EXECUTABLE=/usr/bin/swig 
-DRUN_SWIG=ON
sudo make

The compilation went well and took the libopenbabel_java.so and libopenbabel.so from the build directory and packed it along with my application in the directory (app/rescources) and specified the path to the app/resources directory in the source code (system.load("/home/vin/app/resources/libopenbabel_java.so")) of my application for performing an openbabel task.

When I run my application jar file (app.jar) and perform an openbabel task (generate conformers) I am getting the below error

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: /home/praktikant/OPAS_ALPHA_1.0/resources/libopenbabel_java.so: /home/praktikant/OPAS_ALPHA_1.0/resources/libopenbabel_java.so: undefined symbol: _ZTVN9OpenBabel30OBMinimizingRMSDConformerScoreE

I am not sure that it is a bug in openbabel or am I missing something in the java bindings compilation? I have attached the CMakeCache.txt
CMakeCache.txt

I also looked into the Java bindings trouble #1102 in the issues, it is some what close but not exactly the same. Thank you for your time.

@baoilleach
Copy link
Member

Using "sudo" for anything except the installation step is a mistake. It can lead to all sorts of problems that I am not going to debug.

If you start over, avoid sudo, and send us the command-line, the CMakeCache.txt and output of make, we can take it from there. I note in passing that the CMakeCache.txt that you appended does not correspond to the command-line above (e.g. different PATHs).

@ghutchis
Copy link
Member

ghutchis commented May 7, 2020

Please try this with the latest build (3.1) - open a new issue if you still have a problem. I'm going to mark this closed.

@ghutchis ghutchis closed this as completed May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants