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
x/build/internal/task: provide a release archive with all the syso files, or release the files separately #54174
Comments
CC @golang/release. |
The decision to not ship race detector syso files for other platforms was made in 2018 in cmd/release (CL 144281), to reduce release archive size. It was ported to cmd/relui and still applies to Go 1.20.x releases:
Starting with Go 1.21, the decision of which files to include in release archives lives in
So it seems there's nothing more to do in this issue. @blorente Is the above missing anything? |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Sorry not answering before. There is indeed no more to do, thanks for the investigation. |
What version of Go are you using (
go version
)?1.17 SDK, via Bazel's
rules_go
: https://github.com/bazelbuild/rules_go.Does this issue reproduce with the latest release?
Yes, the latest release (1.18.4 from go.dev/dl) has that issue.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried to build a binary for linux using the musl C toolchain.
rules_go tries to build the standard library by downloading a copy of the sdk in the host architecture (e.g., it would be https://go.dev/dl/go1.18.4.darwin-amd64.tar.gz for my architecture), and then doing roughly:
foo
.src
andpkg
there.foo
as the newGOROOT
, and setGOOS
andGOARCH
to the target platform (in this case,GOOS=linux, GOARCH=x86_64
go install
.This builds correctly with musl.
What did you expect to see?
However, if I try to link a binary that uses the race detector to this standard library, it will fail to find libc-specific symbols from the thread sanitiser. This issue has been solved in the precompiled
syso
files for race, insrc/runtime/race
.And, in fact, if reproduce the process but manually place
race_{GOOS}_{GOARCH}.syso
insrc/runtime/race
, thesyso
is packed into therace.a
archive, and the binary links successfully.Since the go sdk is supposed to cross-compile, I would have expected this operation to succeed.
What did you see instead?
Since this tool strips the syso for platforms other than the host, the syso can't end up in the
.a
archive for the package.Further info
I'm preparing to contribute a fix to
rules_go
, which involves getting a hold of thesyso
s somehow. My question is:What would be the recommended way to get those syso files?
Should I download the
src
sdk (e.g. https://go.dev/dl/go1.18.4.src.tar.gz) and incur the bandwidth penalty? Should I download the binaries directly from the GitHub mirror, or should I do something else?The text was updated successfully, but these errors were encountered: