diff options
author | Mark W. Krentel <krentel@rice.edu> | 2019-01-10 18:34:05 -0600 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2019-01-10 16:34:05 -0800 |
commit | 08c4b9d47a100b959fbd886d851b94751c3d5a9e (patch) | |
tree | a63f55a51494345dfbc85272f45a1c47918762b2 | |
parent | 7e8b17b177aa0ca5e8aab5020f5bbf26ca6b34bf (diff) | |
download | spack-08c4b9d47a100b959fbd886d851b94751c3d5a9e.tar.gz spack-08c4b9d47a100b959fbd886d851b94751c3d5a9e.tar.bz2 spack-08c4b9d47a100b959fbd886d851b94751c3d5a9e.tar.xz spack-08c4b9d47a100b959fbd886d851b94751c3d5a9e.zip |
boost: fix the bjam build for Cray (#10295)
Fixes issues #9613 and #3209.
Remove the spack wrapper directories from PATH for the bootstrap step.
This was breaking the build for Cray (and other cross-compile) because
bjam was built for the BE and died on SIGILL on the FE.
This only affects building bjam. The boost libraries are still built
the normal spack way with the spack wrappers.
-rw-r--r-- | var/spack/repos/builtin/packages/boost/bootstrap-path.patch | 33 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/boost/package.py | 3 |
2 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/boost/bootstrap-path.patch b/var/spack/repos/builtin/packages/boost/bootstrap-path.patch new file mode 100644 index 0000000000..06cebe0d1e --- /dev/null +++ b/var/spack/repos/builtin/packages/boost/bootstrap-path.patch @@ -0,0 +1,33 @@ +Remove the spack wrapper directories from PATH for the bootstrap step. +This was breaking the build for Cray (and other cross-compile) because +bjam was built for the BE and died on SIGILL on the FE. See issue +#9613. + +This only affects building bjam. The boost libraries are still built +the normal spack way with the spack wrappers. + + +diff -Naurb boost_1_66_0.orig/bootstrap.sh boost_1_66_0/bootstrap.sh +--- boost_1_66_0.orig/bootstrap.sh 2017-12-13 17:56:35.000000000 -0600 ++++ boost_1_66_0/bootstrap.sh 2019-01-09 13:51:56.407553214 -0600 +@@ -7,6 +7,20 @@ + + # boostinspect:notab - Tabs are required for the Makefile. + ++NEWPATH= ++OLDIFS="$IFS" ++IFS=: ++ ++for dir in $PATH ; do ++ case "x$dir" in ++ *lib*spack*env* ) ;; ++ * ) NEWPATH="${NEWPATH}:${dir}" ;; ++ esac ++done ++ ++IFS="$OLDIFS" ++PATH="$NEWPATH" ++ + BJAM="" + TOOLSET="" + BJAM_CONFIG="" diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 8f0fced0de..9536aa5cc5 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -156,6 +156,9 @@ class Boost(Package): patch('boost_1.63.0_pgi.patch', when='@1.63.0%pgi') patch('boost_1.63.0_pgi_17.4_workaround.patch', when='@1.63.0%pgi@17.4') + # Fix the bootstrap/bjam build for Cray + patch('bootstrap-path.patch', when='@1.39.0: platform=cray') + def url_for_version(self, version): if version >= Version('1.63.0'): url = "https://dl.bintray.com/boostorg/release/{0}/source/boost_{1}.tar.bz2" |