On Mon, Oct 18, 2010 at 10:33 PM, Igor Filippov [Contr]
wrote:
> These are the formats recognized by statically linked OB:
>
> $ bin/babel -L formats
> can -- Canonical SMILES format
> copy -- Copy raw text [Write-only]
> ent -- Protein Data Bank format
> fix -- SMILES FIX format [Write-only]
> mdl -- MDL MOL format
> ml2 -- Sybyl Mol2 format
> mol -- MDL MOL format
> mol2 -- Sybyl Mol2 format
> molreport -- Open Babel molecule report [Write-only]
> pdb -- Protein Data Bank format
> pov -- POV-Ray input format [Write-only]
> report -- Open Babel report format [Write-only]
> sd -- MDL MOL format
> sdf -- MDL MOL format
> smi -- SMILES format
> smiles -- SMILES format
> sy2 -- Sybyl Mol2 format
> txt -- Title format
static_plugins.cpp only contains a few formats since including all
formats in a single cpp file can take a long time/memory to compile.
> The formats recognized by "regular" (dynamical) OB are numbered 147 so I
> won't quote them all here, but clearly a lot are missing. Most important
> for me is InChI.
I have not yet attempted to include InChI in the static build.
However, if you have a static inchi library, you should be able to
include the inchi OB formats and link against it.
> Igor
>
>
>
>
> On Mon, 2010-10-18 at 16:09 -0400, Tim Vandermeersch wrote:
>> On Mon, Oct 18, 2010 at 9:49 PM, Igor Filippov [Contr]
>> wrote:
>> > Tim,
>> >
>> > Something still not working for me -
>> >
>> > Here is what I do:
>> >
>> > g++ -fopenmp -g -O3 -g -O2 -I/usr/local/ -D_LIB -D_MT -Wall
>> > -I/usr/local//src/ -I/usr/local//src/ -I/usr/local//include/
>> > -I../openbabel-2.3.0rc1//include/
>> > -I../openbabel-2.3.0rc1//build/include/ -I/usr/local/include/
>> > -I/usr/include/GraphicsMagick -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
>> > -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
>> > -mtune=generic -pthread -u _ZTVN9OpenBabel9SMIFormatE
>> > -u_ZTVN9OpenBabel12CANSMIFormatE -u _ZTVN9OpenBabel9CanSmilesE -c
>> > osra.cpp
>> >
>> > .
>> >
>> > g++ -fopenmp -g -O3 -u _ZTVN9OpenBabel9SMIFormatE
>> > -u_ZTVN9OpenBabel12CANSMIFormatE -u _ZTVN9OpenBabel9CanSmilesE -o osra
>> > osra.o osra_anisotropic.o osra_ocr.o osra_openbabel.o mcdlutil.o
>> > unpaper.o -L/usr/local//src/ -lpotrace -L/usr/local/ -locrad -lm
>> > -lGraphicsMagick++ -lGraphicsMagick -llcms -lfreetype -lXext -lSM -lICE
>> > -lX11 -lbz2 -lz -lm -lgomp -lpthread -L/usr/lib64 -L/usr/lib -L/usr/lib
>> > -L/usr/local//src/ -lPgm2asc
>> > -lnetpbm ../openbabel-2.3.0rc1//build/src/libopenbabel.a
>> >
>> > The resulting executable does not produce SMILES.
>>
>> You can verify that the symbols are in the executable using:
>>
>> objdump -t myexe | grep CanSmi
>>
>> > Moreover, when I try to do "make test" on statically linked babel I get
>> > the following:
>> >
>> > 27% tests passed, 41 tests failed out of 56
>> >
>> > Far cry from 100% "PASS" on dynamically linked babel.
>>
>> No, the tests don't work for static builds yet. Only the babel
>> executable with all plugins.
>>
>> > Igor
>> >
>> > On Mon, 2010-10-18 at 14:59 -0400, Tim Vandermeersch wrote:
>> >> Hi,
>> >>
>> >> On Mon, Oct 18, 2010 at 8:28 PM, Igor Filippov [Contr]
>> >> wrote:
>> >> > Tim,
>> >> >
>> >> > Thanks, I can build my executable per your instructions and it runs
>> >> > without segfaults, but doesn't seem to get the format plugins yet - the
>> >> > output when I want to get SMILES for example is empty.
>> >> >
>> >> > I'm also looking at the page "Plugins -> Creating custom static
>> >> > libraries" at http://openbabel.org/wiki/CMake
>> >> > but it's so terse I cannot figure out how to use this information for a
>> >> > project that does not use cmake itself. And I'm not a cmake expert at
>> >> > all unfortunately...
>> >>
>> >> You can build the doc/examples/static_executable exe using cmake and
>> >> "make VERBOSE=1". This will print the commands used for compiling.
>> >>
>> >> For example:
>> >>
>> >> [100%] Building CXX object CMakeFiles/myexe.dir/myexe.cpp.o
>> >> /usr/bin/c++ -u _ZTVN9OpenBabel9ACRFormatE -u
>> >> _ZTVN9OpenBabel15ADFOutputFormatE -u _ZTVN9OpenBabel14ADFInputFormatE
>> >> -u _ZTVN9OpenBabel11OBT41FormatE -u _ZTVN9OpenBabel13AlchemyFormatE -u
>> >> _ZTVN9OpenBabel15AmberPrepFormatE -u _ZTVN9OpenBabel14OBAPIInterfaceE
>> >> -u _ZTVN9OpenBabel15BallStickFormatE -u _ZTVN9OpenBabel9BGFFormatE -u
>> >> _ZTVN9OpenBabel9BoxFormatE -u _ZTVN9OpenBabel11CacaoFormatE -u
>> >> _ZTVN9OpenBabel11CacheFormatE -u _ZTVN9OpenBabel9CARFormatE -u
>> >> _ZTVN9OpenBabel9CCCFormatE -u _ZTVN9OpenBabel13CHEM3D1FormatE -u
>> >> _ZTVN9OpenBabel13CHEM3D2FormatE -u
>> >> _ZTVN9OpenBabel20ChemDrawBinaryFormatE -u
>> >> _ZTVN9OpenBabel14ChemDrawFormatE -u _ZTVN9OpenBabel13ChemKinFormatE -u
>> >> _ZTVN9OpenBabel9CHTFormatE -u _ZTVN9OpenBabel9CIFFormatE -u
>> >> _ZTVN9OpenBabel10CopyFormatE -u _ZTVN9OpenBabel11CRK2DFormatE -u
>> >> _ZTVN9OpenBabel11CRK3DFormatE -u _ZTVN9OpenBabel9CSRFormatE -u
>> >> _ZTVN9OpenBabel10CSSRFormatE -u _ZTVN9OpenBabel18Dlpoly