the static build works fine after having modified CMakeLists.txt as
described in my previous mail!


in contrast, when setting the -DBUILD_SHARED=ON, i get this error:

Linking CXX executable ../bin/babel
cd /home/b/becdurma/openbabel/openbabel-2.3.2-build/tools &&
/sw/tools/cmake/2.8.11/generic/GNU/bin/cmake -E cmake_link_script
CMakeFiles/babel.dir/link.txt --verbose=1
/opt/cray/craype/2.01/bin/CC   -O2 -g -DNDEBUG -O2 -g 
-Wl,--enable-new-dtags -Wl,--fatal-warnings -Wl,--no-undefined -lc
-Wl,--enable-new-dtags -Wl,--fatal-warnings -Wl,--no-undefined -lc  
CMakeFiles/babel.dir/babel.o  -o ../bin/babel -rdynamic
../lib/libopenbabel.so.4.0.2 -lm -ldl -lz
-Wl,-rpath,/home/b/becdurma/openbabel/openbabel-2.3.2-build/lib::
/usr/bin/ld: attempted static link of dynamic object
`../lib/libopenbabel.so.4.0.2'


which i was not able to solve. even setting LD_LIBRARY_PATH as you
suggested didn't eliminate the error.

conclusion: the easiest way for me was: modifying CMakeLists.txt
accordingly and choosing -DBUILD_SHARED=OFF

vedat



Am 15.01.2014 13:13, schrieb Maciek Wójcikowski:
> I think you should build with SHARED = True and append correct
> directory to LD_LIBRARY_PATH, which probably should look like:
>
> export
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/openbabel/openbabel-2.3.2-install/lib
>
> ----
> Pozdrawiam,  |  Best regards,
> Maciek Wójcikowski
> mac...@wojcikowski.pl <mailto:mac...@wojcikowski.pl>
>
>
> 2014/1/15 Vedat Durmaz <dur...@zib.de <mailto:dur...@zib.de>>
>
>
>
>
>     Am 14.01.2014 <tel:14.01.2014> 19:10, schrieb Dimitri Maziuk:
>>     On 01/14/2014 11:21 AM, Vedat Durmaz wrote:
>>     ...
>>>     i really don't
>>>     understand, why obabel building is deactivated by default in the static
>>>     case. however, i also don't have that much experience with that
>>>     cmake/configure stuff.
>>     Looks like a braino to me, perhaps the endif(BUILD_SHARED) was supposed
>>     to be about 10 lines above where it is now?
>
>     but then still no obabel executable would have been
>     compiled/linked in case of a static build. maybe i haven't
>     explained (and understood) well enough. i don't know whether this
>     will work, but i'll try to attach the CMakeLists.txt file from the
>     ./tools directory before and after modification (concerning the
>     last 1-15 lines only) ..
>
>     vedat
>
>>
>>
>>     
>> ------------------------------------------------------------------------------
>>     CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>     Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>     Critical Workloads, Development Environments & Everything In Between.
>>     Get a Quote or Start a Free Trial Today. 
>>     
>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>>
>>
>>     _______________________________________________
>>     OpenBabel-discuss mailing list
>>     OpenBabel-discuss@lists.sourceforge.net 
>> <mailto:OpenBabel-discuss@lists.sourceforge.net>
>>     https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
>     
> ------------------------------------------------------------------------------
>     CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>     Learn Why More Businesses Are Choosing CenturyLink Cloud For
>     Critical Workloads, Development Environments & Everything In Between.
>     Get a Quote or Start a Free Trial Today.
>     
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>     _______________________________________________
>     OpenBabel-discuss mailing list
>     OpenBabel-discuss@lists.sourceforge.net
>     <mailto:OpenBabel-discuss@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to