[Buildroot] [git commit branch/2023.08.x] package/go: fix installation
Peter Korsgaard
peter at korsgaard.com
Fri Oct 13 14:36:58 UTC 2023
commit: https://git.buildroot.net/buildroot/commit/?id=cbe2f10910dd3208b656ccca0029f54cefd4321e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2023.08.x
When building for a target architecture that go does not support, the
installation fails with:
$ make host-go
[...]
ln -sf ../lib/go/bin/go /home/nyma7486/dev/work/5GCroCo/O/pouet/per-package/host-go/host/bin/
ln: failed to create symbolic link '/home/nyma7486/dev/work/5GCroCo/O/pouet/per-package/host-go/host/bin/': No such file or directory
Indeed, the HOST_DIR/bin is not guaranteed to exist when we install a
host package, so it needs to be explicitly created before we can create
entries in there.
Signed-off-by: Yann E. MORIN <yann.morin at orange.com>
Cc: Christian Stewart <christian at aperture.us>
Cc: Anisse Astier <anisse at astier.eu>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
(cherry picked from commit 1db38d928292aaca493c80527008b9bd7e6db602)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
package/go/go.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/go/go.mk b/package/go/go.mk
index 01442b0f62..cc374aa44f 100644
--- a/package/go/go.mk
+++ b/package/go/go.mk
@@ -146,6 +146,7 @@ define HOST_GO_INSTALL_CMDS
$(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_ROOT)/bin/go
$(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_ROOT)/bin/gofmt
+ mkdir -p $(HOST_DIR)/bin
ln -sf ../lib/go/bin/go $(HOST_DIR)/bin/
ln -sf ../lib/go/bin/gofmt $(HOST_DIR)/bin/
More information about the buildroot
mailing list