ARTICLE AD BOX
I'm trying to build a Go package in Flathub's CI for an aarch64 Linux architecture. The build is failing while compiling a C dependency:
# github.com/rclone/rclone /usr/lib/sdk/golang/pkg/tool/linux_arm64/link: running gcc failed: exit status 1 /run/ccache/bin/gcc -Wl,-z,now -Wl,-z,nocopyreloc -fuse-ld=gold -Wl,--build-id=0xa27f3be6a0f85349703b5480f79c1a72aa055c8f -o $WORK/b001/exe/a.out -rdynamic /tmp/go-link-3266372780/go.o /tmp/go-link-3266372780/000000.o /tmp/go-link-3266372780/000001.o /tmp/go-link-3266372780/000002.o /tmp/go-link-3266372780/000003.o /tmp/go-link-3266372780/000004.o /tmp/go-link-3266372780/000005.o /tmp/go-link-3266372780/000006.o /tmp/go-link-3266372780/000007.o /tmp/go-link-3266372780/000008.o /tmp/go-link-3266372780/000009.o /tmp/go-link-3266372780/000010.o /tmp/go-link-3266372780/000011.o /tmp/go-link-3266372780/000012.o /tmp/go-link-3266372780/000013.o /tmp/go-link-3266372780/000014.o /tmp/go-link-3266372780/000015.o /tmp/go-link-3266372780/000016.o /tmp/go-link-3266372780/000017.o /tmp/go-link-3266372780/000018.o /tmp/go-link-3266372780/000019.o /tmp/go-link-3266372780/000020.o /tmp/go-link-3266372780/000021.o /tmp/go-link-3266372780/000022.o /tmp/go-link-3266372780/000023.o /tmp/go-link-3266372780/000024.o /tmp/go-link-3 collect2: fatal error: cannot find ‘ld’It appears that Go is invoking gcc with -fuse-ld=gold, which as I understood requests the gold linker, but the gold linker isn't available in the build environment. How can I get Go to use a different linker?
33.1k78 gold badges172 silver badges252 bronze badges
Explore related questions
See similar questions with these tags.
