CBDD / rDock

rDock is a fast and versatile Open Source docking program that can be used to dock small molecules against proteins and nucleic acids. It is designed for High Throughput Virtual Screening (HTVS) campaigns and Binding Mode prediction studies.
https://rdock.github.io
GNU Lesser General Public License v3.0
51 stars 22 forks source link

New main branch breaks centos7 build #13

Closed scottwsides closed 1 year ago

scottwsides commented 1 year ago

My builds that have worked for rDock for years just broke. I see the updated compilation instructions and I have all the deps. I'm seeing ++ -c -pipe -m64 -fpermissive -Wno-deprecated -O3 -ffast-math -fPIC -D_NDEBUG -I"../include" -I"../include/GP" -I"../import/simplex/include" -I"../import/tnt/include" -o linux-g++-64/release/obj/RbtBaseSF.o ../src/lib/RbtBaseSF.cxx ../src/lib/RbtBaseMolecularFileSource.cxx: In member function ‘void RbtBaseMolecularFileSource::RemoveAtom(RbtAtomPtr)’: ../src/lib/RbtBaseMolecularFileSource.cxx:264:20: warning: ISO C++ forbids declaration of ‘mapIter’ with no type [-fpermissive] for (const auto &mapIter : bondMap) ^ ../src/lib/RbtBaseMolecularFileSource.cxx:264:30: error: range-based ‘for’ loops are not allowed in C++98 mode for (const auto &mapIter : bondMap) ^ ../src/lib/RbtBaseMolecularFileSource.cxx:266:80: error: request for member ‘first’ in ‘mapIter’, which is of non-class type ‘const int’ RbtBondListIter bIter = Rbt::FindBond(m_bondList, Rbt::isBond_eq((mapIter).first)); ^ ../src/lib/RbtBaseMolecularFileSource.cxx:272:13: error: ‘bIter’ does not name a type for (auto bIter : bondIterators) ^ ../src/lib/RbtBaseMolecularFileSource.cxx:287:3: error: expected ‘;’ before ‘RbtAtomListIter’ RbtAtomListIter aIter = Rbt::FindAtom(m_atomList,std::bind2nd(Rbt::isAtom_eq(),spAtom)); ^ ../src/lib/RbtBaseMolecularFileSource.cxx:287:89: error: could not convert ‘aIter’ from ‘RbtAtomListIter {aka __gnu_cxx::__normal_iterator<SmartPtr*, std::vector<SmartPtr > >}’ to ‘bool’ RbtAtomListIter aIter = Rbt::FindAtom(m_atomList,std::bind2nd(Rbt::isAtom_eq(),spAtom)); ^ ../src/lib/RbtBaseMolecularFileSource.cxx:288:3: error: expected primary-expression before ‘if’ if (aIter != m_atomList.end()) { ^ ../src/lib/RbtBaseMolecularFileSource.cxx:288:3: error: expected ‘)’ before ‘if’ g++ -c -pipe -m64 -fpermissive -Wno-deprecated -O3 -ffast-math -fPIC -D_NDEBUG -I"../include" -I"../include/GP" -I"../import/simplex/include" -I"../import/tnt/include" -o linux-g++-64/release/obj/RbtBaseTransform.o ../src/lib/RbtBaseTransform.cxx make[2]: *** [linux-g++-64/release/obj/RbtBaseMolecularFileSource.o] Error

scottwsides commented 1 year ago

I added the following '-std=c++0x' to the tmake config that sets the compiler flags and that fixed build

BTW, why not upgrade to a modern build/configure system like CMake? These autotool-like configure utilities are out-of-date

ggutierrez-sunbright commented 1 year ago

That was the next thing in my roadmap, getting rid of tmake and setting up a pipeline with github actions, circle-ci, or any other tool to make sure the build works for all major distributions.

Also, I'd love to remove the -fpermissive and -fWno-deprecated flags and make the code c++17 compatible (as of today I think it compiles up to c++14).

I'll add the standard specification to the current build system while I work on the new one.

Thanks and regards