Cannot find -lboost_thhread with upgrade from 1.35 to 1.37
Hi I just upgraded my OS from Ubuntu 8.10 to 9.04 and Boost upgraded at the same time from 1.35 to 1.37. I get some errors linked to the compilation command with g++ : /usr/bin/ld: cannot find -lboost_thread /usr/bin/ld: cannot find -lboost_filesystem These compilation options were working with the 1.35 version of Boost. I'd like to know wether there has been a change in Boost concerning the compilation options or if anything else have changed that would cause that problem. Thanks in advance for the answers. Johan Mazel
On Tue, Apr 28, 2009 at 09:50, Johan Mazel
I just upgraded my OS from Ubuntu 8.10 to 9.04 and Boost upgraded at the same time from 1.35 to 1.37. I get some errors linked to the compilation command with g++ : /usr/bin/ld: cannot find -lboost_thread /usr/bin/ld: cannot find -lboost_filesystem These compilation options were working with the 1.35 version of Boost. I'd like to know wether there has been a change in Boost concerning the compilation options or if anything else have changed that would cause that problem.
If you're lucky, it's just a matter of the package manager not doing things in the order that gets those symlinks set up properly, meaning it's a place where uninstalling all the boost libs, then reinstalling actually has a decent chance of working. The various packages for different distros often do things differently from the official ways, though, so it's hard to say. Check your /usr/lib folder and see what binaries you actually have.
Hi
I just tried to reinstall the library as you said through my packet manager
with the reinstallation option (I didn't delete and then reinstall them).
But it's still not working.
I looked in /usr/lib and i found a lot of *.a, *.so and *.O files.
For examples : libboost_filesystem-mt.a, libboost_filesystem-mt.so,
libboost_filesystem-mt.O, libboost_thread-mt.a, libboost_thread-mt.so,
libboost_thread-mt.O.
It looks Ok to me but I'm not a specialist but the .O files look like
binaries....
Is it possible to find a way around and indicate the direct path to the
binaries ?
Thanks for the help.
Johan Mazel
2009/4/28 Scott McMurray
I just upgraded my OS from Ubuntu 8.10 to 9.04 and Boost upgraded at the same time from 1.35 to 1.37. I get some errors linked to the compilation command with g++ : /usr/bin/ld: cannot find -lboost_thread /usr/bin/ld: cannot find -lboost_filesystem These compilation options were working with the 1.35 version of Boost. I'd like to know wether there has been a change in Boost concerning the compilation options or if anything else have changed that would cause
On Tue, Apr 28, 2009 at 09:50, Johan Mazel
wrote: that problem.
If you're lucky, it's just a matter of the package manager not doing things in the order that gets those symlinks set up properly, meaning it's a place where uninstalling all the boost libs, then reinstalling actually has a decent chance of working.
The various packages for different distros often do things differently from the official ways, though, so it's hard to say. Check your /usr/lib folder and see what binaries you actually have. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Tuesday 28 April 2009 13:46:59 Johan Mazel wrote:
For examples : libboost_filesystem-mt.a, libboost_filesystem-mt.so, libboost_filesystem-mt.O, libboost_thread-mt.a, libboost_thread-mt.so, libboost_thread-mt.O.
From your description, it seems that only the multi-threaded libraries are installed. So you might need -lboost_filesystem-mt rather than - lboost_filesystem. Regards, Ravi
Hi
From your description, it seems that only the multi-threaded libraries are installed.
Actually, the full list is the following one : libboost_date_time-mt.a libboost_date_time-mt-d.a libboost_date_time-mt-d.so libboost_date_time-mt-d.so.1.37.0 libboost_date_time-mt.so libboost_date_time-mt.so.1.37.0 libboost_filesystem-mt.a libboost_filesystem-mt-d.a libboost_filesystem-mt-d.so libboost_filesystem-mt-d.so.1.37.0 libboost_filesystem-mt.so libboost_filesystem-mt.so.1.37.0 libboost_graph-mt.a libboost_graph-mt-d.a libboost_graph-mt-d.so libboost_graph-mt-d.so.1.37.0 libboost_graph-mt.so libboost_graph-mt.so.1.37.0 libboost_iostreams-mt.a libboost_iostreams-mt-d.a libboost_iostreams-mt-d.so libboost_iostreams-mt-d.so.1.37.0 libboost_iostreams-mt.so libboost_iostreams-mt.so.1.37.0 libboost_math_c99f-mt.a libboost_math_c99f-mt-d.a libboost_math_c99f-mt-d.so libboost_math_c99f-mt-d.so.1.37.0 libboost_math_c99f-mt.so libboost_math_c99f-mt.so.1.37.0 libboost_math_c99l-mt.a libboost_math_c99l-mt-d.a libboost_math_c99l-mt-d.so libboost_math_c99l-mt-d.so.1.37.0 libboost_math_c99l-mt.so libboost_math_c99l-mt.so.1.37.0 libboost_math_c99-mt.a libboost_math_c99-mt-d.a libboost_math_c99-mt-d.so libboost_math_c99-mt-d.so.1.37.0 libboost_math_c99-mt.so libboost_math_c99-mt.so.1.37.0 libboost_math_tr1f-mt.a libboost_math_tr1f-mt-d.a libboost_math_tr1f-mt-d.so libboost_math_tr1f-mt-d.so.1.37.0 libboost_math_tr1f-mt.so libboost_math_tr1f-mt.so.1.37.0 libboost_math_tr1l-mt.a libboost_math_tr1l-mt-d.a libboost_math_tr1l-mt-d.so libboost_math_tr1l-mt-d.so.1.37.0 libboost_math_tr1l-mt.so libboost_math_tr1l-mt.so.1.37.0 libboost_math_tr1-mt.a libboost_math_tr1-mt-d.a libboost_math_tr1-mt-d.so libboost_math_tr1-mt-d.so.1.37.0 libboost_math_tr1-mt.so libboost_math_tr1-mt.so.1.37.0 libboost_prg_exec_monitor-mt.a libboost_prg_exec_monitor-mt-d.a libboost_prg_exec_monitor-mt-d.so libboost_prg_exec_monitor-mt-d.so.1.37.0 libboost_prg_exec_monitor-mt.so libboost_prg_exec_monitor-mt.so.1.37.0 libboost_program_options-mt.a libboost_program_options-mt-d.a libboost_program_options-mt-d.so libboost_program_options-mt-d.so.1.37.0 libboost_program_options-mt.so libboost_program_options-mt.so.1.37.0 libboost_python-mt.a libboost_python-mt-d-py25.a libboost_python-mt-d-py25.so libboost_python-mt-d-py25.so.1.37.0 libboost_python-mt-d-py26.a libboost_python-mt-d-py26.so libboost_python-mt-d-py26.so.1.37.0 libboost_python-mt-py25.a libboost_python-mt-py25.so libboost_python-mt-py25.so.1.37.0 libboost_python-mt-py26.a libboost_python-mt-py26.so libboost_python-mt-py26.so.1.37.0 libboost_python-mt.so libboost_regex-mt.a libboost_regex-mt-d.a libboost_regex-mt-d.so libboost_regex-mt-d.so.1.37.0 libboost_regex-mt.so libboost_regex-mt.so.1.37.0 libboost_serialization-mt.a libboost_serialization-mt-d.a libboost_serialization-mt-d.so libboost_serialization-mt-d.so.1.37.0 libboost_serialization-mt.so libboost_serialization-mt.so.1.37.0 libboost_signals-mt.a libboost_signals-mt-d.a libboost_signals-mt-d.so libboost_signals-mt-d.so.1.37.0 libboost_signals-mt.so libboost_signals-mt.so.1.37.0 libboost_system-mt.a libboost_system-mt-d.a libboost_system-mt-d.so libboost_system-mt-d.so.1.37.0 libboost_system-mt.so libboost_system-mt.so.1.37.0 libboost_thread-mt.a libboost_thread-mt-d.a libboost_thread-mt-d.so libboost_thread-mt-d.so.1.37.0 libboost_thread-mt.so libboost_thread-mt.so.1.37.0 libboost_unit_test_framework-mt.a libboost_unit_test_framework-mt-d.a libboost_unit_test_framework-mt-d.so libboost_unit_test_framework-mt-d.so.1.37.0 libboost_unit_test_framework-mt.so libboost_unit_test_framework-mt.so.1.37.0 libboost_wave-mt.a libboost_wave-mt-d.a libboost_wave-mt-d.so libboost_wave-mt-d.so.1.37.0 libboost_wave-mt.so libboost_wave-mt.so.1.37.0 libboost_wserialization-mt.a libboost_wserialization-mt-d.a libboost_wserialization-mt-d.so libboost_wserialization-mt-d.so.1.37.0 libboost_wserialization-mt.so libboost_wserialization-mt.so.1.37.0
So you might need -lboost_filesystem-mt rather than - lboost_filesystem.
You mean that I should use -lboost_filesystem-mt instead of -lboost_filesystem ? If that is the case I just tried to use these options and the seem to be working. But there is one remaining problem, I get an error like this : /usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_posix_category()' My compilation options are : -lboost_filesystem-mt -lboost_thread-mt -lboost_system-mt. Thanks for the help. Johan Mazel
On Wed, Apr 29, 2009 at 11:09 AM, Johan Mazel
Hi You mean that I should use -lboost_filesystem-mt instead of -lboost_filesystem ?
When you write -lxxx, your compiler look for libxxx.a or libxxx.so
If that is the case I just tried to use these options and the seem to be working. But there is one remaining problem, I get an error like this :
/usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_posix_category()'
I don't use Boost.System, but according to its documentation: http://www.boost.org/doc/libs/1_38_0/libs/system/doc/reference.html#Deprecat... You should use get_generic_category() instead of get_posix_category() You can also use the command nm to verify if 'yyy' function is in 'xxx' library: nm -C /usr/lib/libxxx.a | grep yyy IMHO, get_posix_category is in libboost_system.a, but not in libboost_system-mt.a Regards, -- Johan
Hi
I finally solved the problem.
I just had to change from -lboost_xxx to -lboost_xxx-mt.
The remaining problem was just a consequence of my IDE (Eclipse) that was
keeping some "cache" file that were still using old versions of Boost
library.
Sorry for the inconvenience and the silly questions.
Thanks for the help.
Johan Mazel
2009/4/29 Johan Oudinet
On Wed, Apr 29, 2009 at 11:09 AM, Johan Mazel
wrote: Hi You mean that I should use -lboost_filesystem-mt instead of -lboost_filesystem ?
When you write -lxxx, your compiler look for libxxx.a or libxxx.so
If that is the case I just tried to use these options and the seem to be working. But there is one remaining problem, I get an error like this :
/usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_posix_category()'
I don't use Boost.System, but according to its documentation:
http://www.boost.org/doc/libs/1_38_0/libs/system/doc/reference.html#Deprecat... You should use get_generic_category() instead of get_posix_category()
You can also use the command nm to verify if 'yyy' function is in 'xxx' library: nm -C /usr/lib/libxxx.a | grep yyy
IMHO, get_posix_category is in libboost_system.a, but not in libboost_system-mt.a
Regards,
-- Johan _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (4)
-
Johan Mazel
-
Johan Oudinet
-
Ravi
-
Scott McMurray