[OpenBabel-Devel] OBConformerSearch undefined references, missing vtable
I'm having an issue compiling the latest avogadro, and it looks like an issue with the new OBConformerSearch class. Can anyone reproduce? This is with a fresh checkout/build of both avogadro and openbabel. Linking CXX shared module ../../../lib/forcefieldextension.so CMakeFiles/forcefieldextension.dir/forcefieldextension.cpp.o: In function `Avogadro::ForceFieldThread::run()': /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:541: undefined reference to `OpenBabel::OBConformerSearch::OBConformerSearch()' /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:545: undefined reference to `OpenBabel::OBConformerSearch::Setup(OpenBabel::OBMol const, int, int, int, int)' /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:546: undefined reference to `OpenBabel::OBConformerSearch::Search()' /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:547: undefined reference to `OpenBabel::OBConformerSearch::GetConformers(OpenBabel::OBMol)' /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:570: undefined reference to `OpenBabel::OBConformerSearch::~OBConformerSearch()' /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:570: undefined reference to `OpenBabel::OBConformerSearch::~OBConformerSearch()' CMakeFiles/forcefieldextension.dir/forcefieldextension.cpp.o: In function `OpenBabel::OBEnergyConformerScore::OBEnergyConformerScore()': /usr/include/openbabel-2.0/openbabel/conformersearch.h:185: undefined reference to `vtable for OpenBabel::OBEnergyConformerScore' collect2: error: ld returned 1 exit status distcc[6932] ERROR: compile (null) on localhost failed make[2]: *** [lib/forcefieldextension.so] Error 1 make[1]: *** [libavogadro/src/extensions/CMakeFiles/forcefieldextension.dir/all] Error 2 make: *** [all] Error 2 Also, [dl@dl-worklaptop build]$ g++ --version g++ (GCC) 4.7.0 20120414 (prerelease) Dave -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Re: [OpenBabel-Devel] OBConformerSearch undefined references, missing vtable
If OB is not built with Eigen these classes are missing. On 3 May 2012 11:42, David Lonie david.lo...@kitware.com wrote: I'm having an issue compiling the latest avogadro, and it looks like an issue with the new OBConformerSearch class. Can anyone reproduce? This is with a fresh checkout/build of both avogadro and openbabel. Linking CXX shared module ../../../lib/forcefieldextension.so CMakeFiles/forcefieldextension.dir/forcefieldextension.cpp.o: In function `Avogadro::ForceFieldThread::run()': /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:541: undefined reference to `OpenBabel::OBConformerSearch::OBConformerSearch()' /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:545: undefined reference to `OpenBabel::OBConformerSearch::Setup(OpenBabel::OBMol const, int, int, int, int)' /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:546: undefined reference to `OpenBabel::OBConformerSearch::Search()' /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:547: undefined reference to `OpenBabel::OBConformerSearch::GetConformers(OpenBabel::OBMol)' /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:570: undefined reference to `OpenBabel::OBConformerSearch::~OBConformerSearch()' /ssd/src/avogadro/libavogadro/src/extensions/forcefieldextension.cpp:570: undefined reference to `OpenBabel::OBConformerSearch::~OBConformerSearch()' CMakeFiles/forcefieldextension.dir/forcefieldextension.cpp.o: In function `OpenBabel::OBEnergyConformerScore::OBEnergyConformerScore()': /usr/include/openbabel-2.0/openbabel/conformersearch.h:185: undefined reference to `vtable for OpenBabel::OBEnergyConformerScore' collect2: error: ld returned 1 exit status distcc[6932] ERROR: compile (null) on localhost failed make[2]: *** [lib/forcefieldextension.so] Error 1 make[1]: *** [libavogadro/src/extensions/CMakeFiles/forcefieldextension.dir/all] Error 2 make: *** [all] Error 2 Also, [dl@dl-worklaptop build]$ g++ --version g++ (GCC) 4.7.0 20120414 (prerelease) Dave -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Re: [OpenBabel-Devel] OBConformerSearch undefined references, missing vtable
So from Avogadro, we'll need to know whether or not to expect these features to be available. Does OpenBabel export anything that will let us know if it was built with Eigen? Or is it just time to make Eigen a hard dependency for OB? Eigen is hardly difficult to find these days, are there any distros that are hold this back? I didn't think anything about adding OBConformerSearch to Avogadro, since Avogadro requires Eigen! It should be in babelconfig.h, but looking at it now, I don't see HAS_EIGEN included. We'll need to fix that. -Geoff -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Re: [OpenBabel-Devel] [Avogadro-devel] OBConformerSearch undefined references, missing vtable
On Thu, May 3, 2012 at 10:31 AM, Geoff Hutchison ge...@geoffhutchison.net wrote: So from Avogadro, we'll need to know whether or not to expect these features to be available. Does OpenBabel export anything that will let us know if it was built with Eigen? Or is it just time to make Eigen a hard dependency for OB? Eigen is hardly difficult to find these days, are there any distros that are hold this back? I didn't think anything about adding OBConformerSearch to Avogadro, since Avogadro requires Eigen! It should be in babelconfig.h, but looking at it now, I don't see HAS_EIGEN included. We'll need to fix that. Should Avogadro move to using #ifdef OPENBABEL_HAS_EIGEN or something, so that it would be disabled until OB defines this variable? Marcus -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Re: [OpenBabel-Devel] Python bindings now returning long instead of int?
On May 1, 2012, at 10:04 PM, Geoff Hutchison wrote: What version of SWIG are you using? I have SWIG Version 2.0.6 Compiled with /usr/bin/clang++ [i386-apple-darwin11.4.0] Configured options: +pcre On May 2, 2012, at 5:27 AM, Noel O'Boyle wrote: Are you comparing 32-bit builds? No, both 64-bit builds, I think. My homebrew build formulae are at https://github.com/rwest/homebrew/blob/open-babel-head/Library/Formula/open-babel.rb Perhaps they need tweaking, in which case I'd be glad of advice. Version 2.2.3 ( `brew install https://raw.github.com/rwest/homebrew/open-babel-head/Library/Formula/open-babel.rb --python`) gives this: RWests-iMac: rwest$ otool -hv /usr/local/Cellar/open-babel/2.2.3/lib/libopenbabel.dylib /usr/local/Cellar/open-babel/2.2.3/lib/libopenbabel.dylib: Mach header magic cputype cpusubtype capsfiletype ncmds sizeofcmds flags MH_MAGIC_64 X86_64ALL 0x00 DYLIB13 1928 NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK NO_REEXPORTED_DYLIBS RWests-iMac: rwest$ otool -hv /usr/local/Cellar/open-babel/2.2.3/lib/python2.7/site-packages/_openbabel.so /usr/local/Cellar/open-babel/2.2.3/lib/python2.7/site-packages/_openbabel.so: Mach header magic cputype cpusubtype capsfiletype ncmds sizeofcmds flags MH_MAGIC_64 X86_64ALL 0x00 BUNDLE12 1832 NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK RWests-iMac: rwest$ otool -h /usr/local/Cellar/open-babel/2.2.3/lib/python2.7/site-packages/_openbabel.so /usr/local/Cellar/open-babel/2.2.3/lib/python2.7/site-packages/_openbabel.so: Mach header magic cputype cpusubtype capsfiletype ncmds sizeofcmds flags 0xfeedfacf 16777223 3 0x00 812 1832 0x00018085 RWests-iMac:2.2.3 rwest$ otool -L /usr/local/Cellar/open-babel/2.2.3/lib/python2.7/site-packages/_openbabel.so /usr/local/Cellar/open-babel/2.2.3/lib/python2.7/site-packages/_openbabel.so: /usr/local/Cellar/open-babel/2.2.3/lib/libopenbabel.3.dylib (compatibility version 4.0.0, current version 4.3.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0) And the HEAD (`brew install https://raw.github.com/rwest/homebrew/open-babel-head/Library/Formula/open-babel.rb --HEAD`) gives this: RWests-iMac:rwest$ otool -hv /usr/local/Cellar/open-babel/HEAD/lib/libopenbabel.dylib /usr/local/Cellar/open-babel/HEAD/lib/libopenbabel.dylib: Mach header magic cputype cpusubtype capsfiletype ncmds sizeofcmds flags MH_MAGIC_64 X86_64ALL 0x00 DYLIB13 1928 NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK NO_REEXPORTED_DYLIBS RWests-iMac: rwest$ otool -hv /usr/local/Cellar/open-babel/HEAD/lib/python2.7/site-packages/_openbabel.so /usr/local/Cellar/open-babel/HEAD/lib/python2.7/site-packages/_openbabel.so: Mach header magic cputype cpusubtype capsfiletype ncmds sizeofcmds flags MH_MAGIC_64 X86_64ALL 0x00 BUNDLE14 1976 NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK RWests-iMac:2.2.3 rwest$ RWests-iMac: rwest$ otool -L /usr/local/Cellar/open-babel/HEAD/lib/python2.7/site-packages/_openbabel.so /usr/local/Cellar/open-babel/HEAD/lib/python2.7/site-packages/_openbabel.so: /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0) /usr/local/Cellar/open-babel/HEAD/lib/libopenbabel.4.dylib (compatibility version 4.0.0, current version 4.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0) Thanks, Richard - Noel On 1 May 2012 23:36, Richard West r.h.w...@gmail.com wrote: Hi all, I think that at some point between v 2.2.3 and the current svn trunk, the result of OBAtom.GetAtomicNum() in Python changed from type 'int' to 'long'. Is this an intentional change to the API that I missed, or an unintentional consequence of some change to how the bindings are built? If the former, it's easy enough for me to update my python scripts to expect 'long', but I thought I'd mention it in case the latter is the case. Thanks, Richard Example from IPython: In [1]: import pybel In [2]: pybel Out[2]: module 'pybel' from '/usr/local/lib/python2.7/site-packages/pybel.py' In [3]: m=pybel.readstring(smi,CC) In [4]: m.atoms[1].OBAtom.GetAtomicNum() Out[4]: 6L In [5]: type(_) Out[5]: long Using 2.2.3 you would have got Out[4]: 6 Out[5]: int -- Richard H. West, Ph.D. r.w...@neu.edu
[OpenBabel-Devel] C/C++ linker problem?
I doubt anyone will be able to shed light on this, but... OpenBabel is randomly hanging in the C++ deallocator. See the stack trace below. I've run into weird problems like this before, and it was related to the fact that I'm linking a C++ library (OpenBabel) into a C program (the Postgres database system). It's made even more complex because Postgres loads the OpenBabel libraries dynamically on request. It's worked well for a long time, but I'm upgrading to OpenBabel 2.3.1 and am encountering this problem again. The function call just gets stuck. It's just sitting there, not using any CPU, as though it's waiting for a signal or something. In the past, I cured this problem by using g++ to invoke the linking step to create my .so files. I'm still doing that. Here is the linker step: g++ -fpic -D_GNU_SOURCE -g -Wall -Wmissing-prototypes -Wpointer-arith \ -Wdeclaration-after-statement -Wold-style-definition -Wendif-labels \ -fno-strict-aliasing -shared -Wl,-soname,libchmoogle_2.3.so.0 \ openbabel2.3/mk_branch.o openbabel2.3/mk_linear.o openbabel2.3/mk_molform.o openbabel2.3/mk_ringgroups.o \ openbabel2.3/mk_util.o openbabel2.3/mg_normalize.o openbabel2.3/postgres_mol_openbabel.o tchash.o fingerprint.o postgres_mol.o \ -L /home/cjames/openbabel-2.3.x/lib -lopenbabel \ -o libchmoogle_2.3.so.0.0 (gdb) bt #0 0x7fdfd755816e in ?? () from /lib/libc.so.6 #1 0x7fdfd74e13dc in ?? () from /lib/libc.so.6 #2 0x7fdfd74dfe78 in free () from /lib/libc.so.6 #3 0x7fdfd7c7e722 in ?? () from /lib64/ld-linux-x86-64.so.2 #4 0x7fdfd7c795e5 in ?? () from /lib64/ld-linux-x86-64.so.2 #5 0x7fdfd7c7f5f5 in ?? () from /lib64/ld-linux-x86-64.so.2 #6 0x7fdfd7c7a986 in ?? () from /lib64/ld-linux-x86-64.so.2 #7 0x7fdfd7c7efba in ?? () from /lib64/ld-linux-x86-64.so.2 #8 0x7fdfd7586be0 in ?? () from /lib/libc.so.6 #9 0x7fdfd7c7a986 in ?? () from /lib64/ld-linux-x86-64.so.2 #10 0x7fdfd7586d37 in __libc_dlopen_mode () from /lib/libc.so.6 #11 0x7fdfd75613f1 in backtrace () from /lib/libc.so.6 #12 0x7fdfd74cf50f in ?? () from /lib/libc.so.6 #13 0x7fdfd74d95b6 in ?? () from /lib/libc.so.6 #14 0x7fdfd74dfe83 in free () from /lib/libc.so.6 #15 0x7fdf95de56ac in __gnu_cxx::new_allocatorOpenBabel::OBRing*::deallocate (this=0xfc2b88, __p=0xff8ab0) at /usr/include/c++/4.4/ext/new_allocator.h:95 #16 0x7fdf95de413c in std::_Vector_baseOpenBabel::OBRing*, std::allocatorOpenBabel::OBRing* ::_M_deallocate ( this=0xfc2b88, __p=0xff8ab0, __n=2) at /usr/include/c++/4.4/bits/stl_vector.h:146 #17 0x7fdf95de3e37 in ~_Vector_base (this=0xfc2b88, __in_chrg=value optimized out) at /usr/include/c++/4.4/bits/stl_vector.h:132 #18 0x7fdf95de2e82 in ~vector (this=0xfc2b88, __in_chrg=value optimized out) at /usr/include/c++/4.4/bits/stl_vector.h:313 #19 0x7fdf959977da in ~OBRingData (this=0xfc2b70, __in_chrg=value optimized out) at /home/cjames/openbabel-2.3.x-r4744/source/src/generic.cpp:784 #20 0x7fdf95907d83 in ~OBBase (this=0xfc1c40, __in_chrg=value optimized out) at /home/cjames/openbabel-2.3.x-r4744/source/include/openbabel/base.h:249 #21 0x7fdf95a13c1b in ~OBMol (this=0xfc1c40, __in_chrg=value optimized out) at /home/cjames/openbabel-2.3.x-r4744/source/src/mol.cpp:3225 #22 0x7fdf95decf5f in chmoogle_ichem_mol_dealloc (mol_ob=0xfc1c40) at openbabel2.3/postgres_mol_openbabel.cpp:190 #23 0x7fdf95ded864 in chmoogle_ichem_normalize (length=25, molecule_text=0xf90bcc Br.Br.Oc1ccc(cc1)N1CCNCC1, intype_len=3, intype=0x7fdf95df2fa9 SDF, outtype_len=3, outtype=0x7fdf95df2fa9 SDF) at openbabel2.3/postgres_mol_openbabel.cpp:461 #24 0x7fdf95df1ef5 in chmoogle_normalize_sdf (fcinfo=0x7fff2369dcc0) at postgres_mol.c:553 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel