scipopt / scip

SCIP - Solving Constraint Integer Programs
Other
393 stars 63 forks source link

scipoptsuite-8.0.3 compilation failed #43

Closed HorizonLiang closed 1 year ago

HorizonLiang commented 1 year ago

When I compile and install scipoptsuite-8.0.3 on centos7, an error occurs as follows:

[ 4%] Linking CXX executable unit_test CMakeFiles/unit_test.dir/TestMain.cpp.o: In function Catch::TestGroupStats::~TestGroupStats()': TestMain.cpp:(.text+0xd34): undefined reference tooperator delete(void, unsigned long)' CMakeFiles/unit_test.dir/TestMain.cpp.o: In function Catch::TestRunStats::~TestRunStats()': TestMain.cpp:(.text+0xdb4): undefined reference tooperator delete(void, unsigned long)' CMakeFiles/unit_test.dir/TestMain.cpp.o: In function Catch::Matchers::Exception::ExceptionMessageMatcher::match(std::exception const&) const': TestMain.cpp:(.text+0xf15): undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const) const' CMakeFiles/unit_test.dir/TestMain.cpp.o: In function Catch::(anonymous namespace)::parseSpecialTag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': TestMain.cpp:(.text+0xfc2): undefined reference tostd::__cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const) const' TestMain.cpp:(.text+0xfd9): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const' TestMain.cpp:(.text+0xff5): undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const*) const' TestMain.cpp:(.text+0x1011): undefined reference to `std::cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const*) const' CMakeFiles/unit_test.dir/TestMain.cpp.o:TestMain.cpp:(.text+0x102d): more undefined references to `std::cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const) const' follow CMakeFiles/unit_test.dir/TestMain.cpp.o: In function `std::vector<std::cxx11::sub_match<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > >, std::allocator<std::cxx11::sub_match<gnu_cxx::__normal_iterator<char const*, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > > >::operator=(std::vector<std::cxx11::sub_match<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > > > const&) [clone .isra.0]': TestMain.cpp:(.text+0x1673): undefined reference to operator delete(void*, unsigned long)' CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionCatch::ExceptionTranslatorRegistry::registerTranslator(Catch::IExceptionTranslator const)': TestMain.cpp:(.text+0x1851): undefined reference to `operator delete(void, unsigned long)' CMakeFiles/unit_test.dir/TestMain.cpp.o: In function `void std::cxx11::basic_string<char, std::char_traits, std::allocator >::_M_construct<char const>(char const, char const, std::forward_iterator_tag) [clone .constprop.0]': TestMain.cpp:(.text+0x1aeb): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)' CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionCatch::Detail::(anonymous namespace)::StreamBufImpl<Catch::Detail::(anonymous namespace)::OutputDebugWriter, 256ul>::sync()': TestMain.cpp:(.text+0x1bb1): undefined reference to `operator delete(void, unsigned long)' CMakeFiles/unit_test.dir/TestMain.cpp.o: In function void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .constprop.0]': TestMain.cpp:(.text+0x1c4b): undefined reference tostd::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)' CMakeFiles/unit_test.dir/TestMain.cpp.o: In function non-virtual thunk to Catch::Matchers::Exception::ExceptionMessageMatcher::match(std::exception const&) const': TestMain.cpp:(.text+0x1e95): undefined reference tostd::__cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const) const' CMakeFiles/unit_test.dir/TestMain.cpp.o: In function Catch::ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry()': TestMain.cpp:(.text+0x1f6e): undefined reference tooperator delete(void, unsigned long)' CMakeFiles/unit_test.dir/TestMain.cpp.o: In function std::_Rb_tree<Catch::TestCase const*, Catch::TestCase const*, std::_Identity<Catch::TestCase const*>, std::less<Catch::TestCase const*>, std::allocator<Catch::TestCase const*> >::_M_erase(std::_Rb_tree_node<Catch::TestCase const*>*) [clone .isra.0]': TestMain.cpp:(.text+0x2043): undefined reference tooperator delete(void, unsigned long)' TestMain.cpp:(.text+0x205e): undefined reference to `operator delete(void, unsigned long)' TestMain.cpp:(.text+0x2079): undefined reference to operator delete(void*, unsigned long)' TestMain.cpp:(.text+0x209d): undefined reference tooperator delete(void*, unsigned long)'

ambros-gleixner commented 1 year ago

Can you provide the full log? It looks like this may come from PaPILO, but it is not fully clear.

sschnug commented 1 year ago

Wild guess: this looks like something related to https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html (D_GLIBCXX_USE_CXX11_ABI and such; especially linking two different configs together). This also seems more likely due to the fact that centos 7 has extremely old compilers (where defaults might behave very different from more modern environments).

alexhoen commented 1 year ago

closing this issue since the user did not reply anymore to the suggested solution.

@sschnug thanks for your contribution