building go/golang gives error
go does not appear in make menuconfig
attempting to build manually with make host-go fails with error:
go tool dist: unknown architecture: aarch64
Check-list
-
I did not find the issue in the existing issues -
I can reproduce the issue with unmodified Buildroot from this repository, not from a fork somewhere else -
I can reproduce the issue on the latest commit of the branch I'm using: -
master -
stable (i.e. 20NN.MM.x - please specify) -
LTS (i.e. 20NN.02.x - please specify)
-
-
I can reproduce the issue after running make clean; make -
I attached the full build log file (e.g. make 2>&1 |tee build.log) -
I attached a minimal defconfig file that can reproduce the issue ( make BR2_DEFCONFIG=$(pwd)/issue_defconfig savedefconfig) -
I also attached the configuration for kconfig-based packages that are enabled (and necessary to reproduce the issue), most notably: -
busybox -
linux -
uclibc -
uboot -
…
-
What I did
Buildroot commit sha1: get this with git describe HEAD
Distribution of the build machine: get this with NAME and VERSION from /etc/os-release
Here, describe what you did:
- any special environment variables: CC, CXX, TARGET, CROSS_COMPILE, etc…
-
the commands you ran:
$ make host-go
What happens
go/golang fails to be built
$make host-go
>>> host-go-bootstrap-stage1 1.4-bootstrap-20171003 Downloading
wget -nd -t 3 -O '/home/pi/rpi4-br/buildroot/output/build/.go1.4-bootstrap-20171003.tar.gz.2FEXFI/output' 'https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz'
--2024-07-13 15:27:00-- https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz
Resolving dl.google.com (dl.google.com)... 142.250.191.46, 2607:f8b0:4005:80b::200e
Connecting to dl.google.com (dl.google.com)|142.250.191.46|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11009739 (10M) [application/octet-stream]
Saving to: '/home/pi/rpi4-br/buildroot/output/build/.go1.4-bootstrap-20171003.tar.gz.2FEXFI/output'
/home/pi/rpi4-br/buildroot/out 100%[=================================================>] 10.50M --.-KB/s in 0.1s
2024-07-13 15:27:00 (93.3 MB/s) - '/home/pi/rpi4-br/buildroot/output/build/.go1.4-bootstrap-20171003.tar.gz.2FEXFI/output' saved [11009739/11009739]
go1.4-bootstrap-20171003.tar.gz: OK (sha256: f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52)
>>> host-go-bootstrap-stage1 1.4-bootstrap-20171003 Extracting
gzip -d -c /home/pi/rpi4-br/buildroot/dl/go-bootstrap-stage1/go1.4-bootstrap-20171003.tar.gz | /home/pi/rpi4-br/buildroot/output/host/bin/tar --strip-components=1 -C /home/pi/rpi4-br/buildroot/output/build/host-go-bootstrap-stage1-1.4-bootstrap-20171003 -xf -
>>> host-go-bootstrap-stage1 1.4-bootstrap-20171003 Patching
>>> host-go-bootstrap-stage1 1.4-bootstrap-20171003 Configuring
>>> host-go-bootstrap-stage1 1.4-bootstrap-20171003 Building
cd /home/pi/rpi4-br/buildroot/output/build/host-go-bootstrap-stage1-1.4-bootstrap-20171003/src && GOOS=linux GOROOT_FINAL="/home/pi/rpi4-br/buildroot/output/host/lib/go-1.4-bootstrap-20171003" GOROOT="/home/pi/rpi4-br/buildroot/output/build/host-go-bootstrap-stage1-1.4-bootstrap-20171003" GOBIN="/home/pi/rpi4-br/buildroot/output/build/host-go-bootstrap-stage1-1.4-bootstrap-20171003/bin" CC=/usr/bin/gcc CGO_ENABLED=0 ./make.bash
# Building C bootstrap tool.
cmd/dist
go tool dist: unknown architecture: aarch64
make: *** [package/pkg-generic.mk:283: /home/pi/rpi4-br/buildroot/output/build/host-go-bootstrap-stage1-1.4-bootstrap-20171003/.stamp_built] Error 1
What was expected
go/golang to be compiled
apologies if I am missing something obvious.
the build machine is aarch64 (Raspberry Pi 5)
Edited by JP Kelly