depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS always evaluates to false on 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. 2024.11.1 - 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: 2024.11.1
  • Distribution of the build machine: Ubuntu, 24.04.1 LTS (Noble Numbat)

Here, describe what you did:

  • any special environment variables: uname -m returns aarch64
  • the commands you ran:
    $ make menuconfig
  • Packages that depend on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS do not show up in make menuconfig

What happens

In package go the variable BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS is defined as

# Target go packages should depend on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
config BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
	bool
	default y
	depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
...

and depends on

  • BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS which depends on
  • BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS which depends on
  • BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE1_ARCH_SUPPORTS which is defined as:
config BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE1_ARCH_SUPPORTS
	bool
	# See src/cmd/dist/unix.c for the list of supported architectures
	default y if BR2_HOSTARCH = "x86"
	default y if BR2_HOSTARCH = "x86_64"
	default y if BR2_HOSTARCH = "arm"

in Config.in.host of package go-bootstrap-stage1

Consequently, BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS is never set to y for BR2_HOSTARCH = aarch64


What was expected

BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS evaluates to y on aarch64 linux systems


Extra information

The issue can be fixed by updating Config.in.host of package go-bootstrap-stage1 to

config BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE1_ARCH_SUPPORTS
	bool
	# See src/cmd/dist/unix.c for the list of supported architectures
	default y if BR2_HOSTARCH = "x86"
	default y if BR2_HOSTARCH = "x86_64"
	default y if BR2_HOSTARCH = "arm"
	default y if BR2_HOSTARCH = "aarch64"

Because aarch64 is not a supported GOARCH (amr64 would be), the package go-bin is installed which then can build the package on aarch64

Edited by scalarion