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
net: macOS link of Go c-archive now requires -lresolv in 1.20 #58159
Comments
Can you outline the overall build here? For example, is this using |
CC @neild |
Yeah, this is using |
When linking a Go program, If adding |
Thanks! Adding Edit: yup, that did it. |
After compile for ios using macos throwing this error too Any idea where to add the
|
@xDragonZ, I would suggest filing a separate issue for the (The |
same issue for me
resut:
i need help ! |
Try |
no luck,it give me |
btw,add |
Oh, |
|
What was the exact error message? |
When I run the given command It gives me error
I am on a M1 Mac so I tried changing GOARCH to arm64, but that gives me this error |
It's |
I just copied and pasted what was there |
What you cut and pasted shows you using |
Yeah I got it. Relax. Not sure why lserve worked for c-archive, but removing e is working for c-shared. But now only getting the one binary, I called it keyring.so, but no h header file. |
Change https://go.dev/cl/470917 mentions this issue: |
Yes thank you. But I'm doing a c-shared, not c-archive. It did build but I see no h header file. If I understand correctly I need a .cc file that imports the C header and exposes the stuff to Nodejs. Is this something new in 1.20.1 where a h header is not needed or something? |
Nothing should have changed in 1.20 as far as generating a header file for c-shared goes. That sounds like a different problem that should be discussed in a different issue. Thanks. |
Change https://go.dev/cl/470856 mentions this issue: |
For #58159 Change-Id: Iff8e017c568be111c494992cb6fe62d469e0f981 Reviewed-on: https://go-review.googlesource.com/c/go/+/470917 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
For golang/go#58159 Change-Id: I4099bba337acdb82e61cddcf099aa4c1c464d387 Reviewed-on: https://go-review.googlesource.com/c/website/+/470856 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com>
This is now documented. |
Go 1.20rc3.
I tried to convert our application (@tailscale) over to Go 1.20 but hit macOS compilation errors in Xcode for our target (a network extension) that links in Go code:
I assume this is fallout from https://tip.golang.org/doc/go1.20#cgo ...
Unfortunately I don't have a small easy repro. (Nothing is small or easy with Xcode)
/cc @rsc @ianlancetaylor
The text was updated successfully, but these errors were encountered: