Reputation: 1899
I'm compiling a c++ application on a very old system with libstdc++6. This libstdc++6 has functions up to GLIBCXX_3.4.21.
I need to use an external .so library which uses just a few more functions up to @GLIBCXX_3.4.22 and I can't recompile it.
For some other reasons, the old system is too old to be upgraded. The compilation errors are:
undefined reference to `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())'
undefined reference to `std::thread::_State::~_State()'
undefined reference to `typeinfo for std::thread::_State'
undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
undefined reference to `typeinfo for std::thread::_State@GLIBCXX_3.4.22'
undefined reference to `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())@GLIBCXX_3.4.22'
I found a newer libstdc++.so.6 and I managed to make work my app with:
LD_PRELOAD="libstdc++.so.6"
but I would like to avoid mixing different libstdc++.so.6 and overwriting the original library.
How could I find and add the relevant C++ code to my app in order to provide the missing functions of the std namespace? I think that I'm missing only the following functions:
std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())
std::thread::_State::~_State()
std::thread::_State
Upvotes: 1
Views: 78