From: Noel O'B. <no...@ca...> - 2005-11-29 14:08:23
|
I'd just like to ditto the previous message. On Debian Sarge, after compiling everything and installing the python extensions (from CVS), I get the following message when trying to import openbabel: >>> import openbabel Traceback (most recent call last): File "<stdin>", line 1, in ? File "openbabel.py", line 4, in ? import _openbabel ImportError: No module named _openbabel As Joshua points out, there is no _openbabel.so, only an openbabel.so. Regards, Noel |
From: S J. S. <swa...@gm...> - 2005-11-29 16:08:01
|
THis error is fixed by changing the name of openbabel.so to _openbabel.so. But we still get a problem. Here is the output when you run teh exmaple file after changing the name of openbabel.so Any ideas? Josh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > python examples.py Should print 0 (atoms) 0 Should print 2 (atoms) 2 Should print 1 (bond) 1 /home/dock/linux/lib/openbabel/APIInterface.so did not load properly /home/dock/linux/lib/openbabel/CSRformat.so did not load properly /home/dock/linux/lib/openbabel/PQSformat.so did not load properly /home/dock/linux/lib/openbabel/alchemyformat.so did not load properly /home/dock/linux/lib/openbabel/amberformat.so did not load properly /home/dock/linux/lib/openbabel/balstformat.so did not load properly /home/dock/linux/lib/openbabel/bgfformat.so did not load properly /home/dock/linux/lib/openbabel/boxformat.so did not load properly /home/dock/linux/lib/openbabel/cacaoformat.so did not load properly /home/dock/linux/lib/openbabel/cacheformat.so did not load properly /home/dock/linux/lib/openbabel/carformat.so did not load properly /home/dock/linux/lib/openbabel/cccformat.so did not load properly /home/dock/linux/lib/openbabel/chem3dformat.so did not load properly /home/dock/linux/lib/openbabel/chemdrawformat.so did not load properly /home/dock/linux/lib/openbabel/chemtoolformat.so did not load properly /home/dock/linux/lib/openbabel/copyformat.so did not load properly /home/dock/linux/lib/openbabel/crkformat.so did not load properly /home/dock/linux/lib/openbabel/cssrformat.so did not load properly /home/dock/linux/lib/openbabel/dmolformat.so did not load properly /home/dock/linux/lib/openbabel/fastsearchformat.so did not load properly /home/dock/linux/lib/openbabel/featformat.so did not load properly /home/dock/linux/lib/openbabel/fhformat.so did not load properly /home/dock/linux/lib/openbabel/fingerprintformat.so did not load properly /home/dock/linux/lib/openbabel/freefracformat.so did not load properly /home/dock/linux/lib/openbabel/gamessformat.so did not load properly /home/dock/linux/lib/openbabel/gaussformat.so did not load properly /home/dock/linux/lib/openbabel/ghemicalformat.so did not load properly /home/dock/linux/lib/openbabel/gromos96format.so did not load properly /home/dock/linux/lib/openbabel/hinformat.so did not load properly /home/dock/linux/lib/openbabel/inchiformat.so did not load properly /home/dock/linux/lib/openbabel/jaguarformat.so did not load properly /home/dock/linux/lib/openbabel/mdlformat.so did not load properly /home/dock/linux/lib/openbabel/mmodformat.so did not load properly /home/dock/linux/lib/openbabel/mpdformat.so did not load properly /home/dock/linux/lib/openbabel/mol2format.so did not load properly /home/dock/linux/lib/openbabel/mopacformat.so did not load properly /home/dock/linux/lib/openbabel/mpqcformat.so did not load properly /home/dock/linux/lib/openbabel/nwchemformat.so did not load properly /home/dock/linux/lib/openbabel/pcmodelformat.so did not load properly /home/dock/linux/lib/openbabel/pdbformat.so did not load properly /home/dock/linux/lib/openbabel/povrayformat.so did not load properly /home/dock/linux/lib/openbabel/qchemformat.so did not load properly /home/dock/linux/lib/openbabel/reportformat.so did not load properly /home/dock/linux/lib/openbabel/rxnformat.so did not load properly /home/dock/linux/lib/openbabel/shelxformat.so did not load properly /home/dock/linux/lib/openbabel/smilesformat.so did not load properly /home/dock/linux/lib/openbabel/tinkerformat.so did not load properly /home/dock/linux/lib/openbabel/turbomoleformat.so did not load properly /home/dock/linux/lib/openbabel/unichemformat.so did not load properly /home/dock/linux/lib/openbabel/viewmolformat.so did not load properly /home/dock/linux/lib/openbabel/xedformat.so did not load properly /home/dock/linux/lib/openbabel/xyzformat.so did not load properly /home/dock/linux/lib/openbabel/yasaraformat.so did not load properly /home/dock/linux/lib/openbabel/zindoformat.so did not load properly Should print 5 (atoms) 0 Should print 9 (atoms) after adding hydrogens =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D On 29/11/05, Noel O'Boyle <no...@ca...> wrote: > I'd just like to ditto the previous message. On Debian Sarge, after > compiling everything and installing the python extensions (from CVS), I > get the following message when trying to import openbabel: > > >>> import openbabel > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "openbabel.py", line 4, in ? > import _openbabel > ImportError: No module named _openbabel > > As Joshua points out, there is no _openbabel.so, only an openbabel.so. > > Regards, > Noel > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Geoffrey H. <ge...@ge...> - 2005-11-29 22:33:40
|
On Nov 29, 2005, at 11:07 AM, S Joshua Swamidass wrote: > But we still get a problem. Here is the output when you run teh > exmaple file after changing the name of openbabel.so ... > /home/dock/linux/lib/openbabel/APIInterface.so did not load properly > /home/dock/linux/lib/openbabel/CSRformat.so did not load properly ... Well, it certainly works for me (or I wouldn't have shipped it). I'm assuming that the babel binary itself loads the formats properly and that these files do actually exist? Try setting the environment variable BABEL_LIBDIR: export BABEL_LIBDIR=/home/doc/linux/lib/openbabel Other than that, it'd help to know what version of Linux (and Python) you're running. I'm not sure what it'd tell me, but it would give me some info to try to find a similar machine for testing. Cheers, -Geoff |
From: Noel O'B. <no...@ca...> - 2005-11-30 10:05:48
|
On Tue, 2005-11-29 at 17:33 -0500, Geoffrey Hutchison wrote: > On Nov 29, 2005, at 11:07 AM, S Joshua Swamidass wrote: > > > But we still get a problem. Here is the output when you run teh > > exmaple file after changing the name of openbabel.so > ... > > /home/dock/linux/lib/openbabel/APIInterface.so did not load properly > > /home/dock/linux/lib/openbabel/CSRformat.so did not load properly > ... Same here. > I'm assuming that the babel binary itself loads the formats properly > and that these files do actually exist? The files do actually exist. I'm not sure that all the formats are loaded correctly as the test-suite fails pretty miserably...I've attached the first five minutes [not sent to mailing list]. > Try setting the environment variable BABEL_LIBDIR: > export BABEL_LIBDIR=/home/doc/linux/lib/openbabel No effect. > Other than that, it'd help to know what version of Linux (and Python) > you're running. I'm not sure what it'd tell me, but it would give me > some info to try to find a similar machine for testing. I have the same problem on Debian Sarge, for Python 2.3/2.4, even after setting BABEL_LIBDIR=/usr/local/lib/openbabel. The files do exist: there is an ".a",".la" and an ".so", for each. Running 'file' on the .so: /usr/local/lib/openbabel/xyzformat.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped I also added /usr/local/lib/openbabel to LD_LIBRARY_PATH with no improvement. Regards, Noel |
From: Geoffrey H. <ge...@ge...> - 2005-11-30 15:42:37
|
On Nov 30, 2005, at 4:51 AM, Noel O'Boyle wrote: > On Tue, 2005-11-29 at 17:33 -0500, Geoffrey Hutchison wrote: >> On Nov 29, 2005, at 11:07 AM, S Joshua Swamidass wrote: >> >>> But we still get a problem. Here is the output when you run teh >>> exmaple file after changing the name of openbabel.so >> ... >>> /home/dock/linux/lib/openbabel/APIInterface.so did not load properly >>> /home/dock/linux/lib/openbabel/CSRformat.so did not load properly >> ... > > Same here. OK, I have one more question... If you try running the tests for the Perl wrapper, do they work? "perl Makefile.PL; make; make test" I'm trying to sort out if this is a Python-specific problem or not. Haven't found much. :-( Thanks, -Geoff |
From: Geoffrey H. <ge...@ge...> - 2005-11-30 19:19:48
|
On Nov 30, 2005, at 1:57 PM, S Joshua Swamidass wrote: > It will help knowing exactly how these delayed dynamic libray loads > are made. Why aren't they all already part of the _openbabel.so? The _openbabel.so is merely some "glue" code to allow the openbabel.py module to access the C++ library. So there are actually several dynamic library loads beyond just _openbabel.so. For example, libopenbabel.so is loaded. The delayed loads are for the individual file format dynamic libraries. The OB-2.0 library structure separates them from the main library -- there are plenty of users who want use of the libopenbabel library but not necessarily all of the file format translators. This library structure works just fine for C, C++, and the Perl wrapper AFAICT. And it works for me on Mac OS X with Python. I'm not sure what's different about Linux Python, or who can help with this necessarily. > Do you think we coudl statically link them? Where is the code that > loads > them dynamically? You don't want to statically link them. In fact, there are problems with the static builds of Open Babel because the linking is tricky. The C++ code that loads the file formats is in src/ dlhandler_unix.cpp. It has no error messages like the ones you report, which is why I don't know what to debug. :-( -Geoff |
From: Noel O'B. <no...@ca...> - 2005-12-01 15:01:44
|
Testing Perl...phew, doesn't work for Perl either. :-) ~/Tools/OpenBabel/openbabel/scripts/perl$ perl Makefile.PL; make; make test Checking if your kit is complete... Looks good Writing Makefile for Chemistry::OpenBabel cp openbabel.pm blib/lib/Chemistry/openbabel.pm g++ -c -I../../src -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.0.0\" -DXS_VERSION=\"1.0.0\" -fPIC "-I/usr/lib/perl/5.8/CORE" openbabel_perl.cpp Running Mkbootstrap for Chemistry::OpenBabel () chmod 644 OpenBabel.bs rm -f blib/arch/auto/Chemistry/OpenBabel/OpenBabel.so LD_RUN_PATH="" g++ -shared -L/usr/local/lib openbabel_perl.o ../../src/.libs/libopenbabel.a -lz -o blib/arch/auto/Chemistry/OpenBabel/OpenBabel.so chmod 755 blib/arch/auto/Chemistry/OpenBabel/OpenBabel.so cp OpenBabel.bs blib/arch/auto/Chemistry/OpenBabel/OpenBabel.bs chmod 644 blib/arch/auto/Chemistry/OpenBabel/OpenBabel.bs PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/example....Can't locate Chemistry/OpenBabel.pm in @INC (@INC contains: /home/no228/Tools/OpenBabel/openbabel/scripts/perl/blib/lib /home/no228/Tools/OpenBabel/openbabel/scripts/perl/blib/arch /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at t/example.t line 11. BEGIN failed--compilation aborted at t/example.t line 11. t/example....dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-11 Failed 11/11 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/example.t 2 512 11 21 190.91% 1-11 Failed 1/1 test scripts, 0.00% okay. 11/11 subtests failed, 0.00% okay. make: *** [test_dynamic] Error 2 On Wed, 2005-11-30 at 10:42 -0500, Geoffrey Hutchison wrote: > On Nov 30, 2005, at 4:51 AM, Noel O'Boyle wrote: > > > On Tue, 2005-11-29 at 17:33 -0500, Geoffrey Hutchison wrote: > >> On Nov 29, 2005, at 11:07 AM, S Joshua Swamidass wrote: > >> > >>> But we still get a problem. Here is the output when you run teh > >>> exmaple file after changing the name of openbabel.so > >> ... > >>> /home/dock/linux/lib/openbabel/APIInterface.so did not load properly > >>> /home/dock/linux/lib/openbabel/CSRformat.so did not load properly > >> ... > > > > Same here. > > OK, I have one more question... If you try running the tests for the > Perl wrapper, do they work? > > "perl Makefile.PL; make; make test" > > I'm trying to sort out if this is a Python-specific problem or not. > Haven't found much. :-( > > Thanks, > -Geoff > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting |
From: Geoffrey H. <ge...@ge...> - 2005-12-01 15:59:14
|
On Dec 1, 2005, at 10:01 AM, Noel O'Boyle wrote: > Testing Perl...phew, doesn't work for Perl either. :-) > cp openbabel.pm blib/lib/Chemistry/openbabel.pm ... > t/example....Can't locate Chemistry/OpenBabel.pm in @INC (@INC (smacks forehead) No, that's a different bug. Mac OS X has a case- preserving, case-insensitive filesystem. So Chemistry/openbabel.pm and Chemistry/OpenBabel.pm are the same file on OS X. Not, of course on Linux. For the Perl module, try "make clean; mv openbabel.pm OpenBabel.pm" and repeat the original build. Thanks, -Geoff |
From: Noel O'B. <no...@ca...> - 2005-12-01 16:26:03
|
Done. Same problem as in Python, it seems. $ perl Makefile.PL; make; make test Checking if your kit is complete... Warning: the following files are missing in your kit: openbabel.pm Please inform the author. Writing Makefile for Chemistry::OpenBabel cp OpenBabel.pm blib/lib/Chemistry/OpenBabel.pm g++ -c -I../../src -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.0.0\" -DXS_VERSION=\"1.0.0\" -fPIC "-I/usr/lib/perl/5.8/CORE" openbabel_perl.cpp Running Mkbootstrap for Chemistry::OpenBabel () chmod 644 OpenBabel.bs rm -f blib/arch/auto/Chemistry/OpenBabel/OpenBabel.so LD_RUN_PATH="" g++ -shared -L/usr/local/lib openbabel_perl.o ../../src/.libs/libopenbabel.a -lz -o blib/arch/auto/Chemistry/OpenBabel/OpenBabel.so chmod 755 blib/arch/auto/Chemistry/OpenBabel/OpenBabel.so cp OpenBabel.bs blib/arch/auto/Chemistry/OpenBabel/OpenBabel.bs chmod 644 blib/arch/auto/Chemistry/OpenBabel/OpenBabel.bs PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/example..../usr/local/lib/openbabel/APIInterface.so did not load properly /usr/local/lib/openbabel/CSRformat.so did not load properly /usr/local/lib/openbabel/PQSformat.so did not load properly /usr/local/lib/openbabel/alchemyformat.so did not load properly /usr/local/lib/openbabel/amberformat.so did not load properly /usr/local/lib/openbabel/balstformat.so did not load properly /usr/local/lib/openbabel/bgfformat.so did not load properly t/example....ok 5/11/usr/local/lib/openbabel/boxformat.so did not load properly /usr/local/lib/openbabel/cacaoformat.so did not load properly /usr/local/lib/openbabel/cacheformat.so did not load properly /usr/local/lib/openbabel/carformat.so did not load properly /usr/local/lib/openbabel/cccformat.so did not load properly /usr/local/lib/openbabel/chem3dformat.so did not load properly /usr/local/lib/openbabel/chemdrawformat.so did not load properly /usr/local/lib/openbabel/chemtoolformat.so did not load properly /usr/local/lib/openbabel/copyformat.so did not load properly /usr/local/lib/openbabel/crkformat.so did not load properly /usr/local/lib/openbabel/cssrformat.so did not load properly /usr/local/lib/openbabel/dmolformat.so did not load properly /usr/local/lib/openbabel/fastsearchformat.so did not load properly /usr/local/lib/openbabel/featformat.so did not load properly /usr/local/lib/openbabel/fhformat.so did not load properly /usr/local/lib/openbabel/fingerprintformat.so did not load properly /usr/local/lib/openbabel/freefracformat.so did not load properly /usr/local/lib/openbabel/gamessformat.so did not load properly /usr/local/lib/openbabel/gaussformat.so did not load properly /usr/local/lib/openbabel/ghemicalformat.so did not load properly /usr/local/lib/openbabel/gromos96format.so did not load properly /usr/local/lib/openbabel/hinformat.so did not load properly /usr/local/lib/openbabel/inchiformat.so did not load properly /usr/local/lib/openbabel/jaguarformat.so did not load properly /usr/local/lib/openbabel/mdlformat.so did not load properly /usr/local/lib/openbabel/mmodformat.so did not load properly /usr/local/lib/openbabel/mpdformat.so did not load properly /usr/local/lib/openbabel/mol2format.so did not load properly /usr/local/lib/openbabel/mopacformat.so did not load properly /usr/local/lib/openbabel/mpqcformat.so did not load properly /usr/local/lib/openbabel/nwchemformat.so did not load properly /usr/local/lib/openbabel/pcmodelformat.so did not load properly /usr/local/lib/openbabel/pdbformat.so did not load properly /usr/local/lib/openbabel/povrayformat.so did not load properly /usr/local/lib/openbabel/qchemformat.so did not load properly /usr/local/lib/openbabel/reportformat.so did not load properly /usr/local/lib/openbabel/rxnformat.so did not load properly /usr/local/lib/openbabel/shelxformat.so did not load properly /usr/local/lib/openbabel/smilesformat.so did not load properly /usr/local/lib/openbabel/tinkerformat.so did not load properly /usr/local/lib/openbabel/turbomoleformat.so did not load properly /usr/local/lib/openbabel/unichemformat.so did not load properly /usr/local/lib/openbabel/viewmolformat.so did not load properly /usr/local/lib/openbabel/xedformat.so did not load properly /usr/local/lib/openbabel/xyzformat.so did not load properly /usr/local/lib/openbabel/yasaraformat.so did not load properly /usr/local/lib/openbabel/zindoformat.so did not load properly t/example....FAILED tests 8-9 Failed 2/11 tests, 81.82% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/example.t 11 2 18.18% 8-9 Failed 1/1 test scripts, 0.00% okay. 2/11 subtests failed, 81.82% okay. make: *** [test_dynamic] Error 255 On Thu, 2005-12-01 at 10:58 -0500, Geoffrey Hutchison wrote: > On Dec 1, 2005, at 10:01 AM, Noel O'Boyle wrote: > > > Testing Perl...phew, doesn't work for Perl either. :-) > > cp openbabel.pm blib/lib/Chemistry/openbabel.pm > ... > > t/example....Can't locate Chemistry/OpenBabel.pm in @INC (@INC > > (smacks forehead) No, that's a different bug. Mac OS X has a case- > preserving, case-insensitive filesystem. > > So Chemistry/openbabel.pm and Chemistry/OpenBabel.pm are the same > file on OS X. Not, of course on Linux. > > For the Perl module, try "make clean; mv openbabel.pm OpenBabel.pm" > and repeat the original build. > > Thanks, > -Geoff |