ok. thanks for your help guys! forget about the technical support. i've
succeeded in doing it right before ultimately giving up. (and i'm really
proud of myself!)
some background: our HPC system consists of cray xc30, sandy bridge
(afaik) hardware run by the SUSE Linux Enterprise Server (SLES) 11
(x86_64) system.
i went back to the static way calling cmake with the -DBUILD_SHARED=OFF
option:
cmake ../openbabel-2.3.2
-DCMAKE_INSTALL_PREFIX=~/openbabel/openbabel-2.3.2-install
-DEIGEN3_INCLUDE_DIR=~/include -DBUILD_SHARED=OFF
However, after having untared "openbabel-2.3.2", i had to modify the
file ./openbabel-2.3.2/tools/CMakeLists.txt in order to activate the
building of the obabel executable (in addition to the babel exe). right
before the last line "endif(BUILD_SHARED)" of that file enclosing the
case of static linking, i pasted the following lines
# build a static obabel
add_executable(obabel obabel.cpp)
target_link_libraries(obabel ${libs})
if(NOT BUILD_MIXED)
# Prevent -Wl,-Bdynamic from being added to the end of the link line.
set_target_properties(obabel PROPERTIES LINK_SEARCH_END_STATIC TRUE)
endif(NOT BUILD_MIXED)
install(TARGETS obabel
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
which i had copied from the preceding lines concerning the building of
babel instead and slightly modified by substituting "babel" by "obabel".
after make & make install i was able to use my favorite openbabel
command, something like:
obabel --gen3d -:"NC(=O)N1C2=C(C=CC=C2)C=CC2=C1C=CC=C2" -O test.sdf
the resulting structure file looks as expected. 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.
vedat
Am 14.01.2014 17:33, schrieb Geoffrey Hutchison:
>> i get a linker error concerning the babel executable:
>> ..
>> /opt/cray/craype/2.01/bin/CC -O2 -g -DNDEBUG -O2 -g
> ...
>> /usr/bin/ld: attempted static link of dynamic object
>> `../lib/libopenbabel.so.4.0.2'
>> collect2: error: ld returned 1 exit status
> When you re-ran cmake, did you remove everything in the build directory? I'd
> try:
>
> cd build
> rm -rf *
> cmake ../openbabel-2.3.2 # [..]
> etc.
>
> I can think of two possibilities. One is that cmake didn't properly change
> the linking steps in the Makefile to use dynamic linking. Two is that the
> version of Cmake that you have installed doesn't work correctly with the Cray
> compiler. (I'm not an HPC person, so it might help to find a technical
> support person at this facility. Most HPC centers have people to help you
> compile codes for the different systems and have experience with the
> compilers and developer tools.)
>
> Hope that helps,
> -Geoff
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss