Repository: spack/spack

Issue:
installation issue: boost
Hi! 
when I run the installation of py-espressopp, I get error because of boost failing.
```
==> Warning: Skipping build of py-espressopp since boost failed
```
I report the error below. Although, if I install boost alone the installation is successful.
Please help!


### Spack version
```console
$ spack --version
0.14.1-502-c99a88128
```

### Steps to reproduce the issue
```console
$ spack install py-espressopp
...
==> 19739: Installing boost
==> Using cached archive: /home/mariano/Programs/spack/var/spack/cache/_source-cache/archive/59/59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722.tar.bz2
==> Staging archive: /tmp/mariano/spack-stage/spack-stage-boost-1.72.0-rpkdfpkdlgwyfce5nqbj4jq6e3xgq7ag/boost_1_72_0.tar.bz2
==> Created stage in /tmp/mariano/spack-stage/spack-stage-boost-1.72.0-rpkdfpkdlgwyfce5nqbj4jq6e3xgq7ag
==> No patches needed for boost
==> 19739: boost: Building boost [Package]
==> 19739: boost: Executing phase: 'install'
==> Error: ProcessError: Command exited with status 1:
    './b2' 'install' 'threading=multi' '-j' '8' '--user-config=/tmp/mariano/spack-stage/spack-stage-boost-1.72.0-rpkdfpkdlgwyfce5nqbj4jq6e3xgq7ag/spack-src/user-config.jam' 'variant=release' '-s' 'BZIP2_INCLUDE=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/bzip2-1.0.8-yjwcvti7ehjkvqcu67rdzymdawi6nruk/include' '-s' 'BZIP2_LIBPATH=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/bzip2-1.0.8-yjwcvti7ehjkvqcu67rdzymdawi6nruk/lib' '-s' 'ZLIB_INCLUDE=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/zlib-1.2.11-fz2bs562jhc2spgubs3fvq25g3qymz6x/include' '-s' 'ZLIB_LIBPATH=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/zlib-1.2.11-fz2bs562jhc2spgubs3fvq25g3qymz6x/lib' '-s' 'NO_LZMA=1' '-s' 'NO_ZSTD=1' 'link=static,shared' '--layout=system' 'toolset=gcc' 'cxxstd=98' 'visibility=hidden'

2 errors found in build log:
     14853                     from /usr/include/c++/7/bits/stl_algobase.h:59,
     14854                     from /usr/include/c++/7/vector:60,
     14855                     from libs/mpi/src/python/py_nonblocking.cpp:17:
     14856    /usr/include/features.h:202:0: note: this is the location of the previous definition
     14857     # define _XOPEN_SOURCE 700
     14858    
  >> 14859    libs/mpi/src/python/py_nonblocking.cpp:68:8: error: 'shared_ptr' in namespace 'std' does not name a template type
     14860       std::shared_ptr<request_list> make_request_list_from_py_list(object iterable)
     14861            ^~~~~~~~~~
     14862    libs/mpi/src/python/py_nonblocking.cpp: In function 'void boost::mpi::python::export_nonblocking()':
  >> 14863    libs/mpi/src/python/py_nonblocking.cpp:227:41: error: 'make_request_list_from_py_list' was not declared in this scope
     14864           .def("__init__", make_constructor(make_request_list_from_py_list),
     14865                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     14866    
     14867        "/home/mariano/Programs/spack/lib/spack/env/gcc/g++"   -std=c++98 -fvisibility-inlines-hidden -fPIC -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -fexceptio
              ns -DBOOST_ALL_NO_LIB=1 -DBOOST_MPI_DYN_LINK=1 -DBOOST_MPI_PYTHON_DYN_LINK=1 -DBOOST_PYTHON_DYN_LINK=1 -DNDEBUG  -I"." -I"/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gc
              c-7.5.0/openmpi-3.1.5-m2pxl47sg6ri2gqiprke65b3ypdgi53u/include" -I"/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/python-2.7.16-cibwcukajfzz3c7osgfkehiglaitdp6h/
              include/python2.7" -c -o "bin.v2/libs/mpi/build/gcc-7/release/cxxstd-98-iso/python-2.7/threading-multi/visibility-hidden/python/py_nonblocking.o" "libs/mpi/src/python/py_nonblocking.cpp"
     14868    
     14869    ...failed gcc.compile.c++ bin.v2/libs/mpi/build/gcc-7/release/cxxstd-98-iso/python-2.7/threading-multi/visibility-hidden/python/py_nonblocking.o...

See build log for details:
  /tmp/mariano/spack-stage/spack-stage-boost-1.72.0-rpkdfpkdlgwyfce5nqbj4jq6e3xgq7ag/spack-build-out.txt

==> Error: Failed to install boost due to ChildError: ProcessError: Command exited with status 1:
    './b2' 'install' 'threading=multi' '-j' '8' '--user-config=/tmp/mariano/spack-stage/spack-stage-boost-1.72.0-rpkdfpkdlgwyfce5nqbj4jq6e3xgq7ag/spack-src/user-config.jam' 'variant=release' '-s' 'BZIP2_INCLUDE=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/bzip2-1.0.8-yjwcvti7ehjkvqcu67rdzymdawi6nruk/include' '-s' 'BZIP2_LIBPATH=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/bzip2-1.0.8-yjwcvti7ehjkvqcu67rdzymdawi6nruk/lib' '-s' 'ZLIB_INCLUDE=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/zlib-1.2.11-fz2bs562jhc2spgubs3fvq25g3qymz6x/include' '-s' 'ZLIB_LIBPATH=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/zlib-1.2.11-fz2bs562jhc2spgubs3fvq25g3qymz6x/lib' '-s' 'NO_LZMA=1' '-s' 'NO_ZSTD=1' 'link=static,shared' '--layout=system' 'toolset=gcc' 'cxxstd=98' 'visibility=hidden'
2 errors found in build log:
     14853                     from /usr/include/c++/7/bits/stl_algobase.h:59,
     14854                     from /usr/include/c++/7/vector:60,
     14855                     from libs/mpi/src/python/py_nonblocking.cpp:17:
     14856    /usr/include/features.h:202:0: note: this is the location of the previous definition
     14857     # define _XOPEN_SOURCE 700
     14858    
  >> 14859    libs/mpi/src/python/py_nonblocking.cpp:68:8: error: 'shared_ptr' in namespace 'std' does not name a template type
     14860       std::shared_ptr<request_list> make_request_list_from_py_list(object iterable)
     14861            ^~~~~~~~~~
     14862    libs/mpi/src/python/py_nonblocking.cpp: In function 'void boost::mpi::python::export_nonblocking()':
  >> 14863    libs/mpi/src/python/py_nonblocking.cpp:227:41: error: 'make_request_list_from_py_list' was not declared in this scope
     14864           .def("__init__", make_constructor(make_request_list_from_py_list),
     14865                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     14866    
     14867        "/home/mariano/Programs/spack/lib/spack/env/gcc/g++"   -std=c++98 -fvisibility-inlines-hidden -fPIC -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -fexceptio
              ns -DBOOST_ALL_NO_LIB=1 -DBOOST_MPI_DYN_LINK=1 -DBOOST_MPI_PYTHON_DYN_LINK=1 -DBOOST_PYTHON_DYN_LINK=1 -DNDEBUG  -I"." -I"/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gc
              c-7.5.0/openmpi-3.1.5-m2pxl47sg6ri2gqiprke65b3ypdgi53u/include" -I"/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/python-2.7.16-cibwcukajfzz3c7osgfkehiglaitdp6h/
              include/python2.7" -c -o "bin.v2/libs/mpi/build/gcc-7/release/cxxstd-98-iso/python-2.7/threading-multi/visibility-hidden/python/py_nonblocking.o" "libs/mpi/src/python/py_nonblocking.cpp"
     14868    
     14869    ...failed gcc.compile.c++ bin.v2/libs/mpi/build/gcc-7/release/cxxstd-98-iso/python-2.7/threading-multi/visibility-hidden/python/py_nonblocking.o...

See build log for details:
  /tmp/mariano/spack-stage/spack-stage-boost-1.72.0-rpkdfpkdlgwyfce5nqbj4jq6e3xgq7ag/spack-build-out.txt
Traceback (most recent call last):
  File "/home/mariano/Programs/spack/lib/spack/spack/build_environment.py", line 801, in child_process
    return_value = function()
  File "/home/mariano/Programs/spack/lib/spack/spack/installer.py", line 1113, in build_process
    phase(pkg.spec, pkg.prefix)
  File "/home/mariano/Programs/spack/lib/spack/spack/package.py", line 108, in phase_wrapper
    phase(spec, prefix)
  File "/home/mariano/Programs/spack/var/spack/repos/builtin/packages/boost/package.py", line 477, in install
  File "/home/mariano/Programs/spack/lib/spack/spack/util/executable.py", line 189, in __call__
    proc.returncode, long_msg)
spack.util.executable.ProcessError: Command exited with status 1:
    './b2' 'install' 'threading=multi' '-j' '8' '--user-config=/tmp/mariano/spack-stage/spack-stage-boost-1.72.0-rpkdfpkdlgwyfce5nqbj4jq6e3xgq7ag/spack-src/user-config.jam' 'variant=release' '-s' 'BZIP2_INCLUDE=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/bzip2-1.0.8-yjwcvti7ehjkvqcu67rdzymdawi6nruk/include' '-s' 'BZIP2_LIBPATH=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/bzip2-1.0.8-yjwcvti7ehjkvqcu67rdzymdawi6nruk/lib' '-s' 'ZLIB_INCLUDE=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/zlib-1.2.11-fz2bs562jhc2spgubs3fvq25g3qymz6x/include' '-s' 'ZLIB_LIBPATH=/home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/zlib-1.2.11-fz2bs562jhc2spgubs3fvq25g3qymz6x/lib' '-s' 'NO_LZMA=1' '-s' 'NO_ZSTD=1' 'link=static,shared' '--layout=system' 'toolset=gcc' 'cxxstd=98' 'visibility=hidden'

==> Warning: Skipping build of py-espressopp since boost failed
[+] /home/mariano/Programs/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/py-mpi4py-3.0.3-sznaq64k24ol6vwqblpdf6xawg5negcz
==> Error: Installation of py-espressopp failed.  Review log for details
```

### Platform and user environment
```console
$ uname -a 
Linux mariano-HP-Pavilion-15-Notebook-PC 5.3.0-42-generic #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -d
Description:	Ubuntu 18.04.4 LTS
```


Discussion:
@hainest
The problem is `cxxstd=98`, `cxxstd=11` works.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -178,6 +178,9 @@ def libs(self):
     conflicts('+taggedlayout', when='+versionedlayout')
     conflicts('+numpy', when='~python')
 
+    # boost-python in 1.72.0 broken with cxxstd=98
+    conflicts('cxxstd=98', when='+mpi+python @1.72.0:')
+
     # Container's Extended Allocators were not added until 1.56.0
     conflicts('+container', when='@:1.55.99')
 
diff --git a/var/spack/repos/builtin/packages/py-espressopp/package.py b/var/spack/repos/builtin/packages/py-espressopp/package.py
--- a/var/spack/repos/builtin/packages/py-espressopp/package.py
+++ b/var/spack/repos/builtin/packages/py-espressopp/package.py
@@ -27,7 +27,7 @@ class PyEspressopp(CMakePackage):
 
     depends_on("cmake@2.8:", type='build')
     depends_on("mpi")
-    depends_on("boost+serialization+filesystem+system+python+mpi", when='@1.9.4:')
+    depends_on("boost+serialization+filesystem+system+python+mpi cxxstd=11", when='@1.9.4:')
     extends("python")
     depends_on("python@2:2.8")
     depends_on("py-mpi4py@2.0.0:", when='@1.9.4', type=('build', 'run'))


Test patch: