From: John Maddock (jm_at_[hidden])
Date: 2002-12-12 07:27:02
> i) Linux with KAI C++, Intel C++
> On Linux, BOOST_HAS_PTHREADS macro is defined only if we use gcc
> (config/compiler/gcc.hpp), but it's not defined for other compilers
> (KAI, Intel, etc). I found that boost.thread compiles successfully by
> the latter compilers if I defined BOOST_HAS_PTHREADS macro (and
> BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE) by hand, and all the examples
> worked fine. Is there any reason why these macros are not defined for
> these compilers??
It is almost certain that there is a compiler switch that you need to turn
on (often -pthread or something like it - consult your compilers
documentation). Simply defining BOOST_HAS_THREADS without this will get
your code compiling but it is very unlikely to work correctly.
> ii) Compaq Tru64 with Compaq C++ and SGI IRIX with MIPSPro Compiler
> The example program for recursive mutex (libs/thread/example/
> recursive_mutex.cpp) compiles on these platforms, but it crashes or
> ends up with deadlock if I try to run it. At the moment, I'm not sure
> where the problem is in recursive mutex implementation. If I undefine
> BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE, it works without any problem.
I don't know if this is the issue, but if you search sgi.com for "pthread"
there do seem to be a lot of OS-patches to the pthread lib available.
Probably you need to address this issue on an SGI specific group though to
find out which IRIX versions have a working pthread_mutexattr_settype.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk