Local build failed: "go-bootstrap cannot be installed on linux/arm64"

I use to do my own OpenWrt builds. I can build just fine in Ubuntu on WSL2.

However I am trying to build on Armbian/Orange Pi5 as an experiment (targeting ARM64, so no cross-compilation is needed) and I am getting the following error during GoLang build:

make[3]: Entering directory '/home/dsouza/openwrt/r4s-router-23.05.5/feeds/packages/lang/golang/golang'
Makefile:402: *** go-bootstrap cannot be installed on linux/arm64.  Stop.

I know that building on ARM64 platform is not officially supported, but just asking here if by chance anyone has successfully built OpenWrt in a ARM64 build environment and if there is any workaround for this issue.

You can install armbian provided go compiler to serve as bootstrap.

That's what I did, but it is not working.

I've found the issue below, reading now (I believe I need to point the make file manually to the external golang compiler):

I believe I need to set GOLANG_EXTERNAL_BOOTSTRAP_ROOT to the directory where go is in my system (/usr/lib/go).

However I am not able to find where I should set GOLANG_EXTERNAL_BOOTSTRAP_ROOT=/usr/lib/go

Any hint would be appreciated.

OK, found it. How to solve - after setting up the build environment, doing all the pre-build steps, right after running make menuconfig and before starting the build do this:

  1. Install go in your build environment:
    sudo apt install golang

  2. Find where it is installed:
    whereis go. In my case it was installed in /usr/bin/go

  3. Edit your OpenWrt build .config:
    nano .config

  4. Find and change the following configuration:
    CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT="/usr/lib/go"

  5. Done! Now the build can be started (make -j9 in OrangePi) and it will not fail in the GoLang phase.

3 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.