Boost logo

Boost Users :

From: Roy Musselman (roymuss_at_[hidden])
Date: 2019-09-10 00:58:46


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<T&>().lock()))
          ^
          ./boost/thread/lockable_traits.hpp:165:11: error: use of
undeclared identifier 'decltype'
          decltype(void(boost::declval<T&>().unlock()))
          ^
          ./boost/thread/lockable_traits.hpp:173:11: error: use of
undeclared identifier 'decltype'
          decltype(bool(boost::declval<T&>().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_at_[hidden]



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