-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorlinkingos-macosmacOSmacOS
Milestone
Description
Zig Version
0.14.0-dev.6+0ba64e9ce
Steps to Reproduce and Observed Behavior
package main
// #include <stdio.h>
// #include <stdlib.h>
//
// static void myprint(char* s) {
// printf("%s\n", s);
// }
import "C"
import "unsafe"
func main() {
cs := C.CString("Hello from stdio")
C.myprint(cs)
C.free(unsafe.Pointer(cs))
}Given this file, compile with
CC='zig cc' go build main.go
it will throw following errors on my machine:
# command-line-arguments
/Users/jiacai/.asdf/installs/golang/1.22.4/go/pkg/tool/darwin_arm64/link: running zig failed: exit status 1
error: symbol _runtime.covctrs not attached to any (sub)section
note: while parsing /var/folders/50/12rf3hkj2n10whhf8l63nnyh0000gn/T/go-link-3691128890/go.o
Expected Behavior
Build OK
$ go version
go version go1.22.4 darwin/arm64
albertocavalcante
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorlinkingos-macosmacOSmacOS