thread: linux fedora .so built file under c++98 does not provide start_thread() symbol

hello, I am compiling my code with g++4.8.1 under c++11 mode, however the fedora's system provided boost thread lib has been compiled under c++98. Linking fails because of errors like: mainthread.cpp:(.text+0x2cf): undefined reference to `boost::thread::start_thread()' mainthread.cpp:(.text+0xcc9): undefined reference to `boost::thread::join()' looking at the provided shared object, nm -C -D /usr/lib64/libboost_thread-mt.so.1.53.0 |grep start_thread 000000000000ba80 T boost::thread::start_thread_noexcept(boost::thread_attributes const&) 000000000000ba00 T boost::thread::start_thread_noexcept() neither of which is start_thread() I've put an entry here https://bugzilla.redhat.com/show_bug.cgi?id=1021009 Is there a possible workaround? MM

Le 18/10/13 20:50, MM a écrit :
hello,
I am compiling my code with g++4.8.1 under c++11 mode, however the fedora's system provided boost thread lib has been compiled under c++98.
Linking fails because of errors like:
mainthread.cpp:(.text+0x2cf): undefined reference to `boost::thread::start_thread()' mainthread.cpp:(.text+0xcc9): undefined reference to `boost::thread::join()'
looking at the provided shared object, nm -C -D /usr/lib64/libboost_thread-mt.so.1.53.0 |grep start_thread
000000000000ba80 T boost::thread::start_thread_noexcept(boost::thread_attributes const&) 000000000000ba00 T boost::thread::start_thread_noexcept()
neither of which is start_thread()
I've put an entry here https://bugzilla.redhat.com/show_bug.cgi?id=1021009
Is there a possible workaround?
Are you sure your compiling with Boost 1.53? start_thread is defined in boost/thread/detail/thread.h lines 178-184 as void start_thread() { if (!start_thread_noexcept()) { boost::throw_exception(thread_resource_error()); } } Please could you check this file and the contexts of this linenes Best, Vicente

On 18 October 2013 20:04, Vicente J. Botet Escriba wrote: Le 18/10/13 20:50, MM a écrit : hello, I am compiling my code with g++4.8.1 under c++11 mode, however the
fedora's system provided boost thread lib has been compiled under c++98. Linking fails because of errors like: mainthread.cpp:(.text+0x2cf): undefined reference to
`boost::thread::start_thread()**'
mainthread.cpp:(.text+0xcc9): undefined reference to
`boost::thread::join()' looking at the provided shared object,
nm -C -D /usr/lib64/libboost_thread-mt.**so.1.53.0 |grep start_thread 000000000000ba80 T boost::thread::start_thread_**noexcept(boost::thread_*
*attributes const&)
000000000000ba00 T boost::thread::start_thread_**noexcept() neither of which is start_thread() I've put an entry here
https://bugzilla.redhat.com/**show_bug.cgi?id=1021009https://bugzilla.redhat.com/show_bug.cgi?id=1021009 Is there a possible workaround? Are you sure your compiling with Boost 1.53? start_thread is defined in boost/thread/detail/thread.h lines 178-184 as void start_thread()
{
if (!start_thread_noexcept())
{
boost::throw_exception(thread_**resource_error());
}
} Indeed, this file (thread.hpp not .h) is there and has the same code at
the same lines.
However /usr/lib64/libboost_thread-mt.so.1.53.0 doesn't have start_thread()
symbol at all.
start_thread_noexcept() is there though. Fedora guys said they compile with g++4.8 but with c++98, not c++11 Please could you check this file and the contexts of this linenes Best,
Vicente
______________________________**_________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/**mailman/listinfo.cgi/boost-**usershttp://lists.boost.org/mailman/listinfo.cgi/boost-users

Le 18/10/13 21:39, MM a écrit :
On 18 October 2013 20:04, Vicente J. Botet Escriba
mailto:vicente.botet@wanadoo.fr> wrote: Le 18/10/13 20:50, MM a écrit :
hello,
I am compiling my code with g++4.8.1 under c++11 mode, however the fedora's system provided boost thread lib has been compiled under c++98.
Linking fails because of errors like:
mainthread.cpp:(.text+0x2cf): undefined reference to `boost::thread::start_thread()' mainthread.cpp:(.text+0xcc9): undefined reference to `boost::thread::join()'
looking at the provided shared object, nm -C -D /usr/lib64/libboost_thread-mt.so.1.53.0 |grep start_thread
000000000000ba80 T boost::thread::start_thread_noexcept(boost::thread_attributes const&) 000000000000ba00 T boost::thread::start_thread_noexcept()
neither of which is start_thread()
I've put an entry here https://bugzilla.redhat.com/show_bug.cgi?id=1021009
Is there a possible workaround?
Are you sure your compiling with Boost 1.53? start_thread is defined in boost/thread/detail/thread.h lines 178-184 as
void start_thread() { if (!start_thread_noexcept()) { boost::throw_exception(thread_resource_error()); } }
Indeed, this file (thread.hpp not .h) is there and has the same code at the same lines. However /usr/lib64/libboost_thread-mt.so.1.53.0 doesn't have start_thread() symbol at all. start_thread_noexcept() is there though.
start_thread is defined inside a class and would expect it to be inlined. I don't understand why the symbols is unresolved. Please could you compile with -E and take a look at the preprocessed output?
Fedora guys said they compile with g++4.8 but with c++98, not c++11 Does it works if you compile with c++98?
Best, Vicente
Please could you check this file and the contexts of this linenes
Best, Vicente _______________________________________________ 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

On 18 October 2013 20:57, Vicente J. Botet Escriba wrote: Le 18/10/13 21:39, MM a écrit : On 18 October 2013 20:04, Vicente J. Botet Escriba <
vicente.botet@wanadoo.fr> wrote: Le 18/10/13 20:50, MM a écrit : Are you sure your compiling with Boost 1.53?
start_thread is defined in boost/thread/detail/thread.h lines 178-184 as void start_thread()
{
if (!start_thread_noexcept())
{
boost::throw_exception(thread_resource_error());
}
} Indeed, this file (thread.hpp not .h) is there and has the same code at
the same lines.
However /usr/lib64/libboost_thread-mt.so.1.53.0 doesn't have
start_thread() symbol at all.
start_thread_noexcept() is there though. start_thread is defined inside a class and would expect it to be
inlined. I don't understand why the symbols is unresolved. Please could you
compile with -E and take a look at the preprocessed output? Fedora guys said they compile with g++4.8 but with c++98, not c++11 Does it works if you compile with c++98? I use some c++11 additions so I couldn't. Best,
Vicente I have actually just switched from the linker (ld.bdf) to the 'new' gold linker and it solved the problem,.
Perhaps listbboost had been built by fedora with gold, and my system was
using bdf instead,
MM

Le 21/10/13 14:41, MM a écrit :
On 18 October 2013 20:57, Vicente J. Botet Escriba
mailto:vicente.botet@wanadoo.fr> wrote: Le 18/10/13 21:39, MM a écrit :
On 18 October 2013 20:04, Vicente J. Botet Escriba
mailto:vicente.botet@wanadoo.fr> wrote: Le 18/10/13 20:50, MM a écrit :
Are you sure your compiling with Boost 1.53? start_thread is defined in boost/thread/detail/thread.h lines 178-184 as
void start_thread() { if (!start_thread_noexcept()) { boost::throw_exception(thread_resource_error()); } }
Indeed, this file (thread.hpp not .h) is there and has the same code at the same lines. However /usr/lib64/libboost_thread-mt.so.1.53.0 doesn't have start_thread() symbol at all. start_thread_noexcept() is there though.
start_thread is defined inside a class and would expect it to be inlined. I don't understand why the symbols is unresolved. Please could you compile with -E and take a look at the preprocessed output?
Fedora guys said they compile with g++4.8 but with c++98, not c++11
Does it works if you compile with c++98?
I use some c++11 additions so I couldn't.
Best, Vicente
I have actually just switched from the linker (ld.bdf) to the 'new' gold linker and it solved the problem,. Perhaps listbboost had been built by fedora with gold, and my system was using bdf instead,
Glad to see that this was a build issue. Vicente
participants (2)
-
MM
-
Vicente J. Botet Escriba