Greetings,
While attempting to build boost 1.70.0 for IBM Power9 using the IBM XL
compilers using the SPACK tool, the following errors occur repeatedly for
every header file that eventually includes boost/thread/lockable_traits.hpp
In file included from ./boost/thread/lock_types.hpp:14:
./boost/thread/lockable_traits.hpp:157:11: error: use of
undeclared identifier 'decltype'
decltype(void(boost::declval().lock()))
^
./boost/thread/lockable_traits.hpp:165:11: error: use of
undeclared identifier 'decltype'
decltype(void(boost::declval().unlock()))
^
./boost/thread/lockable_traits.hpp:173:11: error: use of
undeclared identifier 'decltype'
decltype(bool(boost::declval().try_lock()))
^
These errors could be resolved if the -std=c++11 compiler option is used.
Attempting to use SPACK options cxxflags=-std=c++11 or cxxstd=11 failed as
if they were ignored. I was able to work-around this pervasive error by
adding the following line to the file tools/build/src/tools/xlcpp.jam
flags xlcpp.compile.c++ OPTIONS <cxxstd>11 : -std=c++11 ;
Can you update the xlcpp.jam file to support the cxxstd=11 option, similar
to what is implemented in pgi.jam?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Roy Musselman
IBM HPC Application Analyst at Lawrence Livermore National Lab
email: roymuss@us.ibm.com