spack / spack/spack

Bootstrapping on Apple Silicon fails if using a non-native x86_64 interpreter

Open
#33,987 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

arm bootstrap bug impact-low macOS
Dominant language
Python
Stars
5.1k
Forks
2.5k
Avg merge
3d 4h
Merged PRs (30d)
82

Description

Steps to reproduce

When I try to run Spack for the first time, it attempts to bootstrap clingo. We're supposed to have binaries available now, but these don't work:

$ spack install
==> Bootstrapping clingo from pre-built binaries
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.4/build_cache/darwin-monterey-aarch64-apple-clang-13.1.6-clingo-bootstrap-spack-ing4swsz5bj7guqffc277zitcky4uhu4.spec.json
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.4/build_cache/darwin-monterey-aarch64/apple-clang-13.1.6/clingo-bootstrap-spack/darwin-monterey-aarch64-apple-clang-13.1.6-clingo-bootstrap-spack-ing4swsz5bj7guqffc277zitcky4uhu4.spack
==> Installing "clingo-bootstrap@spack%apple-clang@13.1.6~docs~ipo+python+static_libstdcpp build_system=cmake build_type=Release arch=darwin-monterey-aarch64" from a buildcache
==> Warning: Spec clingo-bootstrap@spack%apple-clang@13.1.6~docs~ipo+python+static_libstdcpp build_system=cmake build_type=Release arch=darwin-monterey-aarch64 ^bison@3.8.2%apple-clang@13.1.6 build_system=autotools arch=darwin-monterey-aarch64 ^cmake@3.24.2%apple-clang@13.1.6~doc+ncurses+ownlibs~qt build_system=generic build_type=Release arch=darwin-monterey-aarch64 ^python@3.8%apple-clang@13.1.6+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib build_system=generic patches=0d98e93,4c24573,f2fd060 arch=darwin-monterey-aarch64 ^re2c@2.2%apple-clang@13.1.6 build_system=generic arch=darwin-monterey-aarch64 did not provide module clingo
==> Warning: Spec clingo-bootstrap@spack%apple-clang@13.1.6~docs~ipo+python+static_libstdcpp build_system=cmake build_type=Release arch=darwin-monterey-aarch64 ^bison@3.8.2%apple-clang@13.1.6 build_system=autotools arch=darwin-monterey-aarch64 ^cmake@3.24.2%apple-clang@13.1.6~doc+ncurses+ownlibs~qt build_system=generic build_type=Release arch=darwin-monterey-aarch64 ^python@3.8%apple-clang@13.1.6+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib build_system=generic patches=0d98e93,4c24573,f2fd060 arch=darwin-monterey-aarch64 ^re2c@2.2%apple-clang@13.1.6 build_system=generic arch=darwin-monterey-aarch64 did not provide module clingo
==> Warning: Spec clingo-bootstrap@spack%apple-clang@13.1.6~docs~ipo+python+static_libstdcpp build_system=cmake build_type=Release arch=darwin-monterey-aarch64 ^bison@3.8.2%apple-clang@13.1.6 build_system=autotools arch=darwin-monterey-aarch64 ^cmake@3.24.2%apple-clang@13.1.6~doc+ncurses+ownlibs~qt build_system=generic build_type=Release arch=darwin-monterey-aarch64 ^python@3.8%apple-clang@13.1.6+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib build_system=generic patches=0d98e93,4c24573,f2fd060 arch=darwin-monterey-aarch64 ^re2c@2.2%apple-clang@13.1.6 build_system=generic arch=darwin-monterey-aarch64 did not provide module clingo
==> Warning: Spec clingo-bootstrap@spack%apple-clang@13.1.6~docs~ipo+python+static_libstdcpp build_system=cmake build_type=Release arch=darwin-monterey-aarch64 ^bison@3.8.2%apple-clang@13.1.6 build_system=autotools arch=darwin-monterey-aarch64 ^cmake@3.24.2%apple-clang@13.1.6~doc+ncurses+ownlibs~qt build_system=generic build_type=Release arch=darwin-monterey-aarch64 ^python@3.8%apple-clang@13.1.6+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib build_system=generic patches=0d98e93,4c24573,f2fd060 arch=darwin-monterey-aarch64 ^re2c@2.2%apple-clang@13.1.6 build_system=generic arch=darwin-monterey-aarch64 did not provide module clingo
==> Bootstrapping clingo from pre-built binaries
==> Warning: Spec clingo-bootstrap@spack%apple-clang@13.1.6~docs~ipo+python+static_libstdcpp build_system=cmake build_type=Release arch=darwin-monterey-aarch64 ^bison@3.8.2%apple-clang@13.1.6 build_system=autotools arch=darwin-monterey-aarch64 ^cmake@3.24.2%apple-clang@13.1.6~doc+ncurses+ownlibs~qt build_system=generic build_type=Release arch=darwin-monterey-aarch64 ^python@3.8%apple-clang@13.1.6+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib build_system=generic patches=0d98e93,4c24573,f2fd060 arch=darwin-monterey-aarch64 ^re2c@2.2%apple-clang@13.1.6 build_system=generic arch=darwin-monterey-aarch64 did not provide module clingo
==> Warning: Spec clingo-bootstrap@spack%apple-clang@13.1.6~docs~ipo+python+static_libstdcpp build_system=cmake build_type=Release arch=darwin-monterey-aarch64 ^bison@3.8.2%apple-clang@13.1.6 build_system=autotools arch=darwin-monterey-aarch64 ^cmake@3.24.2%apple-clang@13.1.6~doc+ncurses+ownlibs~qt build_system=generic build_type=Release arch=darwin-monterey-aarch64 ^python@3.8%apple-clang@13.1.6+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib build_system=generic patches=0d98e93,4c24573,f2fd060 arch=darwin-monterey-aarch64 ^re2c@2.2%apple-clang@13.1.6 build_system=generic arch=darwin-monterey-aarch64 did not provide module clingo
==> Bootstrapping clingo from sources
...

Spack instead bootstraps clingo from source, which takes ~20 min.

Error message

No response

Information on your system
  • Spack: 0.20.0.dev0 (baec1b75f71d33c675fbb50451a704f6ac02c427)
  • Python: 3.8.9
  • Platform: darwin-monterey-m1
  • Concretizer: clingo
General information
  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with spack install on the reported darwin-monterey-m1 setup and inspect the bootstrap path that selects pre-built clingo binaries. Trace how the non-native x86_64 interpreter affects that selection; done when first-time bootstrapping uses a working binary path instead of unnecessarily building clingo from source.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.