You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugObserved behavior contradicts documented or intended behaviorregressionIt worked in a previous version of Zig, but stopped working.zig ccZig as a drop-in C compiler feature
Can you provide the version of go used, and the GOOS=darwin GOARCH=amd64 CC='zig cc -target x86_64-macos' CGO_ENABLED=1 go build -buildmode c-archive -x output?
Did you solve this, @ostcar? Also hitting this issue with Zig v0.14.0-dev.1713+f99097e68 when cross-compiling CGO for Darwin on Linux. Currently fails for both x86_64 and aarch64 with an AccessDenied error.
uname -a
# => Linux $USER 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
zig version
# => 0.14.0-dev.1713+f99097e68
go version
# => go version go1.23.2 linux/amd64
I'm interested in placing a donor bounty on this issue on behalf of my company. I reached out to the Zig team via their recommended donor bounties channel last year but haven't heard anything.
Let me know if there's a possibility here to tackle this.
bugObserved behavior contradicts documented or intended behaviorregressionIt worked in a previous version of Zig, but stopped working.zig ccZig as a drop-in C compiler feature
Activity
zhylmzr commentedon Jul 22, 2024
Can you provide the version of go used, and the
GOOS=darwin GOARCH=amd64 CC='zig cc -target x86_64-macos' CGO_ENABLED=1 go build -buildmode c-archive -xoutput?ostcar commentedon Jul 22, 2024
Here is the output with zig 0.11.0 and the current master.
I am using go 1.22.4:
update to use zig for cross-build
update to use zig for cross-build
update to use zig for cross-build
update to use zig for cross-build
update to use zig for cross-build
ezekg commentedon Oct 4, 2024
Did you solve this, @ostcar? Also hitting this issue with Zig v0.14.0-dev.1713+f99097e68 when cross-compiling CGO for Darwin on Linux. Currently fails for both x86_64 and aarch64 with an
AccessDeniederror.Source: https://github.com/keygen-sh/keygen-relay
When attempting to build for Darwin:
Which runs the following:
Running with
strace, here's the relevant end of trace:Environment info:
lmk if I can provide better info.
ostcar commentedon Oct 8, 2024
No, I could not fix this. But its good to know, that it is not only me 😊
y-bruin commentedon Oct 25, 2024
I am also facing same issue
rmerry commentedon Nov 7, 2024
Same issue for me when targeting
aarch64-macoswith zig version0.13.0. It works as expected when downgrading to zig version0.10.1.iamcalledrob commentedon Nov 18, 2024
Running into this with zig 0.13.0 on windows x86, when trying to cross-compile for
-target x86_64-macosfranciscod commentedon Jan 6, 2025
Same here, also when building the very same go package:
# github.com/mattn/go-sqlite3.ezekg commentedon Jan 21, 2025
I'm interested in placing a donor bounty on this issue on behalf of my company. I reached out to the Zig team via their recommended donor bounties channel last year but haven't heard anything.
Let me know if there's a possibility here to tackle this.
zhylmzr commentedon Jan 22, 2025
You can try whether this fix solves the problem: #20740
franciscod commentedon Apr 10, 2025
I'm 99% sure that the 0.14.0 release fixed this for me
fix(ci): upgrade zig 0.13.0 to 0.14.0 to fix AccessDenied bug
fix(ci): repair release builds (darwin CGO cross-compile) (#5)
Bump zig to 0.14.1: 0.13 cannot cross-compile CGo to macOS