Skip to content

clean up how spack builds clingo#20159

Closed
cosmicexplorer wants to merge 11 commits intospack:developfrom
cosmicexplorer:vendor-clingo
Closed

clean up how spack builds clingo#20159
cosmicexplorer wants to merge 11 commits intospack:developfrom
cosmicexplorer:vendor-clingo

Conversation

@cosmicexplorer
Copy link
Copy Markdown
Contributor

@cosmicexplorer cosmicexplorer commented Nov 29, 2020

Problem

Fixes #20123, subsumes #20218.

Note: this PR does not attempt to address the problem of actually making spack build clingo on demand in such environments. We will rely on #20207 for that.

Solution

Result

  1. A bootstrap mechanism is created for clingo to bootstrap itself in python 2.6-only environments.
  2. Spack is able to avoid sneakily modifying the user's running python version (so no python code breaks because spack installed its own interpreter).
  3. This is tested in CI!

@cosmicexplorer cosmicexplorer added concretization discussion bootstrap Anything that has to do with Spack building its own dependencies. labels Nov 29, 2020
@cosmicexplorer cosmicexplorer force-pushed the vendor-clingo branch 3 times, most recently from 098210c to 2e8569b Compare November 29, 2020 13:17
@cosmicexplorer
Copy link
Copy Markdown
Contributor Author

#20139 has a better answer to ensuring the correct version of python is used. I believe that after #20139 is merged, that we can remove the -DCMAKE_CXX_FLAGS override in this PR.

@cosmicexplorer cosmicexplorer force-pushed the vendor-clingo branch 4 times, most recently from b27af7c to 614980a Compare November 30, 2020 06:32
@cosmicexplorer cosmicexplorer changed the title bootstrap clingo with the old concretizer in setup-env.sh add patches to bootstrap clingo with python 2.6 and c++11 Dec 2, 2020
@cosmicexplorer cosmicexplorer force-pushed the vendor-clingo branch 2 times, most recently from 2261ca2 to f12f30a Compare December 5, 2020 07:32
@cosmicexplorer cosmicexplorer changed the title add patches to bootstrap clingo with python 2.6 and c++11 add patches to bootstrap clingo in spack/centos6 Dec 5, 2020
@cosmicexplorer cosmicexplorer marked this pull request as ready for review December 5, 2020 10:06
create a reasonable variant of python to build from scratch

add todo
revert unnecessary changes

Fix building on osx
update clingo package.py

fix python args in clingo package.py

bootstrap clingo in setup-env.sh

avoid setting concretizer: clingo in defaults

fix long lines

merge in spack#20139

give the interpreter selection a piece of my mind

revert setup-env.sh changes

remove extraneous cmake args

make clingo build on spack/centos6 via bootstrapping python and gcc
@cosmicexplorer
Copy link
Copy Markdown
Contributor Author

Currently failing the centos6 shard with the following:

2020-12-29T02:42:57.3473475Z + spack install --verbose --fail-fast -y -n clingo@spack+python%[email protected]
2020-12-29T02:42:58.3481844Z ==> Error: No compilers with spec [email protected] found for operating system centos6 and target haswell.
2020-12-29T02:42:58.3484053Z Run 'spack compiler find' to add compilers or 'spack compilers' to see which compilers are already recognized by spack.
2020-12-29T02:42:58.5984345Z ##[error]Process completed with exit code 1.

This is from the line:

spack install "${CLI_INSTALL_ARGS[@]}" 'clingo@spack+python%[email protected]'

I assumed that this line above would avoid the issue:

It may be that I'm loading the installed python 2.7 after loading gcc, but "no compilers with spec [email protected]" is a pretty specific error message.

@cosmicexplorer cosmicexplorer changed the title add patches to bootstrap clingo in spack/centos6 clean up how spack builds clingo Dec 31, 2020
@cosmicexplorer cosmicexplorer marked this pull request as draft December 31, 2020 04:39
@tgamblin
Copy link
Copy Markdown
Member

Superseded by #22720.

@tgamblin tgamblin closed this Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bootstrap Anything that has to do with Spack building its own dependencies. concretization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vendor libstdc++ and clingo for bootstrapping from source in arcane environments

2 participants