Boost logo

Boost Users :

Subject: [Boost-users] Trying to compile and use boost on proprietary complier similar to MPICH2 CXX
From: Chris (chris_dev_at_[hidden])
Date: 2012-08-29 04:44:02


Hi all,
hope this is the right list for my question. So here it goes:

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)"
In file included 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/thread/detail/platform.hpp:67:9: error: #error
"Sorry, no boost threads are available for this platform."
In file included from ../boost_1_43_0/boost/thread.hpp:13,
                 from test.cpp:37:
../boost_1_43_0/boost/thread/thread.hpp:19:2: error: #error "Boost
threads unavailable on this platform"

The thing is, when I use the standard mpicxx from MPICH2, things work
out fine. I'm now trying to find out if the problem lies in the
complier, or if I simply did not compile and bootstrap boost properly.

What I did when building boost is the following:
./bootstrap.sh
--with-libraries=date_time,filesystem,serialization,iostreams,system,thread,mpi

./bjam cxxflags="-O2" release threading=multi link=static

After bootstrap, I tried to manually edit the user-config.jam to add
"using mpi ;" and explicitly added the path to the compiler, but this
all did not change the above mentioned error when I try to compile my
code that uses boost.

Is this enough information for you to judge if I might have overlooked
something when building boost?

Many thanks,
 Chris


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net