Skip to content

Add a mechanism for Spack to bootstrap clingo#20068

Closed
alalazo wants to merge 2 commits intodevelopfrom
feature/bootstrap_clingo
Closed

Add a mechanism for Spack to bootstrap clingo#20068
alalazo wants to merge 2 commits intodevelopfrom
feature/bootstrap_clingo

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Nov 24, 2020

This PR adds the ability to bootstrap clingo for any interpreter that is used to run Spack:

[mculpo02@login02 spack]$ spack solve zlib
==> Do you want Spack to bootstrap clingo? [The process will take several minutes] [Y/n] 
==> Warning: Missing a source id for [email protected]
==> Installing libiconv-1.16-zczi37byglq3f5vweadydldeqadhr52u
==> Warning: Spack will not check SSL certificates. You need to update your Python to enable certificate verification.
==> No binary for libiconv-1.16-zczi37byglq3f5vweadydldeqadhr52u found: installing from source
==> Using cached archive: /m100/home/userexternal/mculpo02/github/spack/var/spack/cache/_source-cache/archive/e6/e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04.tar.gz
==> libiconv: Executing phase: 'autoreconf'
==> libiconv: Executing phase: 'configure'
[ ... ]

At the moment the process is interactive, to avoid starting a ~15 mins. build without the user being aware of it, but ideally it should be automated (if made fast enough) or be interactive only for command line use of Spack. A Spack environment is used to bootstrap the software and install it at a fixed location.

Improvements that can be made on top of this:

  • Look for dependencies that are already in the system (e.g. cmake) and use them as "externals"
  • Remove interactive confirmation from user, at least for non cli use of Spack
  • Check prerequisites for building clingo (e.g. compiler with support for C++14)

Submitting as draft to get some early feedback.

@becker33 @tgamblin @cosmicexplorer

@healther
Copy link
Copy Markdown
Contributor

I'd prefer to have this version available. I'm currently trying to merge us to the current upstream state. In particular we also hope to get the new concretizer to work (with fewer constrain hints) and setting up clingo right now requires a number of manual steps

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Nov 26, 2020

@healther This PR will be superseded by another approach which boils down to have binaries available for clingo in mirrors and have logic in Spack to fetch and install them if needed. We are still figuring out a few details for that, in the meanwhile you can use:

spack:
  specs:
  - clingo@spack+python
  config:
    concretizer: original
    install_tree:
      root: store
  view: view

in some directory of your choice to setup a proper clingo. Then add view/bin to your PATH.

@cosmicexplorer
Copy link
Copy Markdown
Contributor

@alalazo I wrote up what I think might be described as the other half of this (having a reliable bootstrap script for non-desktop+new architectures, as well as for regenerating binaries for the "laptop" architectures) in #20123

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Dec 2, 2020

Superseded by #20207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants