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

FileNotFound when compiling macos #9431

Closed
motiejus opened this issue Jul 21, 2021 · 4 comments
Closed

FileNotFound when compiling macos #9431

motiejus opened this issue Jul 21, 2021 · 4 comments
Labels
bug Observed behavior contradicts documented or intended behavior frontend Tokenization, parsing, AstGen, Sema, and Liveness. os-macos zig cc Zig as a drop-in C compiler feature
Milestone

Comments

@motiejus
Copy link
Contributor

motiejus commented Jul 21, 2021

I get a FileNotFound error when compiling a Go project using Bazel on MacOS. Specifically Bazel is interesting, because it invokes zig c++ in parallel.

Full execution output when compiling this program:

package main

import (
	_ "github.com/DataDog/zstd"
	_ "github.com/mattn/go-sqlite3"
)

// #include <stdio.h>
// void helloworld() { printf("hello, world\n"); }
import "C"

func main() {
	C.helloworld()
}

Execution output:

bazel build --sandbox_debug -s //test:hello
Starting local Bazel server and connecting to it...
INFO: SHA256 (https://golang.org/dl/?mode=json&include=all) = 8af18b7139e32d78a7f541845d3c812c640ebe246c733ab93aede3354c238119
INFO: Analyzed target //test:hello (39 packages loaded, 7483 targets configured).
INFO: Found 1 target...
SUBCOMMAND: # @go_sdk//:builder [action 'GoToolchainBinaryCompile external/go_sdk/builder.a [for host]', configuration: f632a08542bec48981f430d4b86ba7b603995af352a33bedf0a6bc50ec735a31, execution platform: @local_config_platform//:host]
(cd /private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/execroot/bazel-zig-cc && \
  exec env - \
    GOROOT=external/go_sdk \
  /bin/bash -c 'external/go_sdk/bin/go tool compile -o bazel-out/host/bin/external/go_sdk/builder.a -trimpath=$PWD external/io_bazel_rules_go/go/tools/builders/ar.go external/io_bazel_rules_go/go/tools/builders/asm.go external/io_bazel_rules_go/go/tools/builders/builder.go external/io_bazel_rules_go/go/tools/builders/cgo2.go external/io_bazel_rules_go/go/tools/builders/compile.go external/io_bazel_rules_go/go/tools/builders/compilepkg.go external/io_bazel_rules_go/go/tools/builders/cover.go external/io_bazel_rules_go/go/tools/builders/embedcfg.go external/io_bazel_rules_go/go/tools/builders/env.go external/io_bazel_rules_go/go/tools/builders/filter.go external/io_bazel_rules_go/go/tools/builders/filter_buildid.go external/io_bazel_rules_go/go/tools/builders/flags.go external/io_bazel_rules_go/go/tools/builders/generate_nogo_main.go external/io_bazel_rules_go/go/tools/builders/generate_test_main.go external/io_bazel_rules_go/go/tools/builders/imports.go external/io_bazel_rules_go/go/tools/builders/importcfg.go external/io_bazel_rules_go/go/tools/builders/link.go external/io_bazel_rules_go/go/tools/builders/pack.go external/io_bazel_rules_go/go/tools/builders/read.go external/io_bazel_rules_go/go/tools/builders/replicate.go external/io_bazel_rules_go/go/tools/builders/stdlib.go external/io_bazel_rules_go/go/tools/builders/path.go')
SUBCOMMAND: # @go_sdk//:builder [action 'GoToolchainBinary external/go_sdk/builder [for host]', configuration: f632a08542bec48981f430d4b86ba7b603995af352a33bedf0a6bc50ec735a31, execution platform: @local_config_platform//:host]
(cd /private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/execroot/bazel-zig-cc && \
  exec env - \
  external/go_sdk/bin/go tool link -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a)
SUBCOMMAND: # @com_github_mattn_go_sqlite3//:go-sqlite3 [action 'GoCompilePkg external/com_github_mattn_go_sqlite3/go-sqlite3.a', configuration: a22b3a3487d747544b5b96b455e287b86f7cc50c1c35cbb06a25a36d708633e5, execution platform: @local_config_platform//:host]
(cd /private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/execroot/bazel-zig-cc && \
  exec env - \
    CC=/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/tools/c++ \
    CGO_ENABLED=1 \
    GOARCH=amd64 \
    GOOS=darwin \
    GOPATH='' \
    GOROOT=external/go_sdk \
    GOROOT_FINAL=GOROOT \
    PATH=/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/tools:/bin:/usr/bin \
  bazel-out/host/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix darwin_amd64 -src external/com_github_mattn_go_sqlite3/backup.go -src external/com_github_mattn_go_sqlite3/callback.go -src external/com_github_mattn_go_sqlite3/convert.go -src external/com_github_mattn_go_sqlite3/doc.go -src external/com_github_mattn_go_sqlite3/error.go -src external/com_github_mattn_go_sqlite3/sqlite3.go -src external/com_github_mattn_go_sqlite3/sqlite3_context.go -src external/com_github_mattn_go_sqlite3/sqlite3_func_crypt.go -src external/com_github_mattn_go_sqlite3/sqlite3_go18.go -src external/com_github_mattn_go_sqlite3/sqlite3_load_extension.go -src external/com_github_mattn_go_sqlite3/sqlite3_opt_preupdate.go -src external/com_github_mattn_go_sqlite3/sqlite3_opt_preupdate_omit.go -src external/com_github_mattn_go_sqlite3/sqlite3_opt_userauth_omit.go -src external/com_github_mattn_go_sqlite3/sqlite3_other.go -src external/com_github_mattn_go_sqlite3/sqlite3_solaris.go -src external/com_github_mattn_go_sqlite3/sqlite3_type.go -src external/com_github_mattn_go_sqlite3/sqlite3_usleep_windows.go -src external/com_github_mattn_go_sqlite3/sqlite3_windows.go -src external/com_github_mattn_go_sqlite3/static_mock.go -src external/com_github_mattn_go_sqlite3/sqlite3-binding.c -src external/com_github_mattn_go_sqlite3/sqlite3_opt_unlock_notify.c -src external/com_github_mattn_go_sqlite3/sqlite3-binding.h -src external/com_github_mattn_go_sqlite3/sqlite3ext.h -importpath github.com/mattn/go-sqlite3 -p github.com/mattn/go-sqlite3 -package_list bazel-out/host/bin/external/go_sdk/packages.txt -o bazel-out/darwin-fastbuild-ST-d17813c235ce/bin/external/com_github_mattn_go_sqlite3/go-sqlite3.a -x bazel-out/darwin-fastbuild-ST-d17813c235ce/bin/external/com_github_mattn_go_sqlite3/go-sqlite3.x -gcflags '' -asmflags '' -cppflags '-I external/com_github_mattn_go_sqlite3 -iquote .' -cflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -DHAVE_USLEEP=1 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT -DSQLITE_OMIT_DEPRECATED -DSQLITE_THREADSAFE=1 -DSQLITE_TRACE_SIZE_LIMIT=15 -Wno-deprecated-declarations -std=gnu99 -I. -fPIC' -cxxflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -objcflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -DHAVE_USLEEP=1 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT -DSQLITE_OMIT_DEPRECATED -DSQLITE_THREADSAFE=1 -DSQLITE_TRACE_SIZE_LIMIT=15 -Wno-deprecated-declarations -std=gnu99 -I. -fPIC' -objcxxflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -ldflags '-target x86_64-macos-gnu')
SUBCOMMAND: # @com_github_datadog_zstd//:zstd [action 'GoCompilePkg external/com_github_datadog_zstd/zstd.a', configuration: a22b3a3487d747544b5b96b455e287b86f7cc50c1c35cbb06a25a36d708633e5, execution platform: @local_config_platform//:host]
(cd /private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/execroot/bazel-zig-cc && \
  exec env - \
    CC=/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/tools/c++ \
    CGO_ENABLED=1 \
    GOARCH=amd64 \
    GOOS=darwin \
    GOPATH='' \
    GOROOT=external/go_sdk \
    GOROOT_FINAL=GOROOT \
    PATH=/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/tools:/bin:/usr/bin \
  bazel-out/host/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix darwin_amd64 -src external/com_github_datadog_zstd/errors.go -src external/com_github_datadog_zstd/zstd.go -src external/com_github_datadog_zstd/zstd_ctx.go -src external/com_github_datadog_zstd/zstd_stream.go -src external/com_github_datadog_zstd/cover.c -src external/com_github_datadog_zstd/debug.c -src external/com_github_datadog_zstd/divsufsort.c -src external/com_github_datadog_zstd/entropy_common.c -src external/com_github_datadog_zstd/error_private.c -src external/com_github_datadog_zstd/fastcover.c -src external/com_github_datadog_zstd/fse_compress.c -src external/com_github_datadog_zstd/fse_decompress.c -src external/com_github_datadog_zstd/hist.c -src external/com_github_datadog_zstd/huf_compress.c -src external/com_github_datadog_zstd/huf_decompress.c -src external/com_github_datadog_zstd/pool.c -src external/com_github_datadog_zstd/threading.c -src external/com_github_datadog_zstd/xxhash.c -src external/com_github_datadog_zstd/zbuff_common.c -src external/com_github_datadog_zstd/zbuff_compress.c -src external/com_github_datadog_zstd/zbuff_decompress.c -src external/com_github_datadog_zstd/zdict.c -src external/com_github_datadog_zstd/zstd_common.c -src external/com_github_datadog_zstd/zstd_compress.c -src external/com_github_datadog_zstd/zstd_compress_literals.c -src external/com_github_datadog_zstd/zstd_compress_sequences.c -src external/com_github_datadog_zstd/zstd_compress_superblock.c -src external/com_github_datadog_zstd/zstd_ddict.c -src external/com_github_datadog_zstd/zstd_decompress.c -src external/com_github_datadog_zstd/zstd_decompress_block.c -src external/com_github_datadog_zstd/zstd_double_fast.c -src external/com_github_datadog_zstd/zstd_fast.c -src external/com_github_datadog_zstd/zstd_lazy.c -src external/com_github_datadog_zstd/zstd_ldm.c -src external/com_github_datadog_zstd/zstd_opt.c -src external/com_github_datadog_zstd/zstd_v01.c -src external/com_github_datadog_zstd/zstd_v02.c -src external/com_github_datadog_zstd/zstd_v03.c -src external/com_github_datadog_zstd/zstd_v04.c -src external/com_github_datadog_zstd/zstd_v05.c -src external/com_github_datadog_zstd/zstd_v06.c -src external/com_github_datadog_zstd/zstd_v07.c -src external/com_github_datadog_zstd/zstdmt_compress.c -src external/com_github_datadog_zstd/bitstream.h -src external/com_github_datadog_zstd/compiler.h -src external/com_github_datadog_zstd/cover.h -src external/com_github_datadog_zstd/cpu.h -src external/com_github_datadog_zstd/debug.h -src external/com_github_datadog_zstd/divsufsort.h -src external/com_github_datadog_zstd/error_private.h -src external/com_github_datadog_zstd/fse.h -src external/com_github_datadog_zstd/hist.h -src external/com_github_datadog_zstd/huf.h -src external/com_github_datadog_zstd/mem.h -src external/com_github_datadog_zstd/pool.h -src external/com_github_datadog_zstd/threading.h -src external/com_github_datadog_zstd/xxhash.h -src external/com_github_datadog_zstd/zbuff.h -src external/com_github_datadog_zstd/zdict.h -src external/com_github_datadog_zstd/zstd.h -src external/com_github_datadog_zstd/zstd_compress_internal.h -src external/com_github_datadog_zstd/zstd_compress_literals.h -src external/com_github_datadog_zstd/zstd_compress_sequences.h -src external/com_github_datadog_zstd/zstd_compress_superblock.h -src external/com_github_datadog_zstd/zstd_cwksp.h -src external/com_github_datadog_zstd/zstd_ddict.h -src external/com_github_datadog_zstd/zstd_decompress_block.h -src external/com_github_datadog_zstd/zstd_decompress_internal.h -src external/com_github_datadog_zstd/zstd_deps.h -src external/com_github_datadog_zstd/zstd_double_fast.h -src external/com_github_datadog_zstd/zstd_errors.h -src external/com_github_datadog_zstd/zstd_fast.h -src external/com_github_datadog_zstd/zstd_internal.h -src external/com_github_datadog_zstd/zstd_lazy.h -src external/com_github_datadog_zstd/zstd_ldm.h -src external/com_github_datadog_zstd/zstd_legacy.h -src external/com_github_datadog_zstd/zstd_opt.h -src external/com_github_datadog_zstd/zstd_v01.h -src external/com_github_datadog_zstd/zstd_v02.h -src external/com_github_datadog_zstd/zstd_v03.h -src external/com_github_datadog_zstd/zstd_v04.h -src external/com_github_datadog_zstd/zstd_v05.h -src external/com_github_datadog_zstd/zstd_v06.h -src external/com_github_datadog_zstd/zstd_v07.h -src external/com_github_datadog_zstd/zstdmt_compress.h -importpath github.com/DataDog/zstd -p github.com/DataDog/zstd -package_list bazel-out/host/bin/external/go_sdk/packages.txt -o bazel-out/darwin-fastbuild-ST-d17813c235ce/bin/external/com_github_datadog_zstd/zstd.a -x bazel-out/darwin-fastbuild-ST-d17813c235ce/bin/external/com_github_datadog_zstd/zstd.x -gcflags '' -asmflags '' -cppflags '-I external/com_github_datadog_zstd -iquote .' -cflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -cxxflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -objcflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -objcxxflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -ldflags '-target x86_64-macos-gnu')
ERROR: /private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/com_github_datadog_zstd/BUILD.bazel:3:11: GoCompilePkg external/com_github_datadog_zstd/zstd.a failed (Exit 1): sandbox-exec failed: error executing command
  (cd /private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/sandbox/darwin-sandbox/4/execroot/bazel-zig-cc && \
  exec env - \
    CC=/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/tools/c++ \
    CGO_ENABLED=1 \
    GOARCH=amd64 \
    GOOS=darwin \
    GOPATH='' \
    GOROOT=external/go_sdk \
    GOROOT_FINAL=GOROOT \
    PATH=/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/tools:/bin:/usr/bin \
    TMPDIR=/var/folders/qw/2y3fgpnn5nq55m60q9g7h0br0000gn/T/ \
  /usr/bin/sandbox-exec -f /private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/sandbox/darwin-sandbox/4/sandbox.sb /var/tmp/_bazel_motiejus/install/3ac6e4bc67346f686d73708a27e81d33/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/host/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix darwin_amd64 -src external/com_github_datadog_zstd/errors.go -src external/com_github_datadog_zstd/zstd.go -src external/com_github_datadog_zstd/zstd_ctx.go -src external/com_github_datadog_zstd/zstd_stream.go -src external/com_github_datadog_zstd/cover.c -src external/com_github_datadog_zstd/debug.c -src external/com_github_datadog_zstd/divsufsort.c -src external/com_github_datadog_zstd/entropy_common.c -src external/com_github_datadog_zstd/error_private.c -src external/com_github_datadog_zstd/fastcover.c -src external/com_github_datadog_zstd/fse_compress.c -src external/com_github_datadog_zstd/fse_decompress.c -src external/com_github_datadog_zstd/hist.c -src external/com_github_datadog_zstd/huf_compress.c -src external/com_github_datadog_zstd/huf_decompress.c -src external/com_github_datadog_zstd/pool.c -src external/com_github_datadog_zstd/threading.c -src external/com_github_datadog_zstd/xxhash.c -src external/com_github_datadog_zstd/zbuff_common.c -src external/com_github_datadog_zstd/zbuff_compress.c -src external/com_github_datadog_zstd/zbuff_decompress.c -src external/com_github_datadog_zstd/zdict.c -src external/com_github_datadog_zstd/zstd_common.c -src external/com_github_datadog_zstd/zstd_compress.c -src external/com_github_datadog_zstd/zstd_compress_literals.c -src external/com_github_datadog_zstd/zstd_compress_sequences.c -src external/com_github_datadog_zstd/zstd_compress_superblock.c -src external/com_github_datadog_zstd/zstd_ddict.c -src external/com_github_datadog_zstd/zstd_decompress.c -src external/com_github_datadog_zstd/zstd_decompress_block.c -src external/com_github_datadog_zstd/zstd_double_fast.c -src external/com_github_datadog_zstd/zstd_fast.c -src external/com_github_datadog_zstd/zstd_lazy.c -src external/com_github_datadog_zstd/zstd_ldm.c -src external/com_github_datadog_zstd/zstd_opt.c -src external/com_github_datadog_zstd/zstd_v01.c -src external/com_github_datadog_zstd/zstd_v02.c -src external/com_github_datadog_zstd/zstd_v03.c -src external/com_github_datadog_zstd/zstd_v04.c -src external/com_github_datadog_zstd/zstd_v05.c -src external/com_github_datadog_zstd/zstd_v06.c -src external/com_github_datadog_zstd/zstd_v07.c -src external/com_github_datadog_zstd/zstdmt_compress.c -src external/com_github_datadog_zstd/bitstream.h -src external/com_github_datadog_zstd/compiler.h -src external/com_github_datadog_zstd/cover.h -src external/com_github_datadog_zstd/cpu.h -src external/com_github_datadog_zstd/debug.h -src external/com_github_datadog_zstd/divsufsort.h -src external/com_github_datadog_zstd/error_private.h -src external/com_github_datadog_zstd/fse.h -src external/com_github_datadog_zstd/hist.h -src external/com_github_datadog_zstd/huf.h -src external/com_github_datadog_zstd/mem.h -src external/com_github_datadog_zstd/pool.h -src external/com_github_datadog_zstd/threading.h -src external/com_github_datadog_zstd/xxhash.h -src external/com_github_datadog_zstd/zbuff.h -src external/com_github_datadog_zstd/zdict.h -src external/com_github_datadog_zstd/zstd.h -src external/com_github_datadog_zstd/zstd_compress_internal.h -src external/com_github_datadog_zstd/zstd_compress_literals.h -src external/com_github_datadog_zstd/zstd_compress_sequences.h -src external/com_github_datadog_zstd/zstd_compress_superblock.h -src external/com_github_datadog_zstd/zstd_cwksp.h -src external/com_github_datadog_zstd/zstd_ddict.h -src external/com_github_datadog_zstd/zstd_decompress_block.h -src external/com_github_datadog_zstd/zstd_decompress_internal.h -src external/com_github_datadog_zstd/zstd_deps.h -src external/com_github_datadog_zstd/zstd_double_fast.h -src external/com_github_datadog_zstd/zstd_errors.h -src external/com_github_datadog_zstd/zstd_fast.h -src external/com_github_datadog_zstd/zstd_internal.h -src external/com_github_datadog_zstd/zstd_lazy.h -src external/com_github_datadog_zstd/zstd_ldm.h -src external/com_github_datadog_zstd/zstd_legacy.h -src external/com_github_datadog_zstd/zstd_opt.h -src external/com_github_datadog_zstd/zstd_v01.h -src external/com_github_datadog_zstd/zstd_v02.h -src external/com_github_datadog_zstd/zstd_v03.h -src external/com_github_datadog_zstd/zstd_v04.h -src external/com_github_datadog_zstd/zstd_v05.h -src external/com_github_datadog_zstd/zstd_v06.h -src external/com_github_datadog_zstd/zstd_v07.h -src external/com_github_datadog_zstd/zstdmt_compress.h -importpath github.com/DataDog/zstd -p github.com/DataDog/zstd -package_list bazel-out/host/bin/external/go_sdk/packages.txt -o bazel-out/darwin-fastbuild-ST-d17813c235ce/bin/external/com_github_datadog_zstd/zstd.a -x bazel-out/darwin-fastbuild-ST-d17813c235ce/bin/external/com_github_datadog_zstd/zstd.x -gcflags '' -asmflags '' -cppflags '-I external/com_github_datadog_zstd -iquote .' -cflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -cxxflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -objcflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -objcxxflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -ldflags '-target x86_64-macos-gnu') sandbox-exec failed: error executing command
  (cd /private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/sandbox/darwin-sandbox/4/execroot/bazel-zig-cc && \
  exec env - \
    CC=/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/tools/c++ \
    CGO_ENABLED=1 \
    GOARCH=amd64 \
    GOOS=darwin \
    GOPATH='' \
    GOROOT=external/go_sdk \
    GOROOT_FINAL=GOROOT \
    PATH=/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/tools:/bin:/usr/bin \
    TMPDIR=/var/folders/qw/2y3fgpnn5nq55m60q9g7h0br0000gn/T/ \
  /usr/bin/sandbox-exec -f /private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/sandbox/darwin-sandbox/4/sandbox.sb /var/tmp/_bazel_motiejus/install/3ac6e4bc67346f686d73708a27e81d33/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/host/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix darwin_amd64 -src external/com_github_datadog_zstd/errors.go -src external/com_github_datadog_zstd/zstd.go -src external/com_github_datadog_zstd/zstd_ctx.go -src external/com_github_datadog_zstd/zstd_stream.go -src external/com_github_datadog_zstd/cover.c -src external/com_github_datadog_zstd/debug.c -src external/com_github_datadog_zstd/divsufsort.c -src external/com_github_datadog_zstd/entropy_common.c -src external/com_github_datadog_zstd/error_private.c -src external/com_github_datadog_zstd/fastcover.c -src external/com_github_datadog_zstd/fse_compress.c -src external/com_github_datadog_zstd/fse_decompress.c -src external/com_github_datadog_zstd/hist.c -src external/com_github_datadog_zstd/huf_compress.c -src external/com_github_datadog_zstd/huf_decompress.c -src external/com_github_datadog_zstd/pool.c -src external/com_github_datadog_zstd/threading.c -src external/com_github_datadog_zstd/xxhash.c -src external/com_github_datadog_zstd/zbuff_common.c -src external/com_github_datadog_zstd/zbuff_compress.c -src external/com_github_datadog_zstd/zbuff_decompress.c -src external/com_github_datadog_zstd/zdict.c -src external/com_github_datadog_zstd/zstd_common.c -src external/com_github_datadog_zstd/zstd_compress.c -src external/com_github_datadog_zstd/zstd_compress_literals.c -src external/com_github_datadog_zstd/zstd_compress_sequences.c -src external/com_github_datadog_zstd/zstd_compress_superblock.c -src external/com_github_datadog_zstd/zstd_ddict.c -src external/com_github_datadog_zstd/zstd_decompress.c -src external/com_github_datadog_zstd/zstd_decompress_block.c -src external/com_github_datadog_zstd/zstd_double_fast.c -src external/com_github_datadog_zstd/zstd_fast.c -src external/com_github_datadog_zstd/zstd_lazy.c -src external/com_github_datadog_zstd/zstd_ldm.c -src external/com_github_datadog_zstd/zstd_opt.c -src external/com_github_datadog_zstd/zstd_v01.c -src external/com_github_datadog_zstd/zstd_v02.c -src external/com_github_datadog_zstd/zstd_v03.c -src external/com_github_datadog_zstd/zstd_v04.c -src external/com_github_datadog_zstd/zstd_v05.c -src external/com_github_datadog_zstd/zstd_v06.c -src external/com_github_datadog_zstd/zstd_v07.c -src external/com_github_datadog_zstd/zstdmt_compress.c -src external/com_github_datadog_zstd/bitstream.h -src external/com_github_datadog_zstd/compiler.h -src external/com_github_datadog_zstd/cover.h -src external/com_github_datadog_zstd/cpu.h -src external/com_github_datadog_zstd/debug.h -src external/com_github_datadog_zstd/divsufsort.h -src external/com_github_datadog_zstd/error_private.h -src external/com_github_datadog_zstd/fse.h -src external/com_github_datadog_zstd/hist.h -src external/com_github_datadog_zstd/huf.h -src external/com_github_datadog_zstd/mem.h -src external/com_github_datadog_zstd/pool.h -src external/com_github_datadog_zstd/threading.h -src external/com_github_datadog_zstd/xxhash.h -src external/com_github_datadog_zstd/zbuff.h -src external/com_github_datadog_zstd/zdict.h -src external/com_github_datadog_zstd/zstd.h -src external/com_github_datadog_zstd/zstd_compress_internal.h -src external/com_github_datadog_zstd/zstd_compress_literals.h -src external/com_github_datadog_zstd/zstd_compress_sequences.h -src external/com_github_datadog_zstd/zstd_compress_superblock.h -src external/com_github_datadog_zstd/zstd_cwksp.h -src external/com_github_datadog_zstd/zstd_ddict.h -src external/com_github_datadog_zstd/zstd_decompress_block.h -src external/com_github_datadog_zstd/zstd_decompress_internal.h -src external/com_github_datadog_zstd/zstd_deps.h -src external/com_github_datadog_zstd/zstd_double_fast.h -src external/com_github_datadog_zstd/zstd_errors.h -src external/com_github_datadog_zstd/zstd_fast.h -src external/com_github_datadog_zstd/zstd_internal.h -src external/com_github_datadog_zstd/zstd_lazy.h -src external/com_github_datadog_zstd/zstd_ldm.h -src external/com_github_datadog_zstd/zstd_legacy.h -src external/com_github_datadog_zstd/zstd_opt.h -src external/com_github_datadog_zstd/zstd_v01.h -src external/com_github_datadog_zstd/zstd_v02.h -src external/com_github_datadog_zstd/zstd_v03.h -src external/com_github_datadog_zstd/zstd_v04.h -src external/com_github_datadog_zstd/zstd_v05.h -src external/com_github_datadog_zstd/zstd_v06.h -src external/com_github_datadog_zstd/zstd_v07.h -src external/com_github_datadog_zstd/zstdmt_compress.h -importpath github.com/DataDog/zstd -p github.com/DataDog/zstd -package_list bazel-out/host/bin/external/go_sdk/packages.txt -o bazel-out/darwin-fastbuild-ST-d17813c235ce/bin/external/com_github_datadog_zstd/zstd.a -x bazel-out/darwin-fastbuild-ST-d17813c235ce/bin/external/com_github_datadog_zstd/zstd.x -gcflags '' -asmflags '' -cppflags '-I external/com_github_datadog_zstd -iquote .' -cflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -cxxflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -objcflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -objcxxflags '-I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxx/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libcxxabi/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libunwind/include -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/any-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-any -I/private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/lib/zig/libc/include/x86_64-macos-gnu -target x86_64-macos-gnu -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fPIC' -ldflags '-target x86_64-macos-gnu')
error: unable to build compiler_rt: FileNotFound
compilepkg: error running subcommand /private/var/tmp/_bazel_motiejus/dc6297c29a1a91f553636384c8611c9b/external/zig_sdk/tools/c++: exit status 1
Target //test:hello failed to build
INFO: Elapsed time: 136.837s, Critical Path: 69.29s
INFO: 8 processes: 6 internal, 2 darwin-sandbox.
FAILED: Build did NOT complete successfully

To reproduce (on macos x86_64, requires direnv to be installed):

$ git clone git@git.sr.ht:~motiejus/bazel-zig-cc
$ cd bazel-zig-cc
$ . .envrc
$ bazel build -s --sandbox_debug //test:hello

Note that it fails only the first time; subsequent executions compile the file successfully, no matter which caches I try to prune (strange, advice appreciated).

I have the full build directory with the artifacts from this build, and can upload any requested files for further inspection.

Zig 0.9.0-dev.347+628f490c5
@Vexu Vexu added bug Observed behavior contradicts documented or intended behavior os-macos frontend Tokenization, parsing, AstGen, Sema, and Liveness. labels Aug 6, 2021
@Vexu Vexu added this to the 0.9.0 milestone Aug 6, 2021
@SpexGuy SpexGuy added the zig cc Zig as a drop-in C compiler feature label Oct 18, 2021
@uhthomas
Copy link

uhthomas commented Nov 17, 2021

Also seeing this issue on MacOS.

Unfortunately it consistently fails in my experience. The project just will not build when targeting MacOS with Zig. I assume this is because I'm building a large repository with lots of C, rather than just a single library.

Additionally, the proposed workaround in bazel-zig-cc does not work.

With flock

(12:53:27) ERROR: /private/var/tmp/_bazel_thomas/b6a3c999aae05297a54a9aa13d7a50c3/external/rules_rust/util/process_wrapper/BUILD.bazel:3:10: Linking external/rules_rust/util/process_wrapper/process_wrapper failed: (Exit 1): c++ failed: error executing command /private/var/tmp/_bazel_thomas/b6a3c999aae05297a54a9aa13d7a50c3/external/zig_sdk/tools/c++ -o bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/rules_rust/util/process_wrapper/process_wrapper ... (remaining 6 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
warning: unsupported linker arg: -S
error: FileNotFound

Without flock

(12:54:30) ERROR: /private/var/tmp/_bazel_thomas/b6a3c999aae05297a54a9aa13d7a50c3/external/rules_rust/util/process_wrapper/BUILD.bazel:3:10: Linking external/rules_rust/util/process_wrapper/process_wrapper failed: (Exit 1): c++ failed: error executing command /private/var/tmp/_bazel_thomas/b6a3c999aae05297a54a9aa13d7a50c3/external/zig_sdk/tools/c++ -o bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/rules_rust/util/process_wrapper/process_wrapper ... (remaining 6 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
WARNING: flock not found, proceeding unsafely.
If build fails, retry it.
warning: unsupported l

It might be important to note that this build works when targeting Linux with Zig (without flock!), and works with the local cc toolchain on MacOS.

@kubkon
Copy link
Member

kubkon commented Nov 28, 2021

@motiejus I'm trying to investigate it but after doing a clear clone, everything works fine on my end. That said, you don't seem to have committed .envrc file, so I might not be reproducing it right.

@uhthomas any chance you could provide a clonable repro?

@andrewrk
Copy link
Member

@kubkon I don't think this is a macos issue, I think it's a duplicate of #9836, #9439, #5292. Not 100% sure though. I think the next step is to fix those and then see if this issue still exists.

@motiejus
Copy link
Contributor Author

motiejus commented Nov 30, 2021

@motiejus I'm trying to investigate it but after doing a clear clone, everything works fine on my end. That said, you don't seem to have committed .envrc file, so I might not be reproducing it right.

Strange: https://git.sr.ht/~motiejus/bazel-zig-cc/tree/main/item/.envrc

Though I didn't add cd bazel-zig-cc to the original instructions; will do so after I publish this response.

@kubkon I don't think this is a macos issue, I think it's a duplicate of #9836, #9439, #5292. Not 100% sure though. I think the next step is to fix those and then see if this issue still exists.

This is not OSX-specific. I keep hitting into this at least once a week on Linux, but OSX has been the easiest to reproduce.

I can reliably reproduce it in our CI environment though (worked 100% of the time so far), but we run a lot of tests there on many different hosts/shards.

I am 99.9% sure this is a duplicate to #9439, thus will close now. @andrewrk thanks for pointing to the other ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior frontend Tokenization, parsing, AstGen, Sema, and Liveness. os-macos zig cc Zig as a drop-in C compiler feature
Projects
None yet
Development

No branches or pull requests

6 participants