-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go/internal/work: CGO builds don't link all required libraries when pkg-config files use Requires.private #70209
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
Comments
I don't see anything showing that you are requesting, or doing, a static link. So I don't understand why you are getting this error. I think you can work around the problem by changing your file to say
but I don't understand why that should be necessary. Do you know? Thanks. |
Yes, I did that; actually I just added this to be explicit: // #cgo pkg-config: icu-i18n icu-uc
As I mentioned, the update to I was wondering whether |
Go version
go version go version go1.23.1 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
On macOS with libicu 76, I tried to compile this cgo program (source below):
Source code:
What did you see happen?
This worked fine with libicu 75:
This difference is due to the introduction of
Requires.private
instead ofRequires
inlibicu-i18n.pc
: unicode-org/icu@199bc82In libicu 75:
In Iibicu 76, I see:
What's the difference between
Requires
andRequires.private
? Theman pkg-config
says:You can see that the
pkg-config --libs
output omits theseRequires.private
libraries:If I add
--static
, I see even more libraries:Should Go add the
--static
flag here?go/src/cmd/go/internal/work/exec.go
Line 1682 in 635c2dc
What did you expect to see?
See above.
The text was updated successfully, but these errors were encountered: