On Wed, Aug 29, 2012 at 10:44 AM, Chris
wrote: When it try to use boost using a proprietary MPIC++ compiler I have no control over, I get the following errors:
In file included from ../boost_1_43_0/boost/thread/detail/platform.hpp:17, from ../boost_1_43_0/boost/thread/thread.hpp:12, from ../boost_1_43_0/boost/thread.hpp:13, from test.cpp:37: ../boost_1_43_0/boost/config/requires_threads.hpp:47:5: error: #error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
This suggests that your compiler is not running with threads enabled, whereas you instructed `bjam` to compile the threaded version of Boost:
./bjam cxxflags="-O2" release threading=multi link=static
Try to compile with threading=single; if that works, you might want to check your compiler's docs on how to enable threading support.
Thanks Riccardo! I've tried that now, also together with things like omitting -pthreads or -lpthreads options for this compiler, but to no avail: the error message from Boost remains the same.
If you're trying to build the thread lib then you definitely would get errors trying to build in single threaded mode... my guess is that the compiler doesn't set any preprocessor flags (such as the usual _REENTRANT) to indicate it's thread safe. You could circumvent that test with: bjam define=BOOST_HAS_THREADS HTH, John.