Menu

Compiling smina on ARM architecture

2021-05-22
2021-05-23
  • Justin Sanders

    Justin Sanders - 2021-05-22

    Hello,

    I am currently working on compiling smina on a Raspberry Pi 4 v1.2. I installed all the dependencies listed in the readme. Downloaded and compiled OpenBabel 3.1.1 from source (because only 2.4 is in the repository), ran Cmake and then compiled with it with make. As it got to the end to link the libsmina.a library to the smina executable, I got these errors regarding OpenBabel.

    [ 97%] Linking CXX executable smina
    /usr/bin/ld: libsmina.a(molgetter.cpp.o): in function MolGetter::readMoleculeIntoModel(model&)': molgetter.cpp:(.text+0x694): undefined reference toOpenBabel::OBMol::StripSalts(unsigned int)'
    /usr/bin/ld: libsmina.a(SminaConverter.cpp.o): in function SminaConverter::MCMolConverter::MCMolConverter(OpenBabel::OBMol&)': SminaConverter.cpp:(.text+0x480): undefined reference toOpenBabel::OBMol::SetConformer(unsigned int)'
    /usr/bin/ld: libsmina.a(SminaConverter.cpp.o): in function SminaConverter::MCMolConverter::convertConformer(unsigned int, std::ostream&)': SminaConverter.cpp:(.text+0xb88): undefined reference toOpenBabel::OBMol::SetConformer(unsigned int)'
    /usr/bin/ld: libsmina.a(PDBQTUtilities.cpp.o): in function IsRotBond_PDBQT(OpenBabel::OBBond*, unsigned int)': PDBQTUtilities.cpp:(.text+0xc4): undefined reference toOpenBabel::OBAtom::GetHvyDegree() const'
    /usr/bin/ld: PDBQTUtilities.cpp:(.text+0x104): undefined reference to OpenBabel::OBAtom::GetHvyDegree() const' /usr/bin/ld: libsmina.a(PDBQTUtilities.cpp.o): in functionOutputAtom(OpenBabel::OBAtom, context&, std::vector<openbabel::obatom*, std::allocator<openbabel::obatom*=""> >&, parsing_struct&, unsigned int, unsigned int)':
    PDBQTUtilities.cpp:(.text+0x264): undefined reference to OpenBabel::OBElements::GetSymbol(unsigned int)' /usr/bin/ld: PDBQTUtilities.cpp:(.text+0x338): undefined reference toOpenBabel::OBElements::GetSymbol(unsigned int)'
    /usr/bin/ld: PDBQTUtilities.cpp:(.text+0x35c): undefined reference to OpenBabel::OBElements::GetSymbol(unsigned int)' /usr/bin/ld: libsmina.a(PDBQTUtilities.cpp.o): in functioncreateSDFContext(OpenBabel::OBMol&, std::vector<openbabel::obatom*, std::allocator<openbabel::obatom*=""> >, sdfcontext&)':
    PDBQTUtilities.cpp:(.text+0x14b8): undefined reference to `OpenBabel::OBElements::GetSymbol(unsigned int)'
    collect2: error: ld returned 1 exit status
    make[2]: [CMakeFiles/smina.dir/build.make:97: smina] Error 1
    make[1]:
    [CMakeFiles/Makefile2:105: CMakeFiles/smina.dir/all] Error 2
    make: </openbabel::obatom*,></openbabel::obatom*,>
    ** [Makefile:84: all] Error 2

    What is going on with the OpenBabel definitions that is making it error out in the last step?

    If it helps.

    OS: Raspberry Pi OS Lite - March 4th, 2021
    Compiler: gcc (Raspbian 8.3.0-6+rpi1) 8.3.0

    Thanks.

     
  • David Koes

    David Koes - 2021-05-22

    Do you have multiple versions of openbabel installed? My guess is the headers it is compiling with do not match the library it is trying to link with.

     
    • Justin Sanders

      Justin Sanders - 2021-05-23

      Yes I do. I had originally downloaded the package from the repository and found out when running CMake to prepare everything that it was the incorrect version.

       
  • Justin Sanders

    Justin Sanders - 2021-05-23

    UPDATE: I uninstalled OpenBabel 2.4 from the Raspberry Pi and it compiled and worked just fine. Thanks for the help.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.