Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 916905

Summary: dev-go/go-md2man-2.0.2: linux_arm/link x86_64-pc-linux-gnu-gcc not found (armv7l)
Product: Gentoo Linux Reporter: APN-Pucky <alexander>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=916894
Whiteboard:
Package list:
Runtime testing required: ---

Description APN-Pucky 2023-11-05 18:07:16 UTC
I get following error from go-md2man on an armv7l (Raspberry Pi 2B V1.1):

/usr/lib/go/pkg/tool/linux_arm/link -o $WORK/b001/exe/a.out -importcfg $WORK/b001/importcfg.link -installsuffix shared -X=runtime.godebugDefault=panicnil=1 -buildmode=pie -buildid=mV9aGXB-e88B0ONORfCM/Ofo08pTQxLjBxnfKtXbV/_2PgZag1BPR-iOF0_C2J/mV9aGXB-e88B0ONORfCM -extld=x86_64-pc-linux-gnu-gcc $WORK/b001/_pkg_.a
# github.com/cpuguy83/go-md2man/v2
loadinternal: cannot find runtime/cgo
/usr/lib/go/pkg/tool/linux_arm/link: running x86_64-pc-linux-gnu-gcc failed: exec: "x86_64-pc-linux-gnu-gcc": executable file not found in $PATH

make: *** [Makefile:19: bin/go-md2man] Error 1

However, compiling the git version works well. From there I found the difference is in the GOFLAGS (https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/go-module.eclass#n369). By adding them I get the same error from a non-system compile:

~/git/go-md2man # rm -rf  ~/.cache/go-build/ && rm -rf bin &&  make GOFLAGS="-buildmode=pie" BUILD_FLAGS="-mod=vendor" build
# github.com/cpuguy83/go-md2man/v2
loadinternal: cannot find runtime/cgo
/usr/lib/go/pkg/tool/linux_arm/link: running x86_64-pc-linux-gnu-gcc failed: exec: "x86_64-pc-linux-gnu-gcc": executable file not found in $PATH

make: *** [Makefile:19: bin/go-md2man] Error 1

Thus, I expect the solution is to remove -buildmode=pie for arm?