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

You stumbled into a problem with Zig SDK that bazel-zig-cc was not able to fix #105

Closed
farcop opened this issue Jul 25, 2023 · 8 comments
Closed

Comments

@farcop
Copy link

farcop commented Jul 25, 2023

MacOS M1

ziglang/zig#14978

That code builds on another PCs well, bazel clean --expunge does not help.
Error message contains that "hermetic_cc_toolchain has a workaround" but what is it?

% bazel build //...
DEBUG: /private/var/tmp/_bazel_farcop/e66529431dbede3bc951f821053136ab/external/hermetic_cc_toolchain/toolchain/defs.bzl:182:18: Launcher compilation failed. Retrying build
DEBUG: /private/var/tmp/_bazel_farcop/e66529431dbede3bc951f821053136ab/external/hermetic_cc_toolchain/toolchain/defs.bzl:182:18: Launcher compilation failed. Retrying build
INFO: Repository zig_sdk instantiated at:
  /Users/farcop/Sources/kublr/WORKSPACE:326:15: in <toplevel>
  /private/var/tmp/_bazel_farcop/e66529431dbede3bc951f821053136ab/external/hermetic_cc_toolchain/toolchain/defs.bzl:80:19: in toolchains
Repository rule zig_repository defined at:
  /private/var/tmp/_bazel_farcop/e66529431dbede3bc951f821053136ab/external/hermetic_cc_toolchain/toolchain/defs.bzl:218:33: in <toplevel>
INFO: repository @zig_sdk' used the following cache hits instead of downloading the corresponding file.
 * Hash '19f9115410a6dfb004c65d63ffecf947efc595d08977906f73a90d7b2de0b3dc' for https://mirror.bazel.build/ziglang.org/builds/zig-macos-aarch64-0.11.0-dev.3312+ab37ab33c.tar.xz
If the definition of 'repository @zig_sdk' was updated, verify that the hashes were also updated.
ERROR: An error occurred during the fetch of repository 'zig_sdk':
   Traceback (most recent call last):
	File "/private/var/tmp/_bazel_farcop/e66529431dbede3bc951f821053136ab/external/hermetic_cc_toolchain/toolchain/defs.bzl", line 205, column 13, in _zig_repository_impl
		fail(zig_wrapper_err_msg)
Error in fail: 
Compilation of zig-wrapper.zig failed:
command=ZIG_LOCAL_CACHE_DIR=/tmp/zig-cache ZIG_GLOBAL_CACHE_DIR=/tmp/zig-cache ../zig build-exe -mcpu=apple_a14 -OReleaseSafe zig-wrapper.zig
return_code=1
stderr=error: FileNotFound

stdout=

You stumbled into a problem with Zig SDK that bazel-zig-cc was not able to fix.
Please file a new issue to github.com/uber/hermetic_cc_toolchain with:
- Full output of this Bazel run, including the Bazel command.
- Version of the Zig SDK if you have a non-default.
- Version of hermetic_cc_toolchain

Note: this *may* have been https://github.com/ziglang/zig/issues/14978, for
which hermetic_cc_toolchain has a workaround and you may have been "struck by
lightning" three times in a row.
ERROR: /Users/farcop/Sources/kublr/WORKSPACE:326:15: fetching zig_repository rule //external:zig_sdk: Traceback (most recent call last):
	File "/private/var/tmp/_bazel_farcop/e66529431dbede3bc951f821053136ab/external/hermetic_cc_toolchain/toolchain/defs.bzl", line 205, column 13, in _zig_repository_impl
		fail(zig_wrapper_err_msg)
Error in fail: 
Compilation of zig-wrapper.zig failed:
command=ZIG_LOCAL_CACHE_DIR=/tmp/zig-cache ZIG_GLOBAL_CACHE_DIR=/tmp/zig-cache ../zig build-exe -mcpu=apple_a14 -OReleaseSafe zig-wrapper.zig
return_code=1
stderr=error: FileNotFound

stdout=

You stumbled into a problem with Zig SDK that bazel-zig-cc was not able to fix.
Please file a new issue to github.com/uber/hermetic_cc_toolchain with:
- Full output of this Bazel run, including the Bazel command.
- Version of the Zig SDK if you have a non-default.
- Version of hermetic_cc_toolchain

Note: this *may* have been https://github.com/ziglang/zig/issues/14978, for
which hermetic_cc_toolchain has a workaround and you may have been "struck by
lightning" three times in a row.
INFO: Repository search-guard-suite-plugin-sgadmin-standalone-multiarch instantiated at:
  /Users/farcop/Sources/kublr/WORKSPACE:390:25: in <toplevel>
  /Users/farcop/Sources/kublr/nonhermetic/defs.bzl:36:17: in nonhermetic_dependencies
Repository rule http_archive defined at:
  /private/var/tmp/_bazel_farcop/e66529431dbede3bc951f821053136ab/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in <toplevel>
ERROR: Analysis of target '//cluster-management-frontend/app/kublr-common:test' failed; build aborted: 
Compilation of zig-wrapper.zig failed:
command=ZIG_LOCAL_CACHE_DIR=/tmp/zig-cache ZIG_GLOBAL_CACHE_DIR=/tmp/zig-cache ../zig build-exe -mcpu=apple_a14 -OReleaseSafe zig-wrapper.zig
return_code=1
stderr=error: FileNotFound

stdout=

You stumbled into a problem with Zig SDK that bazel-zig-cc was not able to fix.
Please file a new issue to github.com/uber/hermetic_cc_toolchain with:
- Full output of this Bazel run, including the Bazel command.
- Version of the Zig SDK if you have a non-default.
- Version of hermetic_cc_toolchain

Note: this *may* have been https://github.com/ziglang/zig/issues/14978, for
which hermetic_cc_toolchain has a workaround and you may have been "struck by
lightning" three times in a row.
INFO: Elapsed time: 25.519s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1055 packages loaded, 63374 targets configured)
@elchead
Copy link

elchead commented Aug 18, 2023

Had the same issue on M2 with 13.5. I did an upgrade to 13.5.1 and it's working again. Might have been that a reboot was enough.

@sasha-wing
Copy link

Had the same issue on my linux CI worker and a reboot solved it.

Thank you @elchead !

 Operating System: Debian GNU/Linux 11 (bullseye)
            Kernel: Linux 5.10.0-25-cloud-amd64
      Architecture: x86-64

@farcop
Copy link
Author

farcop commented Oct 2, 2023

After upgrade Macos on Sonoma 14.0 reboot does not helps...

@motiejus
Copy link
Collaborator

Which version of hermetic_cc_toolchain are you using?

@farcop
Copy link
Author

farcop commented Oct 10, 2023

@motiejus v2.0.0
I cant use v2.1.2 because of #122

@ghost
Copy link

ghost commented Oct 16, 2023

Please only report only issues with either the released version or the current master.

@ghost ghost closed this as completed Oct 16, 2023
@farcop
Copy link
Author

farcop commented Oct 17, 2023

@motiejus-wix A strange remark, considering the fact that this issue was created for the latest release at that time of creation.

@motiejus
Copy link
Collaborator

@motiejus-wix A strange remark, considering the fact that this issue was created for the latest release at that time of creation.

I see.

If this happens again with a toolchain beyond 3a0b2fe (up for the next relase), please create a new issue with more details:

  • toolchain version
  • if Zig was overwritten, which zig version.
  • archive /tmp/zig-cache and attach to the issue.

This issue was closed.
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

No branches or pull requests

4 participants