Skip to content
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

nix-shell fails to build on aarch64-darwin/macOS #3048

Closed
1 task done
crvdgc opened this issue Dec 11, 2023 · 1 comment
Closed
1 task done

nix-shell fails to build on aarch64-darwin/macOS #3048

crvdgc opened this issue Dec 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@crvdgc
Copy link
Contributor

crvdgc commented Dec 11, 2023

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • Check that your issue is not already filed.
    • Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.

Description

nix-shell fails to build on aarch64-darwin/macOS.

Context

Following the build setup instruction, when trying to use nix-shell to setup the build environment, the command fails.

I reported the issue in this Zulip thread. The thread is about the need to compile Lean 4 in the Lean 4 repository because elan now (correctly) no longer falls back to a default Lean version when it cannot find the artifact.

Steps to Reproduce

On aarch64-darwin/macOS, run nix-shell in the root directory.

(Alternatively, build the problematic input withnix build .#packages.aarch64-darwin.lean-all.)

Expected behavior: build succeeds

Actual behavior: build fails with the following log:

[...]
 7/42 Test #11: test.fileclone ...................***Failed    1.14 sec
/tmp/nix-build-ccache-4.8.1.drv-2/source/test/suites/base.bash: line 556: syntax error near unexpected token `&&'
/tmp/nix-build-ccache-4.8.1.drv-2/source/test/suites/base.bash: line 556: `       && $COMPILER -E test1.c -gz >preprocessed.i 2>/dev/null \'
Compiler:         clang (/nix/store/l5dr4rvjmiybf3la6mk6gzhszrb9py3v-Toolchains/XcodeDefault.xctoolchain/bin/clang)
Compiler version: clang version 11.1.0
CUDA compiler:    not available

Running test suite fileclone.
FAILED

Test suite:     fileclone (line 32)
Test case:      Base case
Failure reason: Failed to clone
[...]
The following tests FAILED:
         11 - test.fileclone (Failed)
Errors while running CTest

Versions

Lean version: dd42a09
OS version:

$ uname -a
Darwin rubeno.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64

Additional Information

The issue is a bug in the CCache v4.8.1 test script. It has been fixed and the patch is available in CCache v4.8.2. I've tested with a local nix flake update. The updated flake lock now fetches CCache v4.8.3 which fixes this issue and can successfully build Lean 4. I'm planning to submit a PR for that.

Please review if it breaks other usages that depend on the locked flake versions in that PR.

@crvdgc crvdgc added the bug Something isn't working label Dec 11, 2023
crvdgc added a commit to crvdgc/lean4 that referenced this issue Dec 11, 2023
In order to fix nix-shell failure due to CCache 4.8.1 test script.
Closes leanprover#3048.
crvdgc added a commit to crvdgc/lean4 that referenced this issue Dec 12, 2023
In order to fix nix-shell failure due to CCache 4.8.1 test script.
Closes leanprover#3048.
@Kha
Copy link
Member

Kha commented Aug 1, 2024

The Nix build has been officially deprecated #4895

@Kha Kha closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants