|
From: richard a. <ric...@ya...> - 2006-11-06 02:04:03
|
I know Java is technically not a scripting language, but I was wondering if anyone was interested in trying to get a Java interface to OB working. I'm in the process of trying to do this. I've managed to get somewhere interesting, but I'm now stuck. I'm hoping that someone that knows more about this stuff than me can give a pointer or two. I know next to nothing about SWIG, C++, make, etc., so any information would be helpful. I'm using OB svn trunk rev 1587, amd64 Linux Mandriva 2007, SWIG 1.3.29. Here's what I've done so far: (1) cd scripts (2) mkdir java (3) cd java (4) swig -java -c++ -I../../src -o openbabel_java.cpp ../openbabel.i [This generates a bunch of *.java files and openbabel_java.cpp] (5) g++ -fpic -c openbabel_java.cpp -I/usr/java/jdk1.5.0_09/include -I/usr/java/jdk1.5.0_09/include/linux -I/usr/local/include/openbabel-2.0 -I/usr/local/include/openbabel-2.0/openbabel [this produces errors about sqrt, so I add a #include] (6) on line 1 of openbabel_java.cpp, add #include <math.h> (7) repeat step (5) - no errors this time (8) ld -G openbabel_java.o -o openbabel_java.so (9) javac *.java [produces 32 errors about missing classes such as OBChainsParser, OBBitVec, matrix3x3, OBAromaticTyper, and so on.] In looking at the java directory, I can see that none of the corresponding *.java files were created so. However, there are files such as OBMol.java. In the 32 errors I got after javac, none of them related to OBMol, or any of the other classes for which the *.java file is defined - as far as I can tell. So I conclude that for some reason SWIG is not generating the needed *.java files OBChainsParser.java, OBBitVec.java, etc, and their corresponding classes. I've tried adding #include and %import, %include, and %import for 'bitvec.h', but this still does not produce the OBBitVec.java file that seems to be needed. It looks like this is really close to working - it's just a matter of getting SWIG to generate these few java classes. Any ideas? cheers, Rich ____________________________ Richard Apodaca Blog: http://depth-first.com __________________________________________________________________________________________ Check out the New Yahoo! Mail - Fire up a more powerful email and get things done faster. (http://advision.webevents.yahoo.com/mailbeta) |
|
From: Geoffrey H. <ge...@ge...> - 2006-11-06 15:25:15
|
On Nov 5, 2006, at 9:03 PM, richard apodaca wrote: > I know Java is technically not a scripting language, > but I was wondering if anyone was interested in trying > to get a Java interface to OB working. Actually, there are SWIG generated files for Java in the current SVN head (much like you describe). I had to do some renaming though -- the filenames are so huge that they can't be archived by tar (i.e., for generating snapshots and releases). I haven't updated the Makefile to do this automatically yet. > (6) on line 1 of openbabel_java.cpp, add #include > <math.h> Actually, you can automate this by adding to openbabel-java.i > [produces 32 errors about missing classes such as > OBChainsParser, OBBitVec, matrix3x3, OBAromaticTyper, > and so on.] If you can get me a full list, I'll definitely hack the SWIG interface file to generate these. Cheers, -Geoff |
|
From: richard a. <ric...@ya...> - 2006-11-07 05:10:24
|
Hi Geoff,
What a coincidence!
In looking through the Java that your openbabel-java.i
file generated (svn trunk rev 1584), I see the cause
of the large filenames. The %module directive uses
net.sourceforge.openbabel as the name. Change this to:
%module openbabel
The problems with long filenames will disappear. But
that's not the biggest problem. The autogenerated java
also wouldn't compile because it was defining things
like:
public interface net.sourceforge.openbabelJNI
{
...
}
when it really should have been generating:
package net.sourceforge.openbabel;
public interface JNI
{
...
}
and so on. Packages are more of a hassle than they're
worth at this point. We can always get that part
tidied up later.
So when I run swig with the '%module openbabel'
directive, I get to the same place I was before. That
is, 32 java compile errors are produced. They involve
these class definitions that can't be found:
OBBitVec
matrix3x3
OBAromaticTyper
OBAtomTyper
OBChainsParser
In addition, 2 of these errors are apparently related
to method duplication:
OBSmartsPattern.java:107:
RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t,boolean)
is already defined in OBSmartsPattern
public boolean RestrictedMatch(OBMol mol, OBBitVec
bv, boolean single) {
...
OBSmartsPattern.java:111:
RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t)
is already defined in OBSmartsPattern
public boolean RestrictedMatch(OBMol mol, OBBitVec
bv) {
...
cheers,
Rich
--- Geoffrey Hutchison <ge...@ge...>
wrote:
>
> On Nov 5, 2006, at 9:03 PM, richard apodaca wrote:
>
> > I know Java is technically not a scripting
> language,
> > but I was wondering if anyone was interested in
> trying
> > to get a Java interface to OB working.
>
> Actually, there are SWIG generated files for Java in
> the current SVN
> head (much like you describe).
>
> I had to do some renaming though -- the filenames
> are so huge that
> they can't be archived by tar (i.e., for generating
> snapshots and
> releases). I haven't updated the Makefile to do this
> automatically yet.
>
> > (6) on line 1 of openbabel_java.cpp, add #include
> > <math.h>
>
> Actually, you can automate this by adding to
> openbabel-java.i
>
> > [produces 32 errors about missing classes such as
> > OBChainsParser, OBBitVec, matrix3x3,
> OBAromaticTyper,
> > and so on.]
>
> If you can get me a full list, I'll definitely hack
> the SWIG
> interface file to generate these.
>
> Cheers,
> -Geoff
>
____________________________
Richard Apodaca
Blog: http://depth-first.com
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail.
http://new.mail.yahoo.com
|
|
From: Noel O'B. <bao...@gm...> - 2006-12-16 18:15:07
|
What is the current situation with OB/Java?
I've tried to follow the README in scripts/java but step 3 gave:
g++: libopenbabel.so: No such file or directory
Noel
On 07/11/06, richard apodaca <ric...@ya...> wrote:
> Hi Geoff,
>
> What a coincidence!
>
> In looking through the Java that your openbabel-java.i
> file generated (svn trunk rev 1584), I see the cause
> of the large filenames. The %module directive uses
> net.sourceforge.openbabel as the name. Change this to:
>
> %module openbabel
>
> The problems with long filenames will disappear. But
> that's not the biggest problem. The autogenerated java
> also wouldn't compile because it was defining things
> like:
>
> public interface net.sourceforge.openbabelJNI
> {
> ...
> }
>
> when it really should have been generating:
>
> package net.sourceforge.openbabel;
>
> public interface JNI
> {
> ...
> }
>
> and so on. Packages are more of a hassle than they're
> worth at this point. We can always get that part
> tidied up later.
>
> So when I run swig with the '%module openbabel'
> directive, I get to the same place I was before. That
> is, 32 java compile errors are produced. They involve
> these class definitions that can't be found:
>
> OBBitVec
> matrix3x3
> OBAromaticTyper
> OBAtomTyper
> OBChainsParser
>
> In addition, 2 of these errors are apparently related
> to method duplication:
>
> OBSmartsPattern.java:107:
> RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t,boolean)
> is already defined in OBSmartsPattern
> public boolean RestrictedMatch(OBMol mol, OBBitVec
> bv, boolean single) {
>
> ...
>
> OBSmartsPattern.java:111:
> RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t)
> is already defined in OBSmartsPattern
> public boolean RestrictedMatch(OBMol mol, OBBitVec
> bv) {
>
> ...
>
> cheers,
> Rich
>
> --- Geoffrey Hutchison <ge...@ge...>
> wrote:
>
> >
> > On Nov 5, 2006, at 9:03 PM, richard apodaca wrote:
> >
> > > I know Java is technically not a scripting
> > language,
> > > but I was wondering if anyone was interested in
> > trying
> > > to get a Java interface to OB working.
> >
> > Actually, there are SWIG generated files for Java in
> > the current SVN
> > head (much like you describe).
> >
> > I had to do some renaming though -- the filenames
> > are so huge that
> > they can't be archived by tar (i.e., for generating
> > snapshots and
> > releases). I haven't updated the Makefile to do this
> > automatically yet.
> >
> > > (6) on line 1 of openbabel_java.cpp, add #include
> > > <math.h>
> >
> > Actually, you can automate this by adding to
> > openbabel-java.i
> >
> > > [produces 32 errors about missing classes such as
> > > OBChainsParser, OBBitVec, matrix3x3,
> > OBAromaticTyper,
> > > and so on.]
> >
> > If you can get me a full list, I'll definitely hack
> > the SWIG
> > interface file to generate these.
> >
> > Cheers,
> > -Geoff
> >
>
>
> ____________________________
> Richard Apodaca
> Blog: http://depth-first.com
>
>
>
>
> ____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail.
> http://new.mail.yahoo.com
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> OpenBabel-scripting mailing list
> Ope...@li...
> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
>
|
|
From: richard a. <ric...@ya...> - 2006-12-17 00:03:16
|
--- Noel O'Boyle <bao...@gm...> wrote:
> What is the current situation with OB/Java?
Hi Noel,
As far as I know, it's in the same state it was in
when I posted my last message. If we can resolve the
32 compile errors resulting from the 5 classes listed
below not being found, it should not be a lot of
effort to get it working.
I'll go through the steps again with the latest SVN to
see if anything has changed.
>
> I've tried to follow the README in scripts/java but
> step 3 gave:
> g++: libopenbabel.so: No such file or directory
>
> Noel
>
> On 07/11/06, richard apodaca
> <ric...@ya...> wrote:
> > Hi Geoff,
> >
> > What a coincidence!
> >
> > In looking through the Java that your
> openbabel-java.i
> > file generated (svn trunk rev 1584), I see the
> cause
> > of the large filenames. The %module directive uses
> > net.sourceforge.openbabel as the name. Change this
> to:
> >
> > %module openbabel
> >
> > The problems with long filenames will disappear.
> But
> > that's not the biggest problem. The autogenerated
> java
> > also wouldn't compile because it was defining
> things
> > like:
> >
> > public interface net.sourceforge.openbabelJNI
> > {
> > ...
> > }
> >
> > when it really should have been generating:
> >
> > package net.sourceforge.openbabel;
> >
> > public interface JNI
> > {
> > ...
> > }
> >
> > and so on. Packages are more of a hassle than
> they're
> > worth at this point. We can always get that part
> > tidied up later.
> >
> > So when I run swig with the '%module openbabel'
> > directive, I get to the same place I was before.
> That
> > is, 32 java compile errors are produced. They
> involve
> > these class definitions that can't be found:
> >
> > OBBitVec
> > matrix3x3
> > OBAromaticTyper
> > OBAtomTyper
> > OBChainsParser
> >
> > In addition, 2 of these errors are apparently
> related
> > to method duplication:
> >
> > OBSmartsPattern.java:107:
> >
>
RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t,boolean)
> > is already defined in OBSmartsPattern
> > public boolean RestrictedMatch(OBMol mol,
> OBBitVec
> > bv, boolean single) {
> >
> > ...
> >
> > OBSmartsPattern.java:111:
> >
>
RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t)
> > is already defined in OBSmartsPattern
> > public boolean RestrictedMatch(OBMol mol,
> OBBitVec
> > bv) {
> >
> > ...
> >
> > cheers,
> > Rich
> >
> > --- Geoffrey Hutchison <ge...@ge...>
> > wrote:
> >
> > >
> > > On Nov 5, 2006, at 9:03 PM, richard apodaca
> wrote:
> > >
> > > > I know Java is technically not a scripting
> > > language,
> > > > but I was wondering if anyone was interested
> in
> > > trying
> > > > to get a Java interface to OB working.
> > >
> > > Actually, there are SWIG generated files for
> Java in
> > > the current SVN
> > > head (much like you describe).
> > >
> > > I had to do some renaming though -- the
> filenames
> > > are so huge that
> > > they can't be archived by tar (i.e., for
> generating
> > > snapshots and
> > > releases). I haven't updated the Makefile to do
> this
> > > automatically yet.
> > >
> > > > (6) on line 1 of openbabel_java.cpp, add
> #include
> > > > <math.h>
> > >
> > > Actually, you can automate this by adding to
> > > openbabel-java.i
> > >
> > > > [produces 32 errors about missing classes such
> as
> > > > OBChainsParser, OBBitVec, matrix3x3,
> > > OBAromaticTyper,
> > > > and so on.]
> > >
> > > If you can get me a full list, I'll definitely
> hack
> > > the SWIG
> > > interface file to generate these.
> > >
> > > Cheers,
> > > -Geoff
> > >
> >
> >
> > ____________________________
> > Richard Apodaca
> > Blog: http://depth-first.com
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Do you Yahoo!?
> > Everyone is raving about the all-new Yahoo! Mail.
> > http://new.mail.yahoo.com
> >
> >
>
-------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support
> web services, security?
> > Get stuff done quickly with pre-integrated
> technology to make your job easier
> > Download IBM WebSphere Application Server v.1.0.1
> based on Apache Geronimo
> >
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > OpenBabel-scripting mailing list
> > Ope...@li...
> >
>
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
> >
>
>
-------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get
> the chance to share your
> opinions on IT & business topics through brief
> surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> OpenBabel-scripting mailing list
> Ope...@li...
>
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
>
____________________________
Richard Apodaca
Blog: http://depth-first.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
|
From: Geoffrey H. <ge...@ge...> - 2006-12-17 01:59:44
|
On Dec 16, 2006, at 7:02 PM, richard apodaca wrote: > 32 compile errors resulting from the 5 classes listed > below not being found, it should not be a lot of > effort to get it working. No more compile errors, I promise. I added a first stab at a README, but I can only vouch that it works on Mac OS X. >> I've tried to follow the README in scripts/java but >> step 3 gave: >> g++: libopenbabel.so: No such file or directory Sorry, that should have been something like: g++ -shared -lopenbabel -L/usr/local/lib openbabel_java.o -o libopenbabel.so Cheers, -Geoff |
|
From: richard a. <ric...@ya...> - 2006-12-17 16:36:24
|
--- Geoffrey Hutchison <ge...@ge...>
wrote:
>
> On Dec 16, 2006, at 7:02 PM, richard apodaca wrote:
>
> > 32 compile errors resulting from the 5 classes
> listed
> > below not being found, it should not be a lot of
> > effort to get it working.
>
> No more compile errors, I promise. I added a first
> stab at a README,
> but I can only vouch that it works on Mac OS X.
Using revision SVN trunk 1678.
Excellent. I went through the steps in the README. I
needed to modify Step 2 because of the way the Linux
AMD64 JDK is laid out:
(2) g++ -c -fpic openbabel_java.cpp -I../../include
-I/usr/java/jdk1.5.0_09/include/
-I/usr/java/jdk1.5.0_09/include/linux
> >> I've tried to follow the README in scripts/java
> but
> >> step 3 gave:
> >> g++: libopenbabel.so: No such file or directory
>
> Sorry, that should have been something like:
>
> g++ -shared -lopenbabel -L/usr/local/lib
> openbabel_java.o -o
> libopenbabel.so
I used the command above and it produced
libopenbabel.so. I checked and /usr/local/lib on my
system contains libopenbabel.so
So far so good.
I wrote a little test class (saved as OBTest.java in
the scripts/java directory):
public class OBTest
{
public OBTest()
{
}
public void run()
{
OBConversion c = new OBConversion();
}
public static void main(String[] args)
{
System.out.println("Running OBTest...");
OBTest test = new OBTest();
test.run();
}
}
Compiling:
javac OBTest.java
worked fine.
As far as I gather, I need to set LD_LIBRARY_PATH to
the directory containing libopenbabel.so:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
But running the test produces an UnsatisfiedLinkError:
$ java OBTest
Running OBTest...
Exception in thread "main"
java.lang.UnsatisfiedLinkError:
new_OBConversion__SWIG_2
at openbabelJNI.new_OBConversion__SWIG_2(Native
Method)
at OBConversion.<init>(OBConversion.java:44)
at OBTest.run(OBTest.java:10)
at OBTest.main(OBTest.java:19)
I'm inexperienced with using JNI, so I'm probably
doing something wrong.
To summarize: I'm able to compile the Open Babel JNI
wrapper and create the shared library. However,
running a simple test class that uses the library
gives an UnsatisfiedLinkError.
Can someone try to run this test class (or another
one) to see if the problem is my system/methods?
cheers,
Rich
____________________________
Richard Apodaca
Blog: http://depth-first.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
|
From: Noel O'B. <bao...@gm...> - 2006-12-17 21:39:17
|
Same happens to me but it runs fine for me (i.e. does nothing) with
the following random changes:
(1) Add System.loadLibrary("openbabel");
(2) export LD_LIBRARY_PATH=$PWD:/usr/local/lib
Not sure whether 1 or 2 did the magic. BTW, I find the presence of two
completely different libopenbabel.so's very confusing - can we rename
one to libopenbabel-java.so?
On 17/12/06, richard apodaca <ric...@ya...> wrote:
>
> --- Geoffrey Hutchison <ge...@ge...>
> wrote:
>
> >
> > On Dec 16, 2006, at 7:02 PM, richard apodaca wrote:
> >
> > > 32 compile errors resulting from the 5 classes
> > listed
> > > below not being found, it should not be a lot of
> > > effort to get it working.
> >
> > No more compile errors, I promise. I added a first
> > stab at a README,
> > but I can only vouch that it works on Mac OS X.
>
> Using revision SVN trunk 1678.
>
> Excellent. I went through the steps in the README. I
> needed to modify Step 2 because of the way the Linux
> AMD64 JDK is laid out:
>
> (2) g++ -c -fpic openbabel_java.cpp -I../../include
> -I/usr/java/jdk1.5.0_09/include/
> -I/usr/java/jdk1.5.0_09/include/linux
>
> > >> I've tried to follow the README in scripts/java
> > but
> > >> step 3 gave:
> > >> g++: libopenbabel.so: No such file or directory
> >
> > Sorry, that should have been something like:
> >
> > g++ -shared -lopenbabel -L/usr/local/lib
> > openbabel_java.o -o
> > libopenbabel.so
>
> I used the command above and it produced
> libopenbabel.so. I checked and /usr/local/lib on my
> system contains libopenbabel.so
>
> So far so good.
>
> I wrote a little test class (saved as OBTest.java in
> the scripts/java directory):
>
> public class OBTest
> {
> public OBTest()
> {
>
> }
>
> public void run()
> {
> OBConversion c = new OBConversion();
> }
>
> public static void main(String[] args)
> {
> System.out.println("Running OBTest...");
>
> OBTest test = new OBTest();
>
> test.run();
> }
> }
>
> Compiling:
>
> javac OBTest.java
>
> worked fine.
>
> As far as I gather, I need to set LD_LIBRARY_PATH to
> the directory containing libopenbabel.so:
>
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
>
> But running the test produces an UnsatisfiedLinkError:
>
> $ java OBTest
> Running OBTest...
> Exception in thread "main"
> java.lang.UnsatisfiedLinkError:
> new_OBConversion__SWIG_2
> at openbabelJNI.new_OBConversion__SWIG_2(Native
> Method)
> at OBConversion.<init>(OBConversion.java:44)
> at OBTest.run(OBTest.java:10)
> at OBTest.main(OBTest.java:19)
>
> I'm inexperienced with using JNI, so I'm probably
> doing something wrong.
>
> To summarize: I'm able to compile the Open Babel JNI
> wrapper and create the shared library. However,
> running a simple test class that uses the library
> gives an UnsatisfiedLinkError.
>
> Can someone try to run this test class (or another
> one) to see if the problem is my system/methods?
>
> cheers,
> Rich
>
> ____________________________
> Richard Apodaca
> Blog: http://depth-first.com
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> OpenBabel-scripting mailing list
> Ope...@li...
> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
>
|
|
From: richard a. <ric...@ya...> - 2006-12-18 00:33:45
|
--- Noel O'Boyle <bao...@gm...> wrote:
> Same happens to me but it runs fine for me (i.e.
> does nothing) with
> the following random changes:
> (1) Add System.loadLibrary("openbabel");
> (2) export LD_LIBRARY_PATH=$PWD:/usr/local/lib
Oh yeah, I forgot the System.loadLibrary call. Adding
it to the constructor gets rid of the
UnsatisfiedLinkError problem:
public class OBTest
{
public OBTest()
{
System.loadLibrary("openbabel");
}
public void run()
{
OBConversion c = new OBConversion();
}
public static void main(String[] args)
{
System.out.println("Running OBTest...");
OBTest test = new OBTest();
test.run();
}
}
But now I get a new series of errors when this code is
run:
$ java OBTest
Running OBTest...
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cmlreactlformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/pubchem.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cmlformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/xmlformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/APIInterface.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/CSRformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/PQSformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/alchemyformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/amberformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/balstformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/bgfformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/boxformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cacaoformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cacheformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/carformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cccformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/chem3dformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/chemdrawctformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/chemdrawcdxformat.so did
not load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/chemtoolformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/copyformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/crkformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cssrformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/dmolformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/fastsearchformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/fastaformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/featformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/fhformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/fingerprintformat.so did
not load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/freefracformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/gamessformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/gaussformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/ghemicalformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/gromos96format.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/hinformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/inchiformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/jaguarformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mdlformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mmodformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mpdformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mol2format.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/molreportformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mopacformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mpqcformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/nwchemformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/pcmodelformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/pdbformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/povrayformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/qchemformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/reportformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/rxnformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/shelxformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/smilesformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/thermoformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/tinkerformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/titleformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/turbomoleformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/unichemformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/viewmolformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/xedformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/xyzformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/yasaraformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/zindoformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cifformat.so did not load
properly
Adding /usr/local/lib or /usr/local/lib/openbabel
(where these fooformat.so files are located) does not
help.
Any ideas?
>
> Not sure whether 1 or 2 did the magic. BTW, I find
> the presence of two
> completely different libopenbabel.so's very
> confusing - can we rename
> one to libopenbabel-java.so?
>
> On 17/12/06, richard apodaca
> <ric...@ya...> wrote:
> >
> > --- Geoffrey Hutchison <ge...@ge...>
> > wrote:
> >
> > >
> > > On Dec 16, 2006, at 7:02 PM, richard apodaca
> wrote:
> > >
> > > > 32 compile errors resulting from the 5 classes
> > > listed
> > > > below not being found, it should not be a lot
> of
> > > > effort to get it working.
> > >
> > > No more compile errors, I promise. I added a
> first
> > > stab at a README,
> > > but I can only vouch that it works on Mac OS X.
> >
> > Using revision SVN trunk 1678.
> >
> > Excellent. I went through the steps in the README.
> I
> > needed to modify Step 2 because of the way the
> Linux
> > AMD64 JDK is laid out:
> >
> > (2) g++ -c -fpic openbabel_java.cpp
> -I../../include
> > -I/usr/java/jdk1.5.0_09/include/
> > -I/usr/java/jdk1.5.0_09/include/linux
> >
> > > >> I've tried to follow the README in
> scripts/java
> > > but
> > > >> step 3 gave:
> > > >> g++: libopenbabel.so: No such file or
> directory
> > >
> > > Sorry, that should have been something like:
> > >
> > > g++ -shared -lopenbabel -L/usr/local/lib
> > > openbabel_java.o -o
> > > libopenbabel.so
> >
> > I used the command above and it produced
> > libopenbabel.so. I checked and /usr/local/lib on
> my
> > system contains libopenbabel.so
> >
> > So far so good.
> >
> > I wrote a little test class (saved as OBTest.java
> in
> > the scripts/java directory):
> >
> > public class OBTest
> > {
> > public OBTest()
> > {
> >
> > }
> >
> > public void run()
> > {
> > OBConversion c = new OBConversion();
> > }
> >
> > public static void main(String[] args)
> > {
> > System.out.println("Running OBTest...");
> >
> > OBTest test = new OBTest();
> >
> > test.run();
> > }
> > }
> >
> > Compiling:
> >
> > javac OBTest.java
> >
> > worked fine.
> >
> > As far as I gather, I need to set LD_LIBRARY_PATH
> to
> > the directory containing libopenbabel.so:
> >
> > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
> >
> > But running the test produces an
> UnsatisfiedLinkError:
> >
> > $ java OBTest
> > Running OBTest...
> > Exception in thread "main"
> > java.lang.UnsatisfiedLinkError:
> > new_OBConversion__SWIG_2
> > at openbabelJNI.new_OBConversion__SWIG_2(Native
> > Method)
> > at OBConversion.<init>(OBConversion.java:44)
> > at OBTest.run(OBTest.java:10)
> > at OBTest.main(OBTest.java:19)
> >
> > I'm inexperienced with using JNI, so I'm probably
> > doing something wrong.
> >
> > To summarize: I'm able to compile the Open Babel
> JNI
> > wrapper and create the shared library. However,
> > running a simple test class that uses the library
> > gives an UnsatisfiedLinkError.
> >
> > Can someone try to run this test class (or another
> > one) to see if the problem is my system/methods?
> >
> > cheers,
> > Rich
> >
> > ____________________________
> > Richard Apodaca
> > Blog: http://depth-first.com
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
-------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of
> IT
> > Join SourceForge.net's Techsay panel and you'll
> get the chance to share your
> > opinions on IT & business topics through brief
> surveys - and earn cash
> >
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > OpenBabel-scripting mailing list
> > Ope...@li...
> >
>
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
> >
>
____________________________
Richard Apodaca
Blog: http://depth-first.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
|
From: Geoffrey H. <ge...@ge...> - 2006-12-18 00:40:56
|
On Dec 17, 2006, at 7:33 PM, richard apodaca wrote:
> But now I get a new series of errors when this code is
> run:
...
> /usr/local/lib/openbabel/cifformat.so did not load
> properly
This sounds like the problems we had with the Python and Perl
wrappers, e.g.:
if sys.platform.find(\"linux\") != -1:
import dl
sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL)
I'm not sure what the appropriate fix would be for Java. Basically,
Open Babel loads its file format shared libraries separately from the
library. Probably the best solution would be to write to the SWIG
list and find out if there's a global solution. (Strange that it's
not an issue with Ruby, evidently.)
As I've learned, adding new languages with SWIG is always an
adventure. :-)
Thanks guys!
-Geoff
|
|
From: Noel O'B. <bao...@gm...> - 2006-12-19 16:58:30
|
I didn't get any answer on the SWIG mailing list regarding this...but I didn't really know how to phrase the question. Googling doesn't help much but I did find the following links which might yield some information: http://forum.java.sun.com/thread.jspa?threadID=786600 http://forum.java.sun.com/thread.jspa?threadID=521235&messageID=2492274 http://java.sun.com/docs/books/jni/download/jni.pdf Noel On 18/12/06, Geoffrey Hutchison <ge...@ge...> wrote: > > On Dec 17, 2006, at 7:33 PM, richard apodaca wrote: > > > But now I get a new series of errors when this code is > > run: > ... > > /usr/local/lib/openbabel/cifformat.so did not load > > properly > > This sounds like the problems we had with the Python and Perl > wrappers, e.g.: > if sys.platform.find(\"linux\") != -1: > import dl > sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) > > I'm not sure what the appropriate fix would be for Java. Basically, > Open Babel loads its file format shared libraries separately from the > library. Probably the best solution would be to write to the SWIG > list and find out if there's a global solution. (Strange that it's > not an issue with Ruby, evidently.) > > As I've learned, adding new languages with SWIG is always an > adventure. :-) > > Thanks guys! > -Geoff > |
|
From: Geoffrey H. <ge...@ge...> - 2006-12-19 17:40:08
|
On Dec 19, 2006, at 11:58 AM, Noel O'Boyle wrote:
>> sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL)
>>
>> I'm not sure what the appropriate fix would be for Java. Basically,
>> Open Babel loads its file format shared libraries separately from the
>> library.
I had a brainstorm. At the moment, I don't have time to test this on
a Linux box, but it might do the trick. What we've been doing is
hacking Perl and Python wrappers. But what about the C++ library
itself? Maybe that's the basic culprit...
If you apply this patch (i.e., change the appropriate line in
dlhandler_unix.cpp) does Java work? Better yet, try editing the
openbabel.py and rip out the dl.RTLD_GLOBAL bits and see if that works.
(I'm hoping this solves the problem and we don't need something from
SWIG.)
Cheers,
-Geoff
Index: dlhandler_unix.cpp
===================================================================
--- dlhandler_unix.cpp (revision 1679)
+++ dlhandler_unix.cpp (working copy)
@@ -149,7 +149,7 @@ int DLHandler::findFiles (std::vector<st
bool DLHandler::openLib(const string& lib_name)
{
- return dlopen(lib_name.c_str(), RTLD_LAZY) != 0;
+ return dlopen(lib_name.c_str(), RTLD_LAZY|RTLD_GLOBAL) != 0;
}
const char* DLHandler::getFormatFilePattern()
|
|
From: Noel O'B. <bao...@gm...> - 2006-12-19 18:21:03
|
No dice, I'm afraid - the java result doesn't change, and Python
starts to give the same errors if the dlopenflags stuff is removed
from openbabel.py. Good idea though.
On 19/12/06, Geoffrey Hutchison <ge...@ge...> wrote:
>
> On Dec 19, 2006, at 11:58 AM, Noel O'Boyle wrote:
>
> >> sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL)
> >>
> >> I'm not sure what the appropriate fix would be for Java. Basically,
> >> Open Babel loads its file format shared libraries separately from the
> >> library.
>
> I had a brainstorm. At the moment, I don't have time to test this on
> a Linux box, but it might do the trick. What we've been doing is
> hacking Perl and Python wrappers. But what about the C++ library
> itself? Maybe that's the basic culprit...
>
> If you apply this patch (i.e., change the appropriate line in
> dlhandler_unix.cpp) does Java work? Better yet, try editing the
> openbabel.py and rip out the dl.RTLD_GLOBAL bits and see if that works.
>
> (I'm hoping this solves the problem and we don't need something from
> SWIG.)
>
> Cheers,
> -Geoff
>
> Index: dlhandler_unix.cpp
> ===================================================================
> --- dlhandler_unix.cpp (revision 1679)
> +++ dlhandler_unix.cpp (working copy)
> @@ -149,7 +149,7 @@ int DLHandler::findFiles (std::vector<st
> bool DLHandler::openLib(const string& lib_name)
> {
> - return dlopen(lib_name.c_str(), RTLD_LAZY) != 0;
> + return dlopen(lib_name.c_str(), RTLD_LAZY|RTLD_GLOBAL) != 0;
> }
> const char* DLHandler::getFormatFilePattern()
>
>
|
|
From: Geoffrey H. <ge...@ge...> - 2007-02-26 22:51:36
|
I'm coming back (finally) to the Java interface. Ideally I'd love to see it make the cut for the 2.1 release near the end of March. But I need to figure out if the file format loading problem can be solved. So first, I'm trying this on the Mac, which should have an easier time dealing with file format libraries. I could use a little (stupid) help. I created Rich's OBTest.java, compiled, and started running it: > Running OBTest... > Exception in thread "main" java.lang.UnsatisfiedLinkError: no > openbabel in java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) > at java.lang.Runtime.loadLibrary0(Runtime.java:822) > at java.lang.System.loadLibrary(System.java:992) > at OBTest.<init>(OBTest.java:5) > at OBTest.main(OBTest.java:17) OK, so help me out here. What are some typical environment variables that I'm likely lacking to cause the exception. Thanks, -Geoff (The Java novice) |
|
From: Noel O'B. <bao...@gm...> - 2007-02-27 09:23:21
|
On 26/02/07, Geoffrey Hutchison <ge...@ge...> wrote: > > I'm coming back (finally) to the Java interface. Ideally I'd love to > see it make the cut for the 2.1 release near the end of March. But I > need to figure out if the file format loading problem can be solved. > > So first, I'm trying this on the Mac, which should have an easier > time dealing with file format libraries. > > I could use a little (stupid) help. I created Rich's OBTest.java, > compiled, and started running it: > > Running OBTest... > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no > > openbabel in java.library.path > > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) > > at java.lang.Runtime.loadLibrary0(Runtime.java:822) > > at java.lang.System.loadLibrary(System.java:992) > > at OBTest.<init>(OBTest.java:5) > > at OBTest.main(OBTest.java:17) > > OK, so help me out here. What are some typical environment variables > that I'm likely lacking to cause the exception. >From one novice to another... (1) These sort of properties can be set using -Djava.library.path= (2) A nice google hit is: http://forum.java.sun.com/thread.jspa?threadID=627890 (3) Also it may be that setting LD_LIBRARY_PATH does the same thing on Unix (4) There is a very good discussion on http://www.jguru.com/faq/view.jsp?EID=970296 which touches on our own problem (see reply by Juan Jimenez), regarding the subsequent loading of a library |
|
From: richard a. <ric...@ya...> - 2006-12-18 00:35:04
|
--- Noel O'Boyle <bao...@gm...> wrote:
> Same happens to me but it runs fine for me (i.e.
> does nothing) with
> the following random changes:
> (1) Add System.loadLibrary("openbabel");
> (2) export LD_LIBRARY_PATH=$PWD:/usr/local/lib
Oh yeah, I forgot the System.loadLibrary call. Adding
it to the constructor gets rid of the
UnsatisfiedLinkError problem:
public class OBTest
{
public OBTest()
{
System.loadLibrary("openbabel");
}
public void run()
{
OBConversion c = new OBConversion();
}
public static void main(String[] args)
{
System.out.println("Running OBTest...");
OBTest test = new OBTest();
test.run();
}
}
But now I get a new series of errors when this code is
run:
$ java OBTest
Running OBTest...
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cmlreactlformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/pubchem.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cmlformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/xmlformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/APIInterface.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/CSRformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/PQSformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/alchemyformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/amberformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/balstformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/bgfformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/boxformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cacaoformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cacheformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/carformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cccformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/chem3dformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/chemdrawctformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/chemdrawcdxformat.so did
not load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/chemtoolformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/copyformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/crkformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cssrformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/dmolformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/fastsearchformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/fastaformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/featformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/fhformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/fingerprintformat.so did
not load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/freefracformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/gamessformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/gaussformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/ghemicalformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/gromos96format.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/hinformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/inchiformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/jaguarformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mdlformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mmodformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mpdformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mol2format.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/molreportformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mopacformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/mpqcformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/nwchemformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/pcmodelformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/pdbformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/povrayformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/qchemformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/reportformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/rxnformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/shelxformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/smilesformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/thermoformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/tinkerformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/titleformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/turbomoleformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/unichemformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/viewmolformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/xedformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/xyzformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/yasaraformat.so did not
load properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/zindoformat.so did not load
properly
==============================
*** Open Babel Error in LoadFormatFiles
/usr/local/lib/openbabel/cifformat.so did not load
properly
Adding /usr/local/lib or /usr/local/lib/openbabel
(where these fooformat.so files are located) does not
help.
Any ideas?
>
> Not sure whether 1 or 2 did the magic. BTW, I find
> the presence of two
> completely different libopenbabel.so's very
> confusing - can we rename
> one to libopenbabel-java.so?
>
> On 17/12/06, richard apodaca
> <ric...@ya...> wrote:
> >
> > --- Geoffrey Hutchison <ge...@ge...>
> > wrote:
> >
> > >
> > > On Dec 16, 2006, at 7:02 PM, richard apodaca
> wrote:
> > >
> > > > 32 compile errors resulting from the 5 classes
> > > listed
> > > > below not being found, it should not be a lot
> of
> > > > effort to get it working.
> > >
> > > No more compile errors, I promise. I added a
> first
> > > stab at a README,
> > > but I can only vouch that it works on Mac OS X.
> >
> > Using revision SVN trunk 1678.
> >
> > Excellent. I went through the steps in the README.
> I
> > needed to modify Step 2 because of the way the
> Linux
> > AMD64 JDK is laid out:
> >
> > (2) g++ -c -fpic openbabel_java.cpp
> -I../../include
> > -I/usr/java/jdk1.5.0_09/include/
> > -I/usr/java/jdk1.5.0_09/include/linux
> >
> > > >> I've tried to follow the README in
> scripts/java
> > > but
> > > >> step 3 gave:
> > > >> g++: libopenbabel.so: No such file or
> directory
> > >
> > > Sorry, that should have been something like:
> > >
> > > g++ -shared -lopenbabel -L/usr/local/lib
> > > openbabel_java.o -o
> > > libopenbabel.so
> >
> > I used the command above and it produced
> > libopenbabel.so. I checked and /usr/local/lib on
> my
> > system contains libopenbabel.so
> >
> > So far so good.
> >
> > I wrote a little test class (saved as OBTest.java
> in
> > the scripts/java directory):
> >
> > public class OBTest
> > {
> > public OBTest()
> > {
> >
> > }
> >
> > public void run()
> > {
> > OBConversion c = new OBConversion();
> > }
> >
> > public static void main(String[] args)
> > {
> > System.out.println("Running OBTest...");
> >
> > OBTest test = new OBTest();
> >
> > test.run();
> > }
> > }
> >
> > Compiling:
> >
> > javac OBTest.java
> >
> > worked fine.
> >
> > As far as I gather, I need to set LD_LIBRARY_PATH
> to
> > the directory containing libopenbabel.so:
> >
> > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
> >
> > But running the test produces an
> UnsatisfiedLinkError:
> >
> > $ java OBTest
> > Running OBTest...
> > Exception in thread "main"
> > java.lang.UnsatisfiedLinkError:
> > new_OBConversion__SWIG_2
> > at openbabelJNI.new_OBConversion__SWIG_2(Native
> > Method)
> > at OBConversion.<init>(OBConversion.java:44)
> > at OBTest.run(OBTest.java:10)
> > at OBTest.main(OBTest.java:19)
> >
> > I'm inexperienced with using JNI, so I'm probably
> > doing something wrong.
> >
> > To summarize: I'm able to compile the Open Babel
> JNI
> > wrapper and create the shared library. However,
> > running a simple test class that uses the library
> > gives an UnsatisfiedLinkError.
> >
> > Can someone try to run this test class (or another
> > one) to see if the problem is my system/methods?
> >
> > cheers,
> > Rich
> >
> > ____________________________
> > Richard Apodaca
> > Blog: http://depth-first.com
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
-------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of
> IT
> > Join SourceForge.net's Techsay panel and you'll
> get the chance to share your
> > opinions on IT & business topics through brief
> surveys - and earn cash
> >
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > OpenBabel-scripting mailing list
> > Ope...@li...
> >
>
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
> >
>
____________________________
Richard Apodaca
Blog: http://depth-first.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com
____________________________
Richard Apodaca
Blog: http://depth-first.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|