Repository: spack/spack

Issue:
Installation issue: boost@1.80.0 does not build with %oneapi
        **e4s-oneapi/boost**
```
boost-install.generate-cmake-config- bin.v2/libs/math/build/install/boost_math_tr1-config.cmake
boost-install.generate-cmake-config-version- bin.v2/libs/math/build/install/boost_math_tr1-config-version.cmake
boost-install.generate-cmake-config- bin.v2/libs/math/build/install/boost_math_tr1f-config.cmake
boost-install.generate-cmake-config-version- bin.v2/libs/math/build/install/boost_math_tr1f-config-version.cmake
boost-install.generate-cmake-config- bin.v2/libs/math/build/install/boost_math_tr1l-config.cmake
boost-install.generate-cmake-config-version- bin.v2/libs/math/build/install/boost_math_tr1l-config-version.cmake
intel-linux.compile.c++ bin.v2/libs/graph_parallel/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/local-visibility-global/threading-multi/visibility-hidden/tag_allocator.o
icpx: command line warning #10430: Unsupported command line options encountered
These options as listed are not supported.
For more information, use '-qnextgen-diag'.
option list: 
	-ip
boost-install.generate-cmake-config- bin.v2/libs/log/build/install/boost_log_setup-config.cmake
boost-install.generate-cmake-config-version- bin.v2/libs/log/build/install/boost_log_setup-config-version.cmake
intel-linux.compile.c++.pch bin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden/pch.pchi
icpx: command line warning #10430: Unsupported command line options encountered
These options as listed are not supported.
For more information, use '-qnextgen-diag'.
option list: 
	-ip
clang++: error: no such file or directory: 'bin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden/pch.pchi'
clang++: error: unsupported argument 'h-create' to option '-pc'

    rm -f "bin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden/pch.pchi" &&  "/builds/spack/spack/lib/spack/env/oneapi/icpx" -x c++-header -std=c++17 -fvisibility-inlines-hidden -m64 -pthread -fvisibility=hidden -inline-level=2 -O3 -ip -Wall -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_BUILD_PCH_ENABLED -DNDEBUG -I"." -I"libs/math/src/tr1" -c -pch-create "bin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden/pch.pchi" "libs/math/build/../src/tr1/pch.hpp"

...failed intel-linux.compile.c++.pch bin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden/pch.pchi...
...skipped <pbin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden>acosh.o for lack of <pbin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden>pch.pchi...
...skipped <pbin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden>asinh.o for lack of <pbin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden>pch.pchi...
...skipped <pbin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden>atanh.o for lack of <pbin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden>pch.pchi...
...skipped <pbin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden>cbrt.o for lack of <pbin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden>pch.pchi...
...skipped <pbin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden>copysign.o for lack of <pbin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/link-static/threading-multi/visibility-hidden>pch.pchi...
```
I'm not sure here. I never use PCH.

**e4s/dealli**

```
2110-/tmp/root/spack-stage/spack-stage-dealii-9.4.0-wx34uiuli2z77dcxim2jse73obtyxqki/spack-src/examples/step-70/step-70.cc: In function 'void Step70::read_grid_and_cad_files(const string&, const string&, dealii::Triangulation<dim, spacedim>&)':
2111:/tmp/root/spack-stage/spack-stage-dealii-9.4.0-wx34uiuli2z77dcxim2jse73obtyxqki/spack-src/examples/step-70/step-70.cc:838:39: error: 'boost::algorithm' has not been declared
2112-  838 |         const auto extension = boost::algorithm::to_lower_copy(
```
Boost have been cleaning up their headers to remove implicit inclusions.

_Originally posted by @hainest in https://github.com/spack/spack/issues/32879#issuecomment-1265933265_
      


Discussion:

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
@@ -393,7 +393,7 @@ def libs(self):
     patch("pthread-stack-min-fix.patch", when="@1.69.0:1.72.0")
 
     # https://www.intel.com/content/www/us/en/developer/articles/technical/building-boost-with-oneapi.html
-    patch("intel-oneapi-linux-jam.patch", when="@1.76:1.79 %oneapi")
+    patch("intel-oneapi-linux-jam.patch", when="@1.76: %oneapi")
 
     def patch(self):
         # Disable SSSE3 and AVX2 when using the NVIDIA compiler


Test patch: