diff options
author | Chris MacMackin <chris.macmackin@ukaea.uk> | 2022-10-05 12:57:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 11:57:37 +0000 |
commit | 53cea629b774f7d255e37b2c75ad4f25f06764db (patch) | |
tree | e55ffdf10ba2e73cabf8561a6ef2658653a32a2a | |
parent | cfea21319fd6df31b40c2e4575d726e425862381 (diff) | |
download | spack-53cea629b774f7d255e37b2c75ad4f25f06764db.tar.gz spack-53cea629b774f7d255e37b2c75ad4f25f06764db.tar.bz2 spack-53cea629b774f7d255e37b2c75ad4f25f06764db.tar.xz spack-53cea629b774f7d255e37b2c75ad4f25f06764db.zip |
autotools: Filter libtools when building with dpcpp (#32876)
Due to a [known
issue](https://community.intel.com/t5/Intel-oneAPI-Data-Parallel-C/dpcpp-and-GNU-Autotools/m-p/1296985)
with dpcpp, autotool-based builds that try to use it will fail because
they try to link against temporary files that no longer exist. This
commit filters those files out of the libtools script so that linking
can work properly.
-rw-r--r-- | lib/spack/spack/build_systems/autotools.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index 97b5e9ef51..d6707ac27e 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -266,7 +266,8 @@ To resolve this problem, please try the following: def _do_patch_libtool(self): """If configure generates a "libtool" script that does not correctly detect the compiler (and patch_libtool is set), patch in the correct - flags for the Arm, Clang/Flang, Fujitsu and NVHPC compilers.""" + flags for the Arm, Clang/Flang, Fujitsu and NVHPC compilers. Also + filter out spurious predep_objects for Intel dpcpp builds.""" # Exit early if we are required not to patch libtool if not self.patch_libtool: @@ -300,6 +301,13 @@ To resolve this problem, please try the following: ] for o in objfile: fs.filter_file(rehead + o, "", libtool_path) + # Hack to filter out spurious predp_objects when building with + # Intel dpcpp; see issue #32863 + if self.spec.satisfies("%dpcpp"): + fs.filter_file( + r"^(predep_objects=.*)/tmp/conftest-[0-9A-Fa-f]+\.o", r"\1", libtool_path + ) + fs.filter_file(r"^(predep_objects=.*)/tmp/a-[0-9A-Fa-f]+\.o", r"\1", libtool_path) @property def configure_directory(self): |