Geoff,

It did the trick. No apparent missing dependencies anymore.
Great catch!
Thanks a lot,

Nick 

-----Original Message-----
From: Geoffrey Hutchison [mailto:geoff.hutchi...@gmail.com] 
Sent: Tuesday, April 09, 2013 6:50 PM
To: Nick Vandewiele
Subject: Re: [Open Babel] removing dependency when compiling java bindings?

I haven't the faintest idea why it's linking awt libraries, but I can
investigate. It may be the default for JNI interfaces, but I haven't found
anything obvious on Google to suggest how it can be removed, although this
looks promising:

http://mail-archives.apache.org/mod_mbox/qpid-commits/201301.mbox/%3C2013010
4155247.b009e2388...@eris.apache.org%3E

So try this. In scripts/CMakeLists.txt, change this line:

    target_link_libraries(bindings_java ${JNI_LIBRARIES} ${BABEL_LIBRARY})

To:

    target_link_libraries(bindings_java ${BABEL_LIBRARY})

That should be equivalent to what the Apache project was doing. I don't know
if it'll work, but I think it's the first thing to try.

Hope that helps,
-Geoff

> I compiled the openbabel java bindings on "linux 64 bit" resulting in an
libopenbabel_java.so file. I did this through cmake like this:
> cmake ../openbabel-2.3.2 -DJAVA_BINDINGS=ON
-DCMAKE_INSTALL_PREFIX=/blabla/openbabel-install
-DEIGEN3_INCLUDE_DIR=/blabla/eigen-eigen
>  
> Next, I checked whether all dependencies for libopenbabel_java.so could be
found through:
> ldd /blabla/openbabel-install/lib/libopenbabel_java.so
> And it turned out that libmawt.so could not be found:
> libmawt.so => not found
> Since I believe this library is not crucial for what I'm doing (the
library is AWT related, and I don't render any windows), I would like to
exclude that library so that openbabel doesn't crash just because of this
one missing link.
>  
> Is there an easy fix by removing that dependency from "a" list somewhere
in a cmake file? I don't consider having libmawt.so available an option.


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to