openmm / openmm-plumed

OpenMM plugin to interface with PLUMED
55 stars 23 forks source link

make error #21

Closed aakognole closed 5 years ago

aakognole commented 5 years ago

Hi, I am getting following error while during make install. I don't know what it's about. Can you please help me with it?

[ 3%] Building CXX object CMakeFiles/OpenMMPlumed.dir/openmmapi/src/PlumedForce.cpp.o [ 7%] Building CXX object CMakeFiles/OpenMMPlumed.dir/openmmapi/src/PlumedForceImpl.cpp.o [ 11%] Building CXX object CMakeFiles/OpenMMPlumed.dir/serialization/src/PlumedForceProxy.cpp.o [ 15%] Building CXX object CMakeFiles/OpenMMPlumed.dir/serialization/src/PlumedSerializationProxyRegistration.cpp.o [ 19%] Linking CXX shared library libOpenMMPlumed.so [ 19%] Built target OpenMMPlumed [ 23%] Building CXX object serialization/tests/CMakeFiles/TestSerializePlumedForce.dir/TestSerializePlumedForce.cpp.o [ 26%] Linking CXX executable TestSerializePlumedForce /home/akognole/modules/plumed/lib/libplumed.so: undefined reference to std::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned long, unsigned long, unsigned long) const@GLIBCXX_3.4.18' /home/akognole/modules/plumed/lib/libplumed.so: undefined reference tostd::throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20' /home/akognole/modules/plumed/lib/libplumed.so: undefined reference to std::__detail::_Prime_rehash_policy::_M_next_bkt(unsigned long) const@GLIBCXX_3.4.18' /home/akognole/modules/plumed/lib/libplumed.so: undefined reference tocxa_throw_bad_array_new_length@CXXABI_1.3.8' /home/akognole/modules/plumed/lib/libplumed.so: undefined reference to std::chrono::_V2::system_clock::now()@GLIBCXX_3.4.19' /home/akognole/modules/plumed/lib/libplumed.so: undefined reference tostd::_Hash_bytes(void const*, unsigned long, unsigned long)@CXXABI_1.3.5' collect2: ld returned 1 exit status make[2]: [serialization/tests/TestSerializePlumedForce] Error 1 make[1]: [serialization/tests/CMakeFiles/TestSerializePlumedForce.dir/all] Error 2 make: *** [all] Error 2

peastman commented 5 years ago

I've never seen that error, but a search turns up this post: https://github.com/fenderglass/Ragout/issues/4. It sounds like it's probably caused by using a compiler that's too old. What are you compiling with?

aakognole commented 5 years ago

I guess the compiler is not that old. I am trying this on a cluster, I did this on another cluster an year ago.
I am using plumed 2.4.2 and openmm 7.2.2. I also tried older versions. Don't know what this is about?

[akognole@comet-ln2 ~]$ gcc --version gcc (GCC) 4.9.2

gitkol commented 5 years ago

Hi,

I have a similar issue. My system is Ubuntu 18.04, installed OpenMM 7.3 with conda and CUDA 10, and Plumed 2.50 from source. Do you have any suggestion?

Many thanks,

Istvan

$ make install Scanning dependencies of target OpenMMPlumed [ 3%] Building CXX object CMakeFiles/OpenMMPlumed.dir/openmmapi/src/PlumedForce.cpp.o [ 7%] Building CXX object CMakeFiles/OpenMMPlumed.dir/openmmapi/src/PlumedForceImpl.cpp.o [ 11%] Building CXX object CMakeFiles/OpenMMPlumed.dir/serialization/src/PlumedForceProxy.cpp.o [ 15%] Building CXX object CMakeFiles/OpenMMPlumed.dir/serialization/src/PlumedSerializationProxyRegistration.cpp.o [ 19%] Linking CXX shared library libOpenMMPlumed.so [ 19%] Built target OpenMMPlumed Scanning dependencies of target TestSerializePlumedForce [ 23%] Building CXX object serialization/tests/CMakeFiles/TestSerializePlumedForce.dir/TestSerializePlumedForce.cpp.o [ 26%] Linking CXX executable TestSerializePlumedForce CMakeFiles/TestSerializePlumedForce.dir/TestSerializePlumedForce.cpp.o: In function testSerialization()': TestSerializePlumedForce.cpp:(.text+0x1ff): undefined reference toOpenMM::throwException(char const, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)' CMakeFiles/TestSerializePlumedForce.dir/TestSerializePlumedForce.cpp.o: In function `void OpenMM::XmlSerializer::serialize(PlumedPlugin::PlumedForce const, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::ostream&)': TestSerializePlumedForce.cpp:(.text._ZN6OpenMM13XmlSerializer9serializeIN12PlumedPlugin11PlumedForceEEEvPKT_RKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSo[_ZN6OpenMM13XmlSerializer9serializeIN12PlumedPlugin11PlumedForceEEEvPKT_RKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSo]+0x72): undefined reference to `OpenMM::SerializationNode::setName(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' TestSerializePlumedForce.cpp:(.text._ZN6OpenMM13XmlSerializer9serializeIN12PlumedPlugin11PlumedForceEEEvPKT_RKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSo[_ZN6OpenMM13XmlSerializer9serializeIN12PlumedPlugin11PlumedForceEEEvPKT_RKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSo]+0xe3): undefined reference to OpenMM::SerializationNode::hasProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' TestSerializePlumedForce.cpp:(.text._ZN6OpenMM13XmlSerializer9serializeIN12PlumedPlugin11PlumedForceEEEvPKT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSo[_ZN6OpenMM13XmlSerializer9serializeIN12PlumedPlugin11PlumedForceEEEvPKT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSo]+0x123): undefined reference toOpenMM::SerializationProxy::getTypeName[abi:cxx11]() const' TestSerializePlumedForce.cpp:(.text._ZN6OpenMM13XmlSerializer9serializeIN12PlumedPlugin11PlumedForceEEEvPKT_RKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSo[_ZN6OpenMM13XmlSerializer9serializeIN12PlumedPlugin11PlumedForceEEEvPKT_RKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSo]+0x185): undefined reference to OpenMM::SerializationProxy::getTypeName[abi:cxx11]() const' TestSerializePlumedForce.cpp:(.text._ZN6OpenMM13XmlSerializer9serializeIN12PlumedPlugin11PlumedForceEEEvPKT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSo[_ZN6OpenMM13XmlSerializer9serializeIN12PlumedPlugin11PlumedForceEEEvPKT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSo]+0x1cd): undefined reference toOpenMM::SerializationNode::setStringProperty(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' ../../libOpenMMPlumed.so: undefined reference to OpenMM::Platform::createKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, OpenMM::ContextImpl&) const' ../../libOpenMMPlumed.so: undefined reference toOpenMM::SerializationNode::getIntProperty(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' ../../libOpenMMPlumed.so: undefined reference to `OpenMM::SerializationNode::getStringProperty(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' ../../libOpenMMPlumed.so: undefined reference to OpenMM::SerializationNode::setIntProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' ../../libOpenMMPlumed.so: undefined reference toOpenMM::SerializationProxy::SerializationProxy(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)' collect2: error: ld returned 1 exit status serialization/tests/CMakeFiles/TestSerializePlumedForce.dir/build.make:95: recipe for target 'serialization/tests/TestSerializePlumedForce' failed make[2]: [serialization/tests/TestSerializePlumedForce] Error 1 CMakeFiles/Makefile2:122: recipe for target 'serialization/tests/CMakeFiles/TestSerializePlumedForce.dir/all' failed make[1]: [serialization/tests/CMakeFiles/TestSerializePlumedForce.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2

gitkol commented 5 years ago

It looks like the undefined reference is referring to a OpenMM function. Is it possible that this plugin is not compatible with OpenMM 7.3?

gitkol commented 5 years ago

My bad, this is the build issue #16.