Boost logo

Boost :

Subject: Re: [boost] [config] PGI config file doesn't defines BOOST_HAS_THREADS
From: Ioannis Papadopoulos (ipapadop_at_[hidden])
Date: 2012-03-22 15:59:40


On 03/22/2012 11:41 AM, John Maddock wrote:
>> There is an issue on Boost.Thread regression test for PGI compiler.
>> See https://svn.boost.org/trac/boost/ticket/6354.
>>
>> "pgCC" -INLINE:none -Kieee -fpic -fPIC -gopt -Minform=warn
>> -DBOOST_ALL_NO_LIB=1 -DBOOST_TEST_NO_AUTO_LINK=1 -DBOOST_THREAD_POSIX
>> -DBOOST_THREAD_USE_DLL=1 -D__need_IOV_MAX -I".." -c -o
>> "/scratch/kbelco/boost/results/boost/bin.v2/libs/thread/test/test_barrier.test/pgi-11.9/debug/threading-multi/test_barrier.o"
>> "../libs/thread/test/test_barrier.cpp"
>>
>> "../boost/config/requires_threads.hpp", line 86: catastrophic error:
>> #error
>> directive: "Compiler threading support is not turned on. Please
>> consult your compiler's documentation for the appropriate options to
>> use"
>> # error "Compiler threading support is not turned on. Please consult
>> your compiler's documentation for the appropriate options to use"
>>
>> boost/config/compiler/pgi.hpp defines BOOST_HAS_PTHREADS but not
>> BOOST_HAS_THREADS, resulting in failure in the requires_threads.hpp
>> header.
>>
>> It seems that adding
>>
>> #define BOOST_HAS_THREADS
>>
>> inboost/config/compiler/pgi.hpp solves the issue.
>>
>> John, what do you think?
>
> If it's true that the compiler always supports threads, then yes go for it.
>
> John.

I tested the define it with both PGI 11.9 and 12. It works fine.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk