-
Notifications
You must be signed in to change notification settings - Fork 206
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
Bootstrap fails on AlpineLinux edge #2783
Comments
I'm also having this issue. Following the codelab, when I try to build a hello world project I get:
|
Hey all! Thanks for the bug report. The alpine profile uses Go from the host machine and in 1.20 they removed the compiled version of the SDK. I've updated the codelabs to reflect this: https://please.build/codelabs/go_intro/#3 Essentially to compile on alpine edge, you need to run |
From go 1.20 changelog:
I think this is a good decision from Go that we should follow. Is there any reason we can't make |
I understand that having stdlib precompiled is a good thing for a build system like Maybe we can do something like what Bazel does here: bazelbuild/rules_go#3385 (pre-compile those files on-demand before the actual build action). |
Oh, we actually have this stdlib build rule that does that: I believe if you add that to your repo, set the I should probably suggest that in the codelab instead of the hack. That was an oversite. |
Oh it's true, I can get diff --git a/.plzconfig.alpine b/.plzconfig.alpine
index a3f43db..1072a9a 100644
--- a/.plzconfig.alpine
+++ b/.plzconfig.alpine
@@ -1,6 +1,7 @@
[Plugin "go"]
DefaultStatic = true
GoTool = go
+Stdlib = //third_party/go:std
[buildconfig]
static-sandbox = true
diff --git a/third_party/go/BUILD b/third_party/go/BUILD
index ad4f17e..e3eb754 100644
--- a/third_party/go/BUILD
+++ b/third_party/go/BUILD
@@ -14,6 +14,8 @@ go_toolchain(
version = "1.19",
)
+go_stdlib(name = "std")
+
go_mod_download(
name = "build_tools_dl",
module = "github.com/peterebden/buildtools", Would it be ok if I open a PR to include this here? Then, the hack can be removed from the codelab docs. |
Oh never mind there is an opened PR including this diff: https://github.com/thought-machine/please/pull/2803/files. I'll wait for the next release then. |
I'm trying to install
please
on my local machine, running AlpineLinux edge.The command I use, based on the CI config:
My environment variable from
go env
:The build is currently failing with these logs:
I don't know where it generated
"$GOROOT"/pkg/linux_amd64
from but that path doesn't exist on my machine.The text was updated successfully, but these errors were encountered: