Undefined Reference to 'boost::system::generic_category()'
Hello everyone, I have been attempting to install OpenFOAM however the boost library has been giving me trouble, most recently reading out these error during OpenFOAM installation. undefined reference to `boost::system::generic_category()' undefined reference to `boost::system::system_category()' undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptrboost::detail::tss_cleanup_function, void*, bool)' undefined reference to `boost::detail::get_tss_data(void const*)' If anyone has ever encountered this problem before, or has a hypothesis on how to solve I would be eager to hear your advice. I should mention that this error has persisted across multiple attempts at boost installs (1.48.0,1.52, and 1.61.0) as well as an update of my system from Ubuntu 12.04 to 14.04. Thank you everyone for your time in reading this and for any advice you may give. All the best, Blair Climenhaga
On 15 June 2016 at 21:24, Blair Climenhaga
Hello everyone,
I have been attempting to install OpenFOAM however the boost library has been giving me trouble, most recently reading out these error during OpenFOAM installation.
undefined reference to `boost::system::generic_category()' undefined reference to `boost::system::system_category()'
You need to link with -lboost_system (or equivalent for whatever name your platform uses). Most libraries in boost are header only, but that is not true for everything. Boost system is one of the libraries that needs a compiled library.
undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptrboost::detail::tss_cleanup_function, void*, bool)' undefined reference to `boost::detail::get_tss_data(void const*)'
Similar problem, link with -lboost_thread Regards, Maarten
Thanks Maarten,
How would I go about linking -lboost_system and -lboost_thread? I'm sorry, I am just starting out with Linux. I should say that I am using Ubuntu 14.04. Thanks in advance for any and all help you can provide.
All the best,
Blair Climenhaga
From: maarten@de-vri.es
Date: Wed, 15 Jun 2016 22:29:16 +0200
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Undefined Reference to 'boost::system::generic_category()'
On 15 June 2016 at 21:24, Blair Climenhaga
On 16.06.2016 16:00, Blair Climenhaga wrote:
Thanks Maarten,
How would I go about linking -lboost_system and -lboost_thread? I'm sorry, I am just starting out with Linux. I should say that I am using Ubuntu 14.04. Thanks in advance for any and all help you can provide.
Exactly the way you've written: add "-lboost_system -lboost_thread" to the command line. If you installed Ubuntu's boost-all-dev package the libraries should already be under /usr/li where linker will find t hem;; if not add -L<path-to-directory-containing-libraries> to tell the linker where the libraries are. Cheers, Leon
All the best, Blair Climenhaga
------------------------------------------------------------------------ From: maarten@de-vri.es Date: Wed, 15 Jun 2016 22:29:16 +0200 To: boost-users@lists.boost.org Subject: Re: [Boost-users] Undefined Reference to 'boost::system::generic_category()'
On 15 June 2016 at 21:24, Blair Climenhaga
mailto:blairclimenhaga@hotmail.ca> wrote: Hello everyone,
I have been attempting to install OpenFOAM however the boost library has been giving me trouble, most recently reading out these error during OpenFOAM installation.
undefined reference to `boost::system::generic_category()' undefined reference to `boost::system::system_category()'
You need to link with -lboost_system (or equivalent for whatever name your platform uses). Most libraries in boost are header only, but that is not true for everything. Boost system is one of the libraries that needs a compiled library.
undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptrboost::detail::tss_cleanup_function, void*, bool)' undefined reference to `boost::detail::get_tss_data(void const*)'
Similar problem, link with -lboost_thread
Regards, Maarten
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hello Leon,
Thanks for your quick response! I'm not sure if I understand what you mean (my fault not yours). I typed "-lboost_system" and "-lboost_thread" into the command line of the terminal however both types it returned the error message "command not found". I assume you mean to add these lines to the .bashrc or to the install file for openfoam. Is this correct?
You are correct that the boost files are downloaded to the /usr/lib, however searching through the lib directory I find that the most similar libraries to those discussed are the "libboost_system.so.1.54.0" and "libboost_thread.so.1.54.0" files, are these the correct files? Again thank you for all your help, I really appreciate it.
All the best,
Blair Climenhaga
To: boost-users@lists.boost.org
From: leon@digiverse.si
Date: Thu, 16 Jun 2016 16:07:32 +0200
Subject: Re: [Boost-users] Undefined Reference to 'boost::system::generic_category()'
On 16.06.2016 16:00, Blair Climenhaga
wrote:
Thanks Maarten,
How would I go about linking -lboost_system and -lboost_thread?
I'm sorry, I am just starting out with Linux. I should say that
I am using Ubuntu 14.04. Thanks in advance for any and all help
you can provide.
Exactly the way you've written: add "-lboost_system -lboost_thread"
to the command line. If you installed Ubuntu's boost-all-dev package
the libraries should already be under /usr/li where linker will find
t hem;; if not add -L<path-to-directory-containing-libraries>
to tell the linker where the libraries are.
Cheers,
Leon
All the best,
Blair Climenhaga
From: maarten@de-vri.es
Date: Wed, 15 Jun 2016 22:29:16 +0200
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Undefined Reference to
'boost::system::generic_category()'
On 15 June 2016 at 21:24,
Blair Climenhaga
On 16.06.2016 16:27, Blair Climenhaga wrote:
Hello Leon,
Thanks for your quick response! I'm not sure if I understand what you mean (my fault not yours). I typed "-lboost_system" and "-lboost_thread" into the command line of the terminal however both types it returned the error message "command not found". I assume you mean to add these lines to the .bashrc or to the install file for openfoam. Is this correct? No, I meant append them as the command line parameters to the command you use to (compile and) link whatever program you are building. As the simplest example:
$ g++ a,cpp -o a -lboost_system -lboost_thread or perhaps: $ g++ a,cpp -o a -L /usr/local/lib -lboost_system-mt -lboost_thread-mt as I have to on my Mac where brew Boost gets installed in /usr/local. I'm also not sure whether Ubuntu installs both -mt and non-mt (multi-threading support) variants. Cheers, Leon
You are correct that the boost files are downloaded to the /usr/lib, however searching through the lib directory I find that the most similar libraries to those discussed are the "libboost_system.so.1.54.0" and "libboost_thread.so.1.54.0" files, are these the correct files? Again thank you for all your help, I really appreciate it.
All the best, Blair Climenhaga
------------------------------------------------------------------------ To: boost-users@lists.boost.org From: leon@digiverse.si Date: Thu, 16 Jun 2016 16:07:32 +0200 Subject: Re: [Boost-users] Undefined Reference to 'boost::system::generic_category()'
On 16.06.2016 16:00, Blair Climenhaga wrote:
Thanks Maarten,
How would I go about linking -lboost_system and -lboost_thread? I'm sorry, I am just starting out with Linux. I should say that I am using Ubuntu 14.04. Thanks in advance for any and all help you can provide.
Exactly the way you've written: add "-lboost_system -lboost_thread" to the command line. If you installed Ubuntu's boost-all-dev package the libraries should already be under /usr/li where linker will find t hem;; if not add -L<path-to-directory-containing-libraries> to tell the linker where the libraries are.
Cheers,
Leon
All the best, Blair Climenhaga
------------------------------------------------------------------------ From: maarten@de-vri.es mailto:maarten@de-vri.es Date: Wed, 15 Jun 2016 22:29:16 +0200 To: boost-users@lists.boost.org mailto:boost-users@lists.boost.org Subject: Re: [Boost-users] Undefined Reference to 'boost::system::generic_category()'
On 15 June 2016 at 21:24, Blair Climenhaga
mailto:blairclimenhaga@hotmail.ca> wrote: Hello everyone,
I have been attempting to install OpenFOAM however the boost library has been giving me trouble, most recently reading out these error during OpenFOAM installation.
undefined reference to `boost::system::generic_category()' undefined reference to `boost::system::system_category()'
You need to link with -lboost_system (or equivalent for whatever name your platform uses). Most libraries in boost are header only, but that is not true for everything. Boost system is one of the libraries that needs a compiled library.
undefined reference to `boost::detail::set_tss_data(void const*, boost::shared_ptrboost::detail::tss_cleanup_function, void*, bool)' undefined reference to `boost::detail::get_tss_data(void const*)'
Similar problem, link with -lboost_thread
Regards, Maarten
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org mailto:Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org mailto:Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Am 16.06.2016 um 16:27 schrieb Blair Climenhaga:
Hello Leon,
Thanks for your quick response! I'm not sure if I understand what you mean (my fault not yours). I typed "-lboost_system" and "-lboost_thread" into the command line of the terminal however both types it returned the error message "command not found". I assume you mean to add these lines to the .bashrc or to the install file for openfoam. Is this correct?
You are correct that the boost files are downloaded to the /usr/lib, however searching through the lib directory I find that the most similar libraries to those discussed are the "libboost_system.so.1.54.0" and "libboost_thread.so.1.54.0" files, are these the correct files? Again thank you for all your help, I really appreciate it.
You should definitely read (at least) this: http://www.boost.org/doc/libs/1_61_0/more/getting_started/unix-variants.html... HTH Stefan -- ---------------------------------------------------------------- /dev/random says: Useless Invention: Candy bars with stannous fluoride added. python -c "print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')" GPG Key fingerprint = 2DF5 E01B 09C3 7501 BCA9 9666 829B 49C5 9221 27AF
participants (4)
-
Blair Climenhaga
-
Leon Mlakar
-
Maarten de Vries
-
stefan.naewe@atlas-elektronik.com