From 981cefe8d3f4f73461789713726a9658498a5f14 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Jan 2016 10:54:12 -0500 Subject: 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 --- var/spack/packages/boost/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'var') 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'] = './' -- cgit v1.2.3-70-g09d2 From 77c17e1d92ac1c98a5c43247d6582876bc7d14d4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Feb 2016 12:51:43 -0500 Subject: Since my last patch didn't get traction, here is a new approach to building gcc on Darwin: - Add a variant specifying whether to build with binutils, defaulting to true - Auto-detect whether this is Darwin; if so, set binutils and gold defaults to false, as they don't work on Darwin - Disable Go, which doesn't build on Darwin - Clean up handling configure options --- var/spack/repos/builtin/packages/gcc/package.py | 29 ++++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 3e5895cfb8..eb2129c4da 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -26,6 +26,7 @@ from spack import * from contextlib import closing from glob import glob +import sys class Gcc(Package): """The GNU Compiler Collection includes front ends for C, C++, @@ -49,13 +50,14 @@ class Gcc(Package): version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4') version('4.5.4', '27e459c2566b8209ab064570e1b378f7') - variant('gold', default=True, description="Build the gold linker plugin for ld-based LTO") + variant('binutils', default=sys.platform != 'darwin', description="Build via binutils") + variant('gold', default=sys.platform != 'darwin', description="Build the gold linker plugin for ld-based LTO") depends_on("mpfr") depends_on("gmp") depends_on("mpc") # when @4.5: - depends_on("binutils~libiberty", when='~gold') - depends_on("binutils~libiberty+gold", when='+gold') + depends_on("binutils~libiberty", when='+binutils ~gold') + depends_on("binutils~libiberty+gold", when='+binutils +gold') # Save these until we can do optional deps. depends_on("isl", when=DEPENDS_ON_ISL_PREDICATE) @@ -67,7 +69,7 @@ class Gcc(Package): filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) - if spec.satisfies("@4.7.1:"): + if spec.satisfies("@4.7.1:") and sys.platform != 'darwin': enabled_languages.add('go') # Generic options to compile GCC @@ -79,17 +81,18 @@ class Gcc(Package): "--with-mpfr=%s" % spec['mpfr'].prefix, "--with-gmp=%s" % spec['gmp'].prefix, "--enable-lto", - "--with-gnu-ld", - "--with-gnu-as", "--with-quad"] # Binutils - static_bootstrap_flags = "-static-libstdc++ -static-libgcc" - binutils_options = ["--with-sysroot=/", - "--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), - "--with-boot-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), - "--with-ld=%s/bin/ld" % spec['binutils'].prefix, - "--with-as=%s/bin/as" % spec['binutils'].prefix] - options.extend(binutils_options) + if spec.satisfies('+binutils'): + static_bootstrap_flags = "-static-libstdc++ -static-libgcc" + binutils_options = ["--with-sysroot=/", + "--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), + "--with-boot-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), + "--with-gnu-ld", + "--with-ld=%s/bin/ld" % spec['binutils'].prefix, + "--with-gnu-as", + "--with-as=%s/bin/as" % spec['binutils'].prefix] + options.extend(binutils_options) # Isl if spec.satisfies(Gcc.DEPENDS_ON_ISL_PREDICATE): isl_options = ["--with-isl=%s" % spec['isl'].prefix] -- cgit v1.2.3-70-g09d2 From 8e33cc1ae118b138aadc3c354b622c045dd81009 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Feb 2016 13:11:45 -0500 Subject: Properly wrap all long lines --- var/spack/repos/builtin/packages/gcc/package.py | 27 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index eb2129c4da..8292670de0 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -50,8 +50,10 @@ class Gcc(Package): version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4') version('4.5.4', '27e459c2566b8209ab064570e1b378f7') - variant('binutils', default=sys.platform != 'darwin', description="Build via binutils") - variant('gold', default=sys.platform != 'darwin', description="Build the gold linker plugin for ld-based LTO") + variant('binutils', default=sys.platform != 'darwin', + description="Build via binutils") + variant('gold', default=sys.platform != 'darwin', + description="Build the gold linker plugin for ld-based LTO") depends_on("mpfr") depends_on("gmp") @@ -66,7 +68,8 @@ class Gcc(Package): def install(self, spec, prefix): # libjava/configure needs a minor fix to install into spack paths. - filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) + filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', + string=True) enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) if spec.satisfies("@4.7.1:") and sys.platform != 'darwin': @@ -77,17 +80,19 @@ class Gcc(Package): "--libdir=%s/lib64" % prefix, "--disable-multilib", "--enable-languages=" + ','.join(enabled_languages), - "--with-mpc=%s" % spec['mpc'].prefix, - "--with-mpfr=%s" % spec['mpfr'].prefix, - "--with-gmp=%s" % spec['gmp'].prefix, + "--with-mpc=%s" % spec['mpc'].prefix, + "--with-mpfr=%s" % spec['mpfr'].prefix, + "--with-gmp=%s" % spec['gmp'].prefix, "--enable-lto", "--with-quad"] # Binutils if spec.satisfies('+binutils'): static_bootstrap_flags = "-static-libstdc++ -static-libgcc" binutils_options = ["--with-sysroot=/", - "--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), - "--with-boot-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), + "--with-stage1-ldflags=%s %s" % + (self.rpath_args, static_bootstrap_flags), + "--with-boot-ldflags=%s %s" % + (self.rpath_args, static_bootstrap_flags), "--with-gnu-ld", "--with-ld=%s/bin/ld" % spec['binutils'].prefix, "--with-gnu-as", @@ -120,7 +125,8 @@ class Gcc(Package): """Generate a spec file so the linker adds a rpath to the libs the compiler used to build the executable.""" if not self.spec_dir: - tty.warn("Could not install specs for %s." % self.spec.format('$_$@')) + tty.warn("Could not install specs for %s." % + self.spec.format('$_$@')) return gcc = Executable(join_path(self.prefix.bin, 'gcc')) @@ -130,5 +136,6 @@ class Gcc(Package): for line in lines: out.write(line + "\n") if line.startswith("*link:"): - out.write("-rpath %s/lib:%s/lib64 \\\n"% (self.prefix, self.prefix)) + out.write("-rpath %s/lib:%s/lib64 \\\n" % + (self.prefix, self.prefix)) set_install_permissions(specs_file) -- cgit v1.2.3-70-g09d2 From fdd7e91ba078bea4f0fec1859124baaa8261fa2c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 12:49:56 +0100 Subject: add shared variant to mumps (needed for Trilinos) plus tests --- .../repos/builtin/packages/mumps/Makefile.inc | 5 +-- var/spack/repos/builtin/packages/mumps/package.py | 45 +++++++++++++++++++--- 2 files changed, 41 insertions(+), 9 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mumps/Makefile.inc b/var/spack/repos/builtin/packages/mumps/Makefile.inc index 2e6a041878..22d8f5518a 100644 --- a/var/spack/repos/builtin/packages/mumps/Makefile.inc +++ b/var/spack/repos/builtin/packages/mumps/Makefile.inc @@ -8,12 +8,9 @@ IORDERINGSF = $(ISCOTCH) IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH) PLAT = -LIBEXT = .a -OUTC = -o +OUTC = -o OUTF = -o RM = /bin/rm -f -AR = ar vr -RANLIB = ranlib INCSEQ = -I$(topdir)/libseq LIBSEQ = -L$(topdir)/libseq -lmpiseq diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 5a254dfd00..2801d4194d 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -1,6 +1,5 @@ from spack import * -import os - +import os, sys class Mumps(Package): """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" @@ -19,6 +18,7 @@ class Mumps(Package): variant('float', default=True, description='Activate the compilation of smumps') variant('complex', default=True, description='Activate the compilation of cmumps and/or zmumps') variant('idx64', default=False, description='Use int64_t/integer*8 as default index type') + variant('shared', default=True, description='Build shared libraries') depends_on('scotch + esmumps', when='~ptscotch+scotch') @@ -105,6 +105,27 @@ class Mumps(Package): # compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER makefile_conf.append("CDEFS = -DAdd_") + if '+shared' in self.spec: + if sys.platform == 'darwin': + # Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew) + makefile_conf.extend([ + 'LIBEXT=.dylib', + 'AR=%s -dynamiclib -undefined dynamic_lookup -o ' % os.environ['FC'], + 'RANLIB=echo' + ]) + else: + makefile_conf.extend([ + 'LIBEXT=.so', + 'AR=$(FL) -shared -o', + 'RANLIB=echo' + ]) + else: + makefile_conf.extend([ + 'LIBEXT = .a', + 'AR = ar vr', + 'RANLIB = ranlib' + ]) + makefile_inc_template = join_path(os.path.dirname(self.module.__file__), 'Makefile.inc') @@ -121,7 +142,7 @@ class Mumps(Package): def install(self, spec, prefix): make_libs = [] - # the coice to compile ?examples is to have kind of a sanity + # the choice to compile ?examples is to have kind of a sanity # check on the libraries generated. if '+float' in spec: make_libs.append('sexamples') @@ -135,10 +156,24 @@ class Mumps(Package): self.write_makefile_inc() - # Build fails in parallel, at least on OS-X + # Build fails in parallel make(*make_libs, parallel=False) install_tree('lib', prefix.lib) install_tree('include', prefix.include) if '~mpi' in spec: - install('libseq/libmpiseq.a', prefix.lib) + lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so' + lib_suffix = lib_dsuffix if '+shared' in spec else '.a' + install('libseq/libmpiseq%s' % lib_suffix, prefix.lib) + + # FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI + # FIXME: use something like numdiff to compare blessed output with the current + with working_dir('examples'): + if '+float' in spec: + os.system('./ssimpletest < input_simpletest_real') + if '+complex' in spec: + os.system('./csimpletest < input_simpletest_real') + if '+double' in spec: + os.system('./dsimpletest < input_simpletest_real') + if '+complex' in spec: + os.system('./zsimpletest < input_simpletest_cmplx') -- cgit v1.2.3-70-g09d2 From 540e57f02686bad7125a951d14784e8fcc896e26 Mon Sep 17 00:00:00 2001 From: Josh Sixsmith Date: Fri, 25 Mar 2016 18:27:02 +1100 Subject: Upload of GDAL, kealib, openjpeg, py-tuiview package builds. --- var/spack/repos/builtin/packages/gdal/package.py | 69 ++++++++++++++++++++++ var/spack/repos/builtin/packages/kealib/package.py | 35 +++++++++++ .../repos/builtin/packages/openjpeg/package.py | 26 ++++++++ .../repos/builtin/packages/py-tuiview/package.py | 19 ++++++ 4 files changed, 149 insertions(+) create mode 100644 var/spack/repos/builtin/packages/gdal/package.py create mode 100644 var/spack/repos/builtin/packages/kealib/package.py create mode 100644 var/spack/repos/builtin/packages/openjpeg/package.py create mode 100644 var/spack/repos/builtin/packages/py-tuiview/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py new file mode 100644 index 0000000000..4f1f1ec2dd --- /dev/null +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -0,0 +1,69 @@ +from spack import * + +class Gdal(Package): + """ + GDAL is a translator library for raster and vector geospatial + data formats that is released under an X/MIT style Open Source + license by the Open Source Geospatial Foundation. As a library, + it presents a single raster abstract data model and vector + abstract data model to the calling application for all supported + formats. It also comes with a variety of useful command line + utilities for data translation and processing + """ + + homepage = "http://www.gdal.org/" + url = "http://download.osgeo.org/gdal/2.0.2/gdal-2.0.2.tar.gz" + list_url = "http://download.osgeo.org/gdal/" + list_depth = 2 + + version('2.0.2', '573865f3f59ba7b4f8f4cddf223b52a5') + + extends('python') + + variant('hdf5', default=False, description='Enable HDF5 support') + variant('hdf', default=False, description='Enable HDF4 support') + variant('openjpeg', default=False, description='Enable JPEG2000 support') + variant('geos', default=False, description='Enable GEOS support') + variant('kea', default=False, description='Enable KEA support') + variant('netcdf', default=False, description='Enable netcdf support') + + depends_on('swig') + depends_on("hdf5", when='+hdf5') + depends_on("hdf", when='+hdf') + depends_on("openjpeg", when='+openjpeg') + depends_on("geos", when='+geos') + depends_on("kealib", when='+kea') + depends_on("netcdf", when='+netcdf') + depends_on("libtiff") + depends_on("libpng") + depends_on("zlib") + depends_on("proj") + depends_on("py-numpy") + + parallel = False + + def install(self, spec, prefix): + args = [] + args.append("--prefix=%s" % prefix) + args.append("--with-liblzma=yes") + args.append("--with-zlib=%s" % spec['zlib'].prefix) + args.append("--with-python=%s" % spec['python'].prefix.bin + "/python") + args.append("--without-libtool") + + if '+geos' in spec: + args.append('--with-geos=yes') + if '+hdf' in spec: + args.append('--with-hdf4=%s' % spec['hdf'].prefix) + if '+hdf5' in spec: + args.append('--with-hdf5=%s' % spec['hdf5'].prefix) + if '+openjpeg' in spec: + args.append('--with-openjpeg=%s' % spec['openjpeg'].prefix) + if '+kea' in spec: + args.append('--with-kea=yes') + if '+netcdf' in spec: + args.append('--with-netcdf=%s' % spec['netcdf'].prefix) + + configure(*args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/kealib/package.py b/var/spack/repos/builtin/packages/kealib/package.py new file mode 100644 index 0000000000..475d21e1d8 --- /dev/null +++ b/var/spack/repos/builtin/packages/kealib/package.py @@ -0,0 +1,35 @@ +from spack import * + +class Kealib(Package): + """An HDF5 Based Raster File Format + + KEALib provides an implementation of the GDAL data model. + The format supports raster attribute tables, image pyramids, + meta-data and in-built statistics while also handling very + large files and compression throughout. + + Based on the HDF5 standard, it also provides a base from which + other formats can be derived and is a good choice for long + term data archiving. An independent software library (libkea) + provides complete access to the KEA image format and a GDAL + driver allowing KEA images to be used from any GDAL supported software. + + Development work on this project has been funded by Landcare Research. + """ + homepage = "http://kealib.org/" + url = "https://bitbucket.org/chchrsc/kealib/get/kealib-1.4.5.tar.gz" + + version('1.4.5', '112e9c42d980b2d2987a3c15d0833a5d') + + depends_on("hdf5") + + def install(self, spec, prefix): + with working_dir('trunk', create=False): + cmake_args = [] + cmake_args.append("-DCMAKE_INSTALL_PREFIX=%s" % prefix) + cmake_args.append("-DHDF5_INCLUDE_DIR=%s" % spec['hdf5'].prefix.include) + cmake_args.append("-DHDF5_LIB_PATH=%s" % spec['hdf5'].prefix.lib) + cmake('.', *cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py new file mode 100644 index 0000000000..afec197d11 --- /dev/null +++ b/var/spack/repos/builtin/packages/openjpeg/package.py @@ -0,0 +1,26 @@ +from spack import * + +class Openjpeg(Package): + """ + OpenJPEG is an open-source JPEG 2000 codec written in C language. + It has been developed in order to promote the use of JPEG 2000, a + still-image compression standard from the Joint Photographic + Experts Group (JPEG). + Since April 2015, it is officially recognized by ISO/IEC and + ITU-T as a JPEG 2000 Reference Software. + """ + homepage = "https://github.com/uclouvain/openjpeg" + url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz" + + version('2.1' , '3e1c451c087f8462955426da38aa3b3d') + version('2.0.1', '105876ed43ff7dbb2f90b41b5a43cfa5') + version('2.0' , 'cdf266530fee8af87454f15feb619609') + version('1.5.2', '545f98923430369a6b046ef3632ef95c') + version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e') + + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/py-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py new file mode 100644 index 0000000000..984b4196b1 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tuiview/package.py @@ -0,0 +1,19 @@ +from spack import * + +class PyTuiview(Package): + """ + TuiView is a lightweight raster GIS with powerful raster attribute + table manipulation abilities. + """ + homepage = "https://bitbucket.org/chchrsc/tuiview" + url = "https://bitbucket.org/chchrsc/tuiview/get/tuiview-1.1.7.tar.gz" + + version('1.1.7', '4b3b38a820cc239c8ab4a181ac5d4c30') + + extends("python") + depends_on("py-pyqt") + depends_on("py-numpy") + depends_on("gdal") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 3e39daeb12aa13a3f3f975ff315143bc3f13a2b4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 09:56:24 +0100 Subject: add fPIC to MUMPS when building shared libs --- var/spack/repos/builtin/packages/mumps/package.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 2801d4194d..b295857ab5 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -70,6 +70,9 @@ class Mumps(Package): makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings))) + # when building shared libs need -fPIC, otherwise + # /usr/bin/ld: graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC + fpic = '-fPIC' if '+shared' in self.spec else '' # TODO: test this part, it needs a full blas, scalapack and # partitionning environment with 64bit integers if '+idx64' in self.spec: @@ -77,14 +80,14 @@ class Mumps(Package): # the fortran compilation flags most probably are # working only for intel and gnu compilers this is # perhaps something the compiler should provide - ['OPTF = -O -DALLOW_NON_INIT %s' % '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8', - 'OPTL = -O ', - 'OPTC = -O -DINTSIZE64']) + ['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic,'-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'), + 'OPTL = %s -O ' % fpic, + 'OPTC = %s -O -DINTSIZE64' % fpic]) else: makefile_conf.extend( - ['OPTF = -O -DALLOW_NON_INIT', - 'OPTL = -O ', - 'OPTC = -O ']) + ['OPTF = %s -O -DALLOW_NON_INIT' % fpic, + 'OPTL = %s -O ' % fpic, + 'OPTC = %s -O ' % fpic]) if '+mpi' in self.spec: -- cgit v1.2.3-70-g09d2 From 439d3b3ddb4e53721b216bd19bec1e8fa16faf89 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 17:38:25 +0200 Subject: mumps: add install_name / soname --- var/spack/repos/builtin/packages/mumps/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index b295857ab5..26440ab7c8 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -113,13 +113,13 @@ class Mumps(Package): # Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew) makefile_conf.extend([ 'LIBEXT=.dylib', - 'AR=%s -dynamiclib -undefined dynamic_lookup -o ' % os.environ['FC'], + 'AR=%s -dynamiclib -Wl,-install_name -Wl,%s/$(notdir $@) -undefined dynamic_lookup -o ' % (os.environ['FC'],prefix.lib), 'RANLIB=echo' ]) else: makefile_conf.extend([ 'LIBEXT=.so', - 'AR=$(FL) -shared -o', + 'AR=$(FL) -shared -Wl,-soname -Wl,%s/$(notdir $@) -o' % prefix.lib, 'RANLIB=echo' ]) else: -- cgit v1.2.3-70-g09d2 From ccd155572fc8ef066b93424e90a74f9bb8fcf435 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sun, 27 Mar 2016 18:18:54 -0400 Subject: Removed redundant package py-libxml2. Use libxml2 instead. --- var/spack/repos/builtin/packages/py-libxml2/package.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/py-libxml2/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-libxml2/package.py b/var/spack/repos/builtin/packages/py-libxml2/package.py deleted file mode 100644 index 59005428e4..0000000000 --- a/var/spack/repos/builtin/packages/py-libxml2/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyLibxml2(Package): - """A Python wrapper around libxml2.""" - homepage = "https://xmlsoft.org/python.html" - url = "ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.21.tar.gz" - - version('2.6.21', '229dd2b3d110a77defeeaa73af83f7f3') - - extends('python') - depends_on('libxml2') - depends_on('libxslt') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 63c3feb79e7e4022e5565deb9f2749fa9732e7d2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 29 Mar 2016 09:41:57 +0200 Subject: minor fixes to hypre and muparser on Linux --- var/spack/repos/builtin/packages/hypre/package.py | 3 +++ var/spack/repos/builtin/packages/muparser/package.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 0e99553293..4b915daa68 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -42,6 +42,9 @@ class Hypre(Package): if '~internal-superlu' in self.spec: configure_args.append("--without-superlu") + # MLI and FEI do not build without superlu on Linux + configure_args.append("--without-mli") + configure_args.append("--without-fei") # Hypre's source is staged under ./src so we'll have to manually # cd into it. diff --git a/var/spack/repos/builtin/packages/muparser/package.py b/var/spack/repos/builtin/packages/muparser/package.py index a1a9ff90e5..19ca8ce287 100644 --- a/var/spack/repos/builtin/packages/muparser/package.py +++ b/var/spack/repos/builtin/packages/muparser/package.py @@ -14,5 +14,5 @@ class Muparser(Package): configure(*options) - make() + make(parallel=False) make("install") -- cgit v1.2.3-70-g09d2 From ccc1b23bea57a9c8a31ab1f4e9b739b54440466b Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Mon, 28 Mar 2016 16:28:29 -0500 Subject: this allows gcc4.9.3 to build on OSX10 --- .../builtin/packages/gcc/darwin/gcc-4.9.patch1 | 42 ++++++++++++++++++++++ .../builtin/packages/gcc/darwin/gcc-4.9.patch2 | 28 +++++++++++++++ var/spack/repos/builtin/packages/gcc/package.py | 12 ++++++- 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 create mode 100644 var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 new file mode 100644 index 0000000000..444e292786 --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 @@ -0,0 +1,42 @@ +diff --git a/gcc/configure b/gcc/configure +index 9523773..52b0bf7 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -24884,7 +24884,7 @@ if test "${gcc_cv_as_ix86_filds+set}" = set; then : + else + gcc_cv_as_ix86_filds=no + if test x$gcc_cv_as != x; then +- $as_echo 'filds mem; fists mem' > conftest.s ++ $as_echo 'filds (%ebp); fists (%ebp)' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 +@@ -24915,7 +24915,7 @@ if test "${gcc_cv_as_ix86_fildq+set}" = set; then : + else + gcc_cv_as_ix86_fildq=no + if test x$gcc_cv_as != x; then +- $as_echo 'fildq mem; fistpq mem' > conftest.s ++ $as_echo 'fildq (%ebp); fistpq (%ebp)' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 68b0ee8..bd53978 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -3869,13 +3869,13 @@ foo: nop + + gcc_GAS_CHECK_FEATURE([filds and fists mnemonics], + gcc_cv_as_ix86_filds,,, +- [filds mem; fists mem],, ++ [filds (%ebp); fists (%ebp)],, + [AC_DEFINE(HAVE_AS_IX86_FILDS, 1, + [Define if your assembler uses filds and fists mnemonics.])]) + + gcc_GAS_CHECK_FEATURE([fildq and fistpq mnemonics], + gcc_cv_as_ix86_fildq,,, +- [fildq mem; fistpq mem],, ++ [fildq (%ebp); fistpq (%ebp)],, + [AC_DEFINE(HAVE_AS_IX86_FILDQ, 1, + [Define if your assembler uses fildq and fistq mnemonics.])]) + diff --git a/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 new file mode 100644 index 0000000000..b065997f45 --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 @@ -0,0 +1,28 @@ +From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001 +From: Iain Sandoe +Date: Sat, 21 Dec 2013 00:30:18 +0000 +Subject: [PATCH] don't try to mark local symbols as no-dead-strip + +--- + gcc/config/darwin.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c +index 40804b8..0080299 100644 +--- a/gcc/config/darwin.c ++++ b/gcc/config/darwin.c +@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) + void + darwin_mark_decl_preserved (const char *name) + { ++ /* Actually we shouldn't mark any local symbol this way, but for now ++ this only happens with ObjC meta-data. */ ++ if (darwin_label_is_anonymous_local_objc_name (name)) ++ return; ++ + fprintf (asm_out_file, "\t.no_dead_strip "); + assemble_name (asm_out_file, name); + fputc ('\n', asm_out_file); +-- +2.2.1 + diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 232d0020df..6043b62279 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -27,6 +27,7 @@ from spack import * from contextlib import closing from glob import glob import sys +import os class Gcc(Package): """The GNU Compiler Collection includes front ends for C, C++, @@ -63,6 +64,9 @@ class Gcc(Package): # TODO: integrate these libraries. #depends_on("ppl") #depends_on("cloog") + if sys.platform == 'darwin': + patch('darwin/gcc-4.9.patch1', when='@4.9.3') + patch('darwin/gcc-4.9.patch2', when='@4.9.3') def install(self, spec, prefix): # libjava/configure needs a minor fix to install into spack paths. @@ -70,6 +74,7 @@ class Gcc(Package): string=True) enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) + if spec.satisfies("@4.7.1:") and sys.platform != 'darwin': enabled_languages.add('go') @@ -101,12 +106,17 @@ class Gcc(Package): isl_options = ["--with-isl=%s" % spec['isl'].prefix] options.extend(isl_options) + if sys.platform == 'darwin' : + darwin_options = [ "--with-build-config=bootstrap-debug" ] + options.extend(darwin_options) + build_dir = join_path(self.stage.path, 'spack-build') configure = Executable( join_path(self.stage.source_path, 'configure') ) with working_dir(build_dir, create=True): # Rest of install is straightforward. configure(*options) - make() + if sys.platform == 'darwin' : make("bootstrap") + else: make() make("install") self.write_rpath_specs() -- cgit v1.2.3-70-g09d2 From ad402ff85bc4150aa49fb394929b062b40b27604 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 21 Mar 2016 22:36:31 +0100 Subject: astyle@2.04: add new package --- var/spack/repos/builtin/packages/astyle/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/astyle/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py new file mode 100644 index 0000000000..7260fd74a1 --- /dev/null +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -0,0 +1,17 @@ +from spack import * +import os + +class Astyle(Package): + """A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective-C, C#, and Java Source Code.""" + homepage = "http://astyle.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz" + + version('2.04', '30b1193a758b0909d06e7ee8dd9627f6') + + def install(self, spec, prefix): + + with working_dir('src'): + make('-f', + join_path(self.stage.source_path,'build','clang','Makefile'), + parallel=False) + install(join_path(self.stage.source_path, 'src','bin','astyle'), self.prefix.bin) -- cgit v1.2.3-70-g09d2