diff options
author | Erik Schnetter <schnetter@gmail.com> | 2016-01-17 10:54:12 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2016-01-17 10:54:12 -0500 |
commit | 981cefe8d3f4f73461789713726a9658498a5f14 (patch) | |
tree | 70c52365887df81550996f6f3870e5c7e186b107 | |
parent | 1268b415709356d369dfdd69a5eef6e1b775e851 (diff) | |
download | spack-981cefe8d3f4f73461789713726a9658498a5f14.tar.gz spack-981cefe8d3f4f73461789713726a9658498a5f14.tar.bz2 spack-981cefe8d3f4f73461789713726a9658498a5f14.tar.xz spack-981cefe8d3f4f73461789713726a9658498a5f14.zip |
Make Boost build with MPI on OS X
Boost does not build on OS X with either gold or binutils. The gold linker does not exist on Darwin, and binutils on Darwin provides an assembler that doesn't work for Boost.
- Introduce a variant that specifies whether to build with binutils, defaulting to true for backward compatibility
- Auto-detect whether we build on Darwin; in this case, set the gold and binutils variant defaults to false
- Clean up configure flags for as and ld
-rw-r--r-- | var/spack/packages/boost/package.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py index 3427b74ad6..894af9edd1 100644 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -1,5 +1,8 @@ from spack import * +import os +import sys + class Boost(Package): """Boost provides free peer-reviewed portable C++ source libraries, emphasizing libraries that work well with the C++ @@ -127,6 +130,16 @@ class Boost(Package): '--layout=tagged']) def install(self, spec, prefix): + # On Darwin, Boost expects the Darwin libtool. However, one of the + # dependencies may have pulled in Spack's GNU libtool, and these two are + # not compatible. We thus create a symlink to Darwin's libtool and add + # it at the beginning of PATH. + if sys.platform == 'darwin': + newdir = os.path.abspath('darwin-libtool') + mkdirp(newdir) + force_symlink('/usr/bin/libtool', join_path(newdir, 'libtool')) + env['PATH'] = newdir + ':' + env['PATH'] + # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' |