Commit Graph

117 Commits

Author SHA1 Message Date
Todd Gamblin
6f50cd52ed copyright: update license headers for 2013-2019 copyright. 2019-01-01 00:44:28 -08:00
Mark W. Krentel
ab8870fd51 gcc: fix sys_ustat.h patch for gcc 4.8 and 4.9 (#10081)
The sys_ustat.h.patch to file sanitizer_platform_limits_posix.cc from
PR #10046 does not apply cleanly to gcc 4.8 or 4.9 (or earlier).

GCC up to 4.8.x either don't have libsanitizer or else don't include
ustat.h in sanitizer_platform_limits_posix.cc.

GCC 4.9.x includes ustat.h, but needs a slightly different patch.

The patch applies to GCC 5.x up to 6.4, and 7.x up to 7.3 and also
8.1.0.

The patch is already included in the tar files for gcc 6.5.0, 7.4.0
and 8.2.0.
2018-12-11 22:54:12 -06:00
Matthias Diener
f0326c0ccf gcc: add versions 7.4, 6.5 (#10061) 2018-12-08 09:22:28 -06:00
James Clark
1650e9c0b2 gcc: Add patch to build GCC with glibc 2.28 and later (#10046) 2018-12-07 18:06:07 -08:00
Axel Huebl
33b65ecca0 GCC: ISL and mpfr upper bounds (#9513)
* GCC: constrain version 6, 7, and 8 to build with ISL version at
  most 0.18
* GCC version 9 (not yet released) will be compatible with
  ISL version 0.20 so future GCC releases are constrained to build
  with ISL version at most 0.20
* ISL: Add v0.15, replace all md5 sums with sha256 sums for ISL
  versions
* GCC versions before 6 were constrained to build with ISL 0.14
  but have been confirmed to work with ISL 0.15
* GCC: Place an upper bound on GCC's mpfr dependency
2018-10-30 13:26:41 -07:00
Todd Gamblin
eea786f4e8 relicense: replace LGPL headers with Apache-2.0/MIT SPDX headers
- remove the old LGPL license headers from all files in Spack
- add SPDX headers to all files
  - core and most packages are (Apache-2.0 OR MIT)
  - a very small number of remaining packages are LGPL-2.1-only
2018-10-17 14:42:06 -07:00
Adam J. Stewart
5be5c486ac Download GNU packages from mirrors (#8992) 2018-08-15 23:27:21 -07:00
Adam J. Stewart
73c978ddd9 install_tree, copy_tree can install into existing directory structures (#8289)
Replace use of `shutil.copytree` with `copy_tree` and `install_tree` functions in `llnl.util.filesystem`.

- `copy_tree` copies without setting permissions.  It should be used to copy files around in the build directory.
- `install_tree` copies files and sets permissions.  It should be used to copy files into the installation directory.
- `install` and `copy` are analogous single-file functions.
- add more extensive tests for these functions
- update packages to use these functions.
2018-08-15 09:30:09 -07:00
Michael Kuhn
d02c4bbd9a gcc: Add 8.2.0 (#8813) 2018-07-27 08:14:49 -05:00
Todd Gamblin
20e4038a72 style: make core comply with pep8-naming 2018-07-19 00:41:36 -07:00
Michael Kuhn
8a1bbc5d84 gcc: Fix build of older versions with recent versions of glibc (#8510) 2018-07-04 07:39:07 -05:00
George Hartzell
4864005483 Fix gcc@5.5.0 on OS X 10.13.5 (#8540)
* Fix gcc@5.5.0 on OS X 10.13.5

gcc@5.5.0 failed to build on my OS X 10.13.5 box.

I found/modified a patch in the MacPorts world that traced back to
Homebrewy, https://trac.macports.org/ticket/56502#no1

The issue has also been reported to gcc,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83531

I eventually discovered a nearly identical version of the patch at
Homebrew.

https://github.com/Homebrew/formula-patches/blob/master/gcc%405/10.13_headers.patch

gcc builds with this and I can compile many things, but e.g. curl and
cmake both fail.  As @davydden and others observed in #1847, it seems
to be an apple thing.

* Fix mistaken change to patch when clause (added :)

I mistakenly deleted a colon from the
'darwin/gcc-7.1.0-headerpad.patch'.
2018-06-23 19:40:42 -05:00
Adam J. Stewart
b83be5f2d4
macOS-specific patch no longer applies to GCC 8 (#8029) 2018-05-06 09:28:33 -05:00
sknigh
4fe6d9acee Added GCC 8.1.0 (#8026)
Built once on Centos 7 w/ external GCC 4.8.5 compiler
2018-05-04 18:52:03 -05:00
Adam J. Stewart
69f94f18a3
Fix GCC 6/7 build on APFS (#7696) 2018-04-10 11:46:44 -05:00
Todd Gamblin
54f97d1dec
Update copyright on LLNL files for 2018. (#7592) 2018-03-24 12:13:52 -07:00
Geoffrey Oxberry
ae589c22f2 gcc: add version 7.3.0 (#7097) 2018-01-31 13:41:12 +01:00
Denis Davydov
13dade60dd gcc: remove all variant (#5283) 2017-12-03 10:19:55 +01:00
sknigh
e2cf933ec1 gcc environment module will set CC, CXX, FC, F77, and F90 flags (#3954) 2017-11-23 12:44:55 +01:00
baip
ed00757265 gcc: add 5.5.0 (#6171) 2017-11-08 20:27:08 +01:00
Todd Gamblin
05fa302655
Replace github.com/llnl/spack with github.com/spack/spack (#6142)
We moved to a new GitHub org! Now make the code and docs reflect that.
2017-11-04 17:08:04 -07:00
Denis Davydov
1b53e82348 various fixes for macOS high sierra (#5647)
* various fixes for macOS high sierra

* add macOS_version() helper function

* flake8 fixes

* update oce and trilinos

* fix bison
2017-10-12 11:41:57 -07:00
Michael Kuhn
84ae7872d3 Update copyright notices for 2017 (#5295) 2017-09-06 17:44:16 -10:00
Michael Kuhn
43a634ca80 gcc: Add 7.2.0 (#5098) 2017-08-15 12:14:07 +02:00
Adam J. Stewart
392603e90b Make GCC binutils variant default to False (#4973) 2017-08-07 10:13:31 -07:00
Mike DePaulo
72aa99cb24 GCC: Add strip variant to reduce installation size (#4670)
* gcc: Add strip variant

* gcc: Fix strip variant description being too long
2017-07-07 22:17:52 -05:00
Michael Kuhn
e3bd6e3d93 gcc: Add version 6.4.0 (#4673) 2017-07-05 15:44:07 +02:00
Todd Gamblin
cac4362f64 Make LICENSE recognizable by GitHub. (#4598) 2017-06-24 22:22:55 -07:00
Milton Woods
a5c6f0412b gcc: use isl@0.14 for gcc@5 (#4474) 2017-06-10 08:16:10 -05:00
Michael Kuhn
665598af1b Fix missing gcc dependency on zip (#4303)
For @:6, java is included in languages=all and requires zip.
2017-05-30 14:59:47 -05:00
becker33
12ab882eba Fix issues parsing multiple anonymous specs (#4199)
* fix parser
* Removed xfails
* cleaned up debug print statements
* make use of these changes in gcc
* Added comment explaining unreachable line, line left for added protection
2017-05-24 17:13:18 -07:00
Michael Kuhn
571a42d614 Fix gcc not finding zlib (#4291) 2017-05-19 12:03:56 -05:00
Adam J. Stewart
36db5ba9d8 Fix newline character in GCC package (#4181)
* Fix newline character in GCC package

* Remove the newline completely
2017-05-09 18:51:40 -05:00
Adam J. Stewart
4b866c6395 Add GCC 7 (#4144)
* Add GCC 7
* Allow users to build subset of GCC compilers with multi-value variant.
* Add comment explaining what 'all' actually means
* More specific golang support
* Only require Zip when building Java
* Comment out provide directives that don't currently work
* Add Ada support
* Use conflicts directive
* Fix joining of languages
* Need special flag to build jit
* Explicitly declare GNAT download extension
* Import tty, update lib64 to lib
* BRIG and Go are not supported on macOS
* Simplify formatting and imports
* JIT patch required for newer versions as well
2017-05-08 13:28:28 -07:00
Adam J. Stewart
ce3ab503de Python command, libraries, and headers (#3367)
## Motivation

Python installations are both important and unfortunately inconsistent. Depending on the Python version, OS, and the strength of the Earth's magnetic field when it was installed, the name of the Python executable, directory containing its libraries, library names, and the directory containing its headers can vary drastically. 

I originally got into this mess with #3274, where I discovered that Boost could not be built with Python 3 because the executable is called `python3` and we were telling it to use `python`. I got deeper into this mess when I started hacking on #3140, where I discovered just how difficult it is to find the location and name of the Python libraries and headers.

Currently, half of the packages that depend on Python and need to know this information jump through hoops to determine the correct information. The other half are hard-coded to use `python`, `spec['python'].prefix.lib`, and `spec['python'].prefix.include`. Obviously, none of these packages would work for Python 3, and there's no reason to duplicate the effort. The Python package itself should contain all of the information necessary to use it properly. This is in line with the recent work by @alalazo and @davydden with respect to `spec['blas'].libs` and friends.

## Prefix

For most packages in Spack, we assume that the installation directory is `spec['python'].prefix`. This generally works for anything installed with Spack, but gets complicated when we include external packages. Python is a commonly used external package (it needs to be installed just to run Spack). If it was installed with Homebrew, `which python` would return `/usr/local/bin/python`, and most users would erroneously assume that `/usr/local` is the installation directory. If you peruse through #2173, you'll immediately see why this is not the case. Homebrew actually installs Python in `/usr/local/Cellar/python/2.7.12_2` and symlinks the executable to `/usr/local/bin/python`. `PYTHONHOME` (and presumably most things that need to know where Python is installed) needs to be set to the actual installation directory, not `/usr/local`.

Normally I would say, "sounds like user error, make sure to use the real installation directory in your `packages.yaml`". But I think we can make a special case for Python. That's what we decided in #2173 anyway. If we change our minds, I would be more than happy to simplify things.

To solve this problem, I created a `spec['python'].home` attribute that works the same way as `spec['python'].prefix` but queries Python to figure out where it was actually installed. @tgamblin Is there any way to overwrite `spec['python'].prefix`? I think it's currently immutable.

## Command

In general, Python 2 comes with both `python` and `python2` commands, while Python 3 only comes with a `python3` command. But this is up to the OS developers. For example, `/usr/bin/python` on Gentoo is actually Python 3. Worse yet, if someone is using an externally installed Python, all 3 commands may exist in the same directory! Here's what I'm thinking:

If the spec is for Python 3, try searching for the `python3` command.
If the spec is for Python 2, try searching for the `python2` command.
If neither are found, try searching for the `python` command.

## Libraries

Spack installs Python libraries in `spec['python'].prefix.lib`. Except on openSUSE 13, where it installs to `spec['python'].prefix.lib64` (see #2295 and #2253). On my CentOS 6 machine, the Python libraries are installed in `/usr/lib64`. Both need to work.

The libraries themselves change name depending on OS and Python version. For Python 2.7 on macOS, I'm seeing:
```
lib/libpython2.7.dylib
```
For Python 3.6 on CentOS 6, I'm seeing:
```
lib/libpython3.so
lib/libpython3.6m.so.1.0
lib/libpython3.6m.so -> lib/libpython3.6m.so.1.0
```
Notice the `m` after the version number. Yeah, that's a thing.

## Headers

In Python 2.7, I'm seeing:
```
include/python2.7/pyconfig.h
```
In Python 3.6, I'm seeing:
```
include/python3.6m/pyconfig.h
```
It looks like all Python 3 installations have this `m`. Tested with Python 3.2 and 3.6 on macOS and CentOS 6

Spack has really nice support for libraries (`find_libraries` and `LibraryList`), but nothing for headers. Fixed.
2017-04-29 17:24:13 -07:00
healther
74b1f2b860 Fixup gcc@4.9{0,1,2} build on darwin (#3789) 2017-04-11 07:37:44 -05:00
Michael Kuhn
b81a50b4e3 Add zip package (#3715) 2017-04-06 08:12:51 -05:00
Todd Gamblin
221f179716 Add better tests for web.py; fix some bugs found with spidering.
- _spider in web.py was actually failing to spider deeper than a certain
  point.
- Fixed multiprocessing pools to not use daemons and to allow recursive
  spawning.
- Added detailed tests for spidering and for finding archive versions.
- left some xfail URL finding exercises for the reader.
- Fix noqa annotations for some @when decorators
2017-04-01 15:10:45 -07:00
Adam J. Stewart
1fe987949f Clean up the gcc package (#3511)
* Clean up the gcc package

* Add preliminary testing support

* Older versions of GCC do not depend on MPC

* DejaGnu 1.4.4 cannot be built in parallel

* Fix GCC test dir

* Add two more deps required to run the testsuite
2017-03-24 14:56:22 -05:00
Adam J. Stewart
e7b019bf48 Revert "Make libgcc_s relocatable on Macos by adding @rpath to installname" (#3349) 2017-03-03 21:32:44 -06:00
Patrick Gartung
4afb7a729c Make libgcc_s relocatable on Macos by adding @rpath to installname (#1671)
* Make libgcc_s relocatable

* spack specifies full path to lib64

* don't need trailing /

* setting rpath is different on macos

* add -headerpad_max_install_names linker options

* formatting fixes

* Add Adam's recommendation
2017-03-02 16:39:05 -06:00
Massimiliano Culpo
81a5146b1d AutotoolsPackage: minor improvements (#2859)
* AutotoolsPackage: added configure_directory to permit build out of source. The configure script executable is now invoked with an absolute path. Modified a few packages accordingly.

* build_systems: functions returning directories are now properties

* build_systems: fixed issues with tcl and tk

* AutotoolsPackage: reworked recipe for autoreconf
2017-01-26 02:27:15 -08:00
Adam J. Stewart
29bac34c1d Ensure that every file in Spack has a license (#2659)
* Ensure that every package has a license

Also fixes URLs with http://http:// doubled.

This is a continuation of #2656.

* Add license to every file in Spack

* Make sure Todd is the author of all packages

* Fix flake8 tests

* Don't license external Sphinx docs

* Don't display licenses in tutorial example packages

Also fixes typos and converts command-line examples
from tcsh to bash, which is more common
2016-12-27 00:17:12 -08:00
Michael Kuhn
33592d0142 Update gcc to 6.3.0 (#2669) 2016-12-25 18:52:58 -08:00
Adam J. Stewart
ca5f713282 Further restrict versions of GCC patched (#2259) 2016-11-06 15:31:48 -08:00
Adam J. Stewart
08300ccffb Allow newer versions of GCC to compile older versions of GCC (#2107)
* Add patch allowing GCC 6 to compile GCC 5

* Expand patch version range
2016-10-25 11:06:33 -07:00
Matthew LeGendre
8de143a994 Fixes needed to build gcc on Linux/ppc64le (#2057)
* Fixes needed to build gcc on Linux/ppc64le

* flake8 fix.
2016-10-19 23:29:59 -07:00
Geoffrey Oxberry
df79ba0dcf gcc: fix darwin dispatch/object.h header issue (#1518)
Fixes #1203. Apple ships headers in Yosemite (and possibly earlier) that
are gcc-incompatible, but compile fine with clang. The fix is to copy
the offending system header from /usr/include/${REST_OF_HEADER_PATH} to
${GCC_PREFIX}/include/${REST_OF_HEADER_PATH} and replace the non-gcc-
compatible features with gcc-compatible equivalents.

See https://github.com/hashdist/hashstack/pull/771/files for
inspiration, and
http://hamelot.io/programming/osx-gcc-dispatch_block_t-has-not-been-declared-invalid-typedef/
for a description of the header issue.
2016-10-02 18:54:43 -07:00
becker33
e73a1a4ec3 Merge pull request #1558 from mcfadden8/mmcfadden-features/gcc-pic-libraries
Added variant to gcc package to install PIC versions of libgfortran and libstdc++
2016-08-25 16:00:00 -07:00
Erik Schnetter
7b49166f9b Update gcc to @6.2.0
Also add some missing older version.
Update download location to original GNU location.
2016-08-22 20:26:54 -04:00
Marty McFadden
f4ec99ecb4 Added +piclibs variant for building PIC versions of libgfortran.a and libstdc++.a 2016-08-17 09:28:21 -07:00
George Hartzell
4efe022165 Update with info about gcc-5.4.0 2016-07-21 15:36:22 -04:00
Tom Scogland
71d9911539 go cleanup, adding hub 2016-05-15 10:23:33 -07:00
Tom Scogland
2bfa4d7e4f removing comments
also randomly changed unnecessary licence block
2016-05-14 22:42:14 -07:00
Tom Scogland
577657b3f7 go rework
This commit includes:
* a new go package that uses gccgo to bootstrap the go toolchain
* env support added to Executable
* a new Go fetch strategy that uses `go get` to fetch a package and all
  of its deps
* A platinum searcher package that leverages the new go package and
  fetch strategy
2016-05-14 22:35:55 -07:00
Tom Scogland
0816e9554d adding go_compiler providers 2016-05-14 18:06:42 -07:00
Todd Gamblin
e7ced54369 Correct LLNL LGPL license template for clarity. 2016-05-11 21:22:25 -07:00
Adam J. Stewart
88fa9084e2 Add latest version of GCC 2016-05-03 15:58:14 -05:00
Patrick Gartung
ccc1b23bea this allows gcc4.9.3 to build on OSX10 2016-03-29 04:15:07 -07:00
Todd Gamblin
9061800b30 Merge branch 'eschnett/gcc-osx-2' of git://github.com/eschnett/spack into eschnett-eschnett/gcc-osx-2 2016-03-27 13:18:23 -07:00
Todd Gamblin
d8c0edcc81 Minor code cleanup for gcc. 2016-02-14 14:40:25 -08:00
Erik Schnetter
8e33cc1ae1 Properly wrap all long lines 2016-02-12 13:11:45 -05:00
Erik Schnetter
77c17e1d92 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
2016-02-12 12:52:47 -05:00
Todd Gamblin
10848c2e9a Refactor args for Executable.__call__
- simplify output, error, and input redirection
- `return_output=True` is now `output=str`
- `return_output=True` will still work for the time being but is
  deprecated.

- previously you could say `return_output=True` and `output=<stream>`,
  which wouldn't actually write to the stream.  Now you actually can't
  specify erroneous cases since there is only one parameter with
  mutually exclusive options..
2016-01-21 10:46:33 -08:00
Todd Gamblin
8d6342c53d Merge branch 'mplegendre-multi_pkgsrc_roots' into develop
- This moves var/spack/packages to var/spack/repos/builtin/packages.

- Packages that did not exist in the source branch, or were changed in
  develop, were moved into var/spack/repos/builtin/packages as part of
  the integration.

Conflicts:
	lib/spack/spack/test/unit_install.py
	var/spack/repos/builtin/packages/clang/package.py
2016-01-19 01:16:08 -08:00
Todd Gamblin
c65fd3a289 Merge branch 'develop' into mplegendre-multi_pkgsrc_roots
Conflicts:
	lib/spack/spack/cmd/create.py
	lib/spack/spack/cmd/extensions.py
	lib/spack/spack/cmd/fetch.py
	lib/spack/spack/cmd/uninstall.py
	lib/spack/spack/config.py
	lib/spack/spack/database.py
	lib/spack/spack/directory_layout.py
	lib/spack/spack/packages.py
	lib/spack/spack/spec.py
2015-12-25 16:35:55 -08:00
Todd Gamblin
89d5127900 New, cleaner package repository structure.
Package repositories now look like this:

    top-level-dir/
        repo.yaml
        packages/
            libelf/
                package.py
            mpich/
                package.py
            ...

This leaves room at the top level for additional metadata, source,
per-repo configs, indexes, etc., and it makes it easy to see that
something is a spack repo (just look for repo.yaml and packages).
2015-11-26 14:19:27 -08:00