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
cmd/link: fail to overwrite symbols of generics in -linkshared modus #64801
Comments
/cc @golang/compiler |
Could you share the exact commands you run, and its output? Please also note that the shared build mode and linkshared are stateful, meaning that the behavior of the command varies depending on what packages have been built into shared libraries and installed into Also note that the linkshared feature predates generics and is supported mostly for legacy and compatibility reasons. There is no plan to make any improvements. Thanks. |
The demo already fails in a clean installation:
|
Thanks. It seems you're using module mode. Please note that the shared build mode and linkshared don't work in module mode, see e.g. #38499 and #42189. Also, |
I agree it doesn't make any sense without pre installing shared libraries. The use case comes from yocto linux, where they install
|
Go version
go version go1.21.3 linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
I'm trying to build https://github.com/j-licht/generics-linkshared/tree/main with
go build -linkshared
.Which is a little Demo Code for tailscale/tailscale#6597
Basically I've a package wich provides a function with a generic and in two different places the generic is used with the same type.
What did you expect to see?
Successful build as without the -linkshared option
What did you see instead?
this error:
The text was updated successfully, but these errors were encountered: