-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Conversation
…e installing packages that use them
f6c60b2
to
e85d486
Compare
f82a570
to
68945c7
Compare
68945c7
to
ddb3513
Compare
There was a problem hiding this 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.
@scheibelp addressed all comments. |
Related PR #7868 |
Is there any way to decide which spec will be used to build a compiler, or will it always be the default one? |
@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. |
Thanks, that's the bit I was missing - I guess I am just not used to customize |
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.
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 theconfig.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.