Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create option to build compilers as needed #10761

Merged
merged 8 commits into from
Mar 8, 2019

Conversation

becker33
Copy link
Member

This PR adds a config option that allows concretization to match to compilers that are not already available, and changes the install logic to build the compiler and add it to the configuration at install time of the package building against that compiler.

The option is controlled by the install_missing_compilers boolean flag in the config.yaml configuration file.

Currently, if no compiler gcc@7.3.0 is available on the system, spack install zlib%gcc@7.3.0 will raise a concretization error. With this PR and when the option is turned on, spack install zlib%gcc@7.3.0 will build gcc and all its dependencies (with a default compiler) before building zlib against that gcc install.

@becker33 becker33 force-pushed the features/install-compilers-as-needed branch from f6c60b2 to e85d486 Compare February 28, 2019 21:56
@becker33 becker33 requested a review from scheibelp March 1, 2019 00:45
@becker33 becker33 force-pushed the features/install-compilers-as-needed branch from f82a570 to 68945c7 Compare March 1, 2019 17:52
@becker33 becker33 force-pushed the features/install-compilers-as-needed branch from 68945c7 to ddb3513 Compare March 1, 2019 19:49
Copy link
Member

@scheibelp scheibelp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a couple questions and a few requests.

lib/spack/spack/package.py Outdated Show resolved Hide resolved
lib/spack/spack/package.py Outdated Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
lib/spack/spack/concretize.py Outdated Show resolved Hide resolved
lib/spack/spack/concretize.py Outdated Show resolved Hide resolved
lib/spack/spack/compilers/__init__.py Outdated Show resolved Hide resolved
lib/spack/spack/concretize.py Outdated Show resolved Hide resolved
@becker33
Copy link
Member Author

becker33 commented Mar 6, 2019

@scheibelp addressed all comments.

@alalazo
Copy link
Member

alalazo commented Mar 6, 2019

Related PR #7868

@alalazo
Copy link
Member

alalazo commented Mar 6, 2019

Currently, if no compiler gcc@7.3.0 is available on the system, spack install zlib%gcc@7.3.0 will raise a concretization error [...] against that gcc install.

Is there any way to decide which spec will be used to build a compiler, or will it always be the default one?

@becker33
Copy link
Member Author

becker33 commented Mar 6, 2019

@alalazo if you specify a compiler, it will use that compiler and version, and concretize the rest using the package preferences from packages.yaml. If you don't specify a compiler, or if there is a compiler that satisfies your abstract spec, then you'll still get the compiler that is already on the system.

@alalazo
Copy link
Member

alalazo commented Mar 6, 2019

concretize the rest using the package preferences from packages.yaml

Thanks, that's the bit I was missing - I guess I am just not used to customize packages.yaml to change concretization defaults.

@becker33 becker33 added this to In review in Spack Stacks Mar 6, 2019
@becker33 becker33 merged commit f4d4322 into develop Mar 8, 2019
@becker33 becker33 moved this from In review to Done in Spack Stacks Mar 27, 2019
scheibelp pushed a commit that referenced this pull request Apr 16, 2019
Compilers are treated separately from other dependencies in Spack.
#10761 added the option to automatically install compilers when a
package specifies using a compiler that is not available in Spack.
However, this did not work correctly for dependency packages (it
would only build a compiler for the root of an install DAG). This
commit enables the building of compilers for dependency packages.
@tgamblin tgamblin deleted the features/install-compilers-as-needed branch April 18, 2019 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Spack Stacks
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants