Discussion:
[asio-users] asio without threads
leon zadorin
2013-08-14 05:09:22 UTC
Permalink
Hello,

I was building Boost and asio without any thread support (empirically
tested with up to version 1.52). However, with v1.54 I get the linking
error:
include/boost/asio/detail/impl/posix_thread.ipp:50: undefined
reference to `pthread_create'
implying to me that boost was built with referencing to pthreads...

I haven't changed anything in my own code, nor have I changed the way
boost is being built/configured. The only element which has been
changed is using boost 1.54 instead of 1.52.

Perhaps I need to configure it somehow differently to what I was using before?

The current/old building process is as follows:

./bootstrap.sh --prefix=/usr/home/${USER}/boost/installed/ --without-icu

vim boost/config/user.hpp

#define BOOST_DISABLE_THREADS
#define BOOST_SP_DISABLE_THREADS
#define BOOST_ASIO_DISABLE_IOCP
#define BOOST_NO_RTTI
#define BOOST_NO_TYPEID
#define BOOST_DISABLE_ASSERTS
#define BOOST_DISABLE_WIN32

./bjam --debug-building toolset=gcc cxxflags="-std=c++11 -flto "
variant=release link=static threading=single --without-thread
--without-wave --without-mpi --without-python --without-graph
--without-graph_parallel --without-program_options --without-signals
--without-test --without-serialization --layout=versioned install

Kind regards
Leon.
leon zadorin
2013-08-14 05:33:21 UTC
Permalink
Cancel that -- I think I've found what I need (#define
BOOST_ASIO_DISABLE_THREADS)
Post by leon zadorin
Hello,
I was building Boost and asio without any thread support (empirically
tested with up to version 1.52). However, with v1.54 I get the linking
include/boost/asio/detail/impl/posix_thread.ipp:50: undefined
reference to `pthread_create'
implying to me that boost was built with referencing to pthreads...
I haven't changed anything in my own code, nor have I changed the way
boost is being built/configured. The only element which has been
changed is using boost 1.54 instead of 1.52.
Perhaps I need to configure it somehow differently to what I was using before?
./bootstrap.sh --prefix=/usr/home/${USER}/boost/installed/ --without-icu
vim boost/config/user.hpp
#define BOOST_DISABLE_THREADS
#define BOOST_SP_DISABLE_THREADS
#define BOOST_ASIO_DISABLE_IOCP
#define BOOST_NO_RTTI
#define BOOST_NO_TYPEID
#define BOOST_DISABLE_ASSERTS
#define BOOST_DISABLE_WIN32
./bjam --debug-building toolset=gcc cxxflags="-std=c++11 -flto "
variant=release link=static threading=single --without-thread
--without-wave --without-mpi --without-python --without-graph
--without-graph_parallel --without-program_options --without-signals
--without-test --without-serialization --layout=versioned install
Kind regards
Leon.
Continue reading on narkive:
Search results for '[asio-users] asio without threads' (Questions and Answers)
3
replies
How do we install ati radeon hd 4550 with Windows 7?
started 2010-02-17 14:46:23 UTC
software
Loading...