spack / spack/spack

`spack ci reproduce-build` doesn't work on macOS

Open
#43,341 6 comments 1 reaction 1 assignee View on GitHub

Nobody has claimed this yet.

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

Description

Steps to reproduce

Pick any recent failing macOS pipeline and try to reproduce it locally:

> spack ci reproduce-build https://gitlab.spack.io/api/v4/projects/2/jobs/10467600/artifacts
==> Fetching artifacts from: https://gitlab.spack.io/api/v4/projects/2/jobs/10467600/artifacts

==> Job ran with the following image: ghcr.io/spack/e4s-ubuntu-18.04:v2021-10-18
checkout_commit: de1f9593c618417b4a3fdd1f7544cb09609408a8
merge_commit: 71bd5f97eac7f5231a4464cd8642547c09bdcb4e
==> Job ran with the following tags: ['macos-ventura', 'apple-clang-15', 'aarch64-macos', 'public']
==> 
To run the docker reproducer:

    - Start the docker container install       $ /Users/Adam/Downloads/test/ci_reproduction/start.sh

Although it detects that the job was run on macOS aarch64 with Apple Clang, it downloads an Ubuntu image that obviously does not have Apple Clang installed.

Error message
> bash /Users/Adam/Downloads/test/ci_reproduction/start.sh
Unable to find image 'ghcr.io/spack/e4s-ubuntu-18.04:v2021-10-18' locally
v2021-10-18: Pulling from spack/e4s-ubuntu-18.04
f46992f278c2: Pull complete 
8a04986b61ce: Pull complete 
2873c1fae810: Pull complete 
Digest: sha256:ecd5b14e4ad6c3d5fdf522fcf7b81ed412dc001d5f5b016431db75195a6dc570
Status: Downloaded newer image for ghcr.io/spack/e4s-ubuntu-18.04:v2021-10-18
...
==> Installing py-kornia-rs-0.1.1-hgmbxj2hrvuo5fj56jw7zs6jxmspor33 [1/1]
==> Error: CompilerAccessError: Compiler 'apple-clang@=15.0.0' has executables that are missing or are not executable: ['/usr/bin/clang', '/usr/bin/clang++', '/opt/homebrew/bin/gfortran-12', '/opt/homebrew/bin/gfortran-12']
Traceback (most recent call last):
  File "/Users/gitlab-runner-1/builds/sjHgqsSH/0/spack/spack/lib/spack/spack/build_environment.py", line 1113, in _setup_pkg_and_run
    pkg, dirty=kwargs.get("dirty", False), context=Context.from_string(context)
  File "/Users/gitlab-runner-1/builds/sjHgqsSH/0/spack/spack/lib/spack/spack/build_environment.py", line 753, in setup_package
    set_compiler_environment_variables(pkg, env_mods)
  File "/Users/gitlab-runner-1/builds/sjHgqsSH/0/spack/spack/lib/spack/spack/build_environment.py", line 319, in set_compiler_environment_variables
    compiler.verify_executables()
  File "/Users/gitlab-runner-1/builds/sjHgqsSH/0/spack/spack/lib/spack/spack/compiler.py", line 398, in verify_executables
    raise CompilerAccessError(self, missing)
spack.compiler.CompilerAccessError: Compiler 'apple-clang@=15.0.0' has executables that are missing or are not executable: ['/usr/bin/clang', '/usr/bin/clang++', '/opt/homebrew/bin/gfortran-12', '/opt/homebrew/bin/gfortran-12']
Information on your system
  • Spack: 0.22.0.dev0 (446c0f232528ddfde812f084d64b6cbe239c9992)
  • Python: 3.11.6
  • Platform: darwin-sonoma-m2
  • Concretizer: clingo

@scottwittenburg @kwryankrattiger @zackgalbreath @haampie

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.