DrTimothyAldenDavis / SuiteSparse

The official SuiteSparse library: a suite of sparse matrix algorithms authored or co-authored by Tim Davis, Texas A&M University.
https://people.engr.tamu.edu/davis/suitesparse.html
Other
1.18k stars 263 forks source link

cannot install Suite Sparse 5.7.1 on my RHEL 7 machine #28

Closed rrajasekpro closed 4 years ago

rrajasekpro commented 4 years ago

Describe the bug I am trying to install SuiteSparse 5.7.1 on my RHEL box

To Reproduce

  1. download SuiteSparse-5.7.1.tar.gz
  2. tar zxvf SuiteSparse-5.7.1.tar.gz

  3. cd SuiteSparse-5.7.1
  4. make .... [ 23%] Building CXX object CMakeFiles/mongoose_lib_dbg.dir/Source/Mongoose_QPNapDown.o [ 24%] Building CXX object CMakeFiles/mongoose_lib_dbg.dir/Source/Mongoose_QPNapsack.o [ 25%] Building CXX object CMakeFiles/mongoose_lib_dbg.dir/Source/Mongoose_QPNapUp.o [ 25%] Building C object CMakeFiles/mongoose_lib_dbg.dir/External/mmio/Source/mmio.c.o cc1: warning: command line option â-Woverloaded-virtualâ is valid for C++/ObjC++ but not for C [enabled by default] [ 26%] Linking CXX static library lib/libmongoose_dbg.a make[4]: Leaving directory /home/rrajasek/SuiteSparse-5.7.1/Mongoose/build' [ 26%] Built target mongoose_lib_dbg make[4]: Entering directory/home/rrajasek/SuiteSparse-5.7.1/Mongoose/build' Scanning dependencies of target mongoose_unit_test_graph make[4]: Leaving directory /home/rrajasek/SuiteSparse-5.7.1/Mongoose/build' make[4]: Entering directory/home/rrajasek/SuiteSparse-5.7.1/Mongoose/build' [ 27%] Building CXX object CMakeFiles/mongoose_unit_test_graph.dir/Tests/Mongoose_UnitTest_Graph_exe.o [ 28%] Linking CXX executable tests/mongoose_unit_test_graph lib/libmongoose_dbg.a(Mongoose_IO.o): In function Mongoose::read_graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /home/rrajasek/SuiteSparse-5.7.1/Mongoose/Source/Mongoose_IO.cpp:34: undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::c_str() const' lib/libmongoose_dbg.a(Mongoose_IO.o): In function `Mongoose::read_matrix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, char (&) [4])': /home/rrajasek/SuiteSparse-5.7.1/Mongoose/Source/Mongoose_IO.cpp:39: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const' lib/libmongoose_dbg.a(Mongoose_IO.o): In functionMongoose::read_matrix(char const, char (&) [4])': /home/rrajasek/SuiteSparse-5.7.1/Mongoose/Source/Mongoose_IO.cpp:85: undefined reference to `std::__cxx11::basic_string<char, std::char_traits, std::allocator >::basic_string(char const, std::allocator const&)' /home/rrajasek/SuiteSparse-5.7.1/Mongoose/Source/Mongoose_IO.cpp:85: undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /home/rrajasek/SuiteSparse-5.7.1/Mongoose/Source/Mongoose_IO.cpp:85: undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()' /home/rrajasek/SuiteSparse-5.7.1/Mongoose/Source/Mongoose_IO.cpp:85: undefined reference to `std::cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()' collect2: error: ld returned 1 exit status make[4]: [tests/mongoose_unit_test_graph] Error 1 make[4]: Leaving directory `/home/rrajasek/SuiteSparse-5.7.1/Mongoose/build' make[3]: [CMakeFiles/mongoose_unit_test_graph.dir/all] Error 2 make[3]: Leaving directory /home/rrajasek/SuiteSparse-5.7.1/Mongoose/build' make[2]: *** [all] Error 2 make[2]: Leaving directory/home/rrajasek/SuiteSparse-5.7.1/Mongoose/build' /bin/sh: ./bin/demo: No such file or directory make[1]: [default] Error 127 make[1]: Leaving directory `/home/rrajasek/SuiteSparse-5.7.1/Mongoose' make: [go] Error 2

Expected behavior clean install of SuiteSparse

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context I have verified with Dr Davis that my cmake works.

DrTimothyAldenDavis commented 4 years ago

This is a problem with your C++ library, not with SuiteSparse.

gcc 6.1.0 should be fine, as it fully supports C++11 (and 14 and most of 17). Also, the current version of Mongoose in SuiteSparse doesn’t even require C++11, so that shouldn’t be a show-stopper either way.

It seems to be a problem with different versions of GCC compiling different portions of the code, or an outdated version of libstdc++. Ultimately, a version mismatch in the toolchain. I would suggest trying:

yum upgrade libstdc++

or attempt to explicitly link with the version that comes with GCC 6.

rrajasekpro commented 4 years ago

Thank you. I will try that and let you know. But can you confirm the steps I took?

DrTimothyAldenDavis commented 4 years ago

The steps you used are fine. It's your library setup for gcc and/or libc++11 that is broken.

On Fri, Apr 3, 2020 at 1:10 PM rrajasekpro notifications@github.com wrote:

Thank you. I will try that and let you know. But can you confirm the steps I took?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/28#issuecomment-608585555, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYIIOOFZRS3KN4LQY4DTJ3RKYRAHANCNFSM4LVJSRUA .