I modified some files in /usr/lib/go/src/runtime/cgo to debug some issues I'm having to get zig cc working with Go, however I now have:
[~/cc]% CC="zig cc" ./go build -v
runtime/cgo
# runtime/cgo
unable to check cache when compiling C object: access denied
The error message doesn't have a lot of detail, but I created and set permissions on /usr/lib/go/src/runtime/cgo/zig-cache and that fixed it.
I tried adding --cache off, but I can't get that to work:
[~/cc]% zig cc --cache off z.c
Unknown Clang option: '--cache'
[~/cc]% zig --cache off cc z.c
Unrecognized command: cc
I think it would be helpful if the error message could at least include the path it's trying to read/write (took me some time to figure that out), but a warning that the cache can't be written and continuing might be better.
This is with zig 0.6.0 on Linux.
I modified some files in
/usr/lib/go/src/runtime/cgoto debug some issues I'm having to getzig ccworking with Go, however I now have:The error message doesn't have a lot of detail, but I created and set permissions on
/usr/lib/go/src/runtime/cgo/zig-cacheand that fixed it.I tried adding
--cache off, but I can't get that to work:I think it would be helpful if the error message could at least include the path it's trying to read/write (took me some time to figure that out), but a warning that the cache can't be written and continuing might be better.
This is with zig 0.6.0 on Linux.