Hi Ben,
The only way I have found of enforcing cxxstd for all packages is to add a line to packages.yaml which applies variants to all packages that have the corresponding option. For example:
packages:
all:
variants: [cxxstd=17, +python, + shared]
I have been looking at environments to preserve the concretization of packages. This can be used when installing to ensure that you get the same hashes for what has been built, a release for example. The environments directory makes a copy of all package.py files used in the concretization, a spec.yaml file with all specs explicitly added to an environment, and a spec.lock file that contains the concretized hashes. You can then install a prebuilt release with
spack (-e env name, -D env directory) install
This should check mirror for prebuilt packages with the same hashes as the concretized environment.
This all depends on using a clone of the exact packages.yaml, config.yaml, repos.yaml, package.py files that were used to generate the builds used in the buildcache generation. Pretty fragile…
Patrick
--
You received this message because you are subscribed to the Google Groups "HSF Build and Packaging Tools Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
hsf-packaging-...@googlegroups.com.
To post to this group, send email to
hsf-pack...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/hsf-packaging-wg/F7525B48-50AE-494A-B3EF-99AC4E0BD6AC%40warwick.ac.uk.
For more options, visit
https://groups.google.com/d/optout.
Hi,
I made pretty much this same enquiry of the Spack groups a while ago, and the answer was that if you're going to ensure consistency from inside the recipe, the only way to do it is with a slew of:
depends_on('boost cxxstd=11' when='cxxstd=11')
depends_on('boost cxxstd=14' when='cxxstd=14')
depends_on('boost cxxstd=17' when='cxxstd=17')
for every package that requires it.
Its a pain. For the MVP we did this on the install line, essentially, instead of cluttering up all the recipes. One can also specify the value of (say) cxxstd in packages.yaml, but obviously that only works for one combination.
Sorry,
Chris.
Hi Ben,
You can also specify package level version and variant preferences in packages.yaml, for example
all:
compiler: [g...@7.3.0]
providers:
pkgconfig: [pkg-config]
blas: [netlib-lapack]
lapack: [netlib-lapack]
variants: ['cxxstd=17']
root:
version: [6.12.06]
boost:
version: [1.68.0]
python:
version: [2.7.15]
variants: ['+dbm','~optimizations','+pic','+pythoncmd','+shared','~tk', '~ucs4']
Note: you have to add global variants to package variants. Package level variants apparently overwrite global variants.
Spack does allow you to specify a config directory to use with ‘spack -c dirname’ so you could control different build standards using different config directories.
Patrick