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
vendor libstdc++ and clingo for bootstrapping from source in arcane environments #20123
Comments
Going to make a PR of this today/tomorrow! |
I think the gnu autotools are going to be a great place to learn from. The automake/INSTALL file is a very good description of how things can go wrong when building your project: https://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;f=INSTALL;hb=HEAD. The more subtle distinction between I would also really like to be able to serialize a "fully resolved" spack environment (i.e. right after a successful concretization) into some format (JSON) and then be able to isolate spack's "how to build all the packages" logic into a subset of the codebase which doesn't touch clingo. That leads to one quick success criteria for this phase of the concretizer investigation being "can we remove the old concretizer?" (without breaking anyone) as @alalazo has described. I also think that this particular kind of separation (along process boundaries) is more likely to be a good atomic unit than python threads for parallelism. |
Commenting to get notifications |
Current progress:
|
#20159 has been very close for weeks....going to try to put that to bed today. |
Adventures from #20159 include: # TODO(#20123): there are multiple alternatives to this script:
# - TODO(#20430): package spack as a PEX file to avoid mixing up spack-installed packages
# and others!
# - TODO(#20260): sandbox all builds with fakechroot to avoid this double bootstrapping!
# - Add your own! #20207 makes python configuration a lot smarter, and yet still fails CentOS 6. Referencing #20430, #20260, and #20207 here. @tgamblin, @becker33: I am 100% aware that neither pex nor sandboxing are important goals for us right now. Regardless, I currently have two solutions for the clingo bootstrap problem, which I'm pretty sure isn't going to go away. I could figure out another one, but I think I might also just want to refresh my memory with @becker33 which PRs he may be waiting on from me (or none). |
Like one alternative is to start patching CMake python support, and that got very difficult very fast. |
One alternative to #20068 (possibly complementary?) is to attempt to hack away at the build system for clingo (CMake) so that it will avoid introducing a requirement on a C++14 compiler and we can reliably bootstrap it from source in arcane environments.
Rationale
Removing the futuristic and unnecessary C++14 requirement doesn't break anything (yet)! It currently doesn't require more than a small patch:
cosmicexplorer/clingo@a1db68e
Description
I found the above clingo commit built and was successfully importable with python 2.6.7, and editing the CMakeLists.txt as in the HEAD commit avoids producing any command lines requiring a C++14 compiler!
So only two changes are necessary to keep this clingo patchset up to date and buildable on e.g. RHEL/CentOS 7 as per #20069! If we hooked that up into spack, it would likely be a lot more stable / a lot less tech debt than a fork (which I was previously worried about for some version).
Additional information
I think #20068 seems 100% orthogonal to this approach -- rather, developing a reliable (reproducible?) method of bootstrapping from sources seems like the key to both of these issues. If we can trust our robust script, we can easily re-ship updated binaries for multiple architectures as in #20068, while ensuring via CI that our bootstrap script avoids correctness (or performance?) regressions as we try to self-bootstrap.
I think from any self-bootstrapping process for a tool like spack that runs itself from source, I as a user might (eventually) have these requirements:
General information
It looks like spack already exposes the entry point for cron jobs/etc to clean up space with
spack gc
, and if we can make the bootstrap "look like a normal spack install", we may be able to get control of that like this for free.Relatedly, here's a really interesting discussion thread from the pants repo on invalidating external binaries: pantsbuild/pants#10768 (comment)
The text was updated successfully, but these errors were encountered: