Description of problem: Cannot build ARM binaries due to missing cgo.a Version-Release number of selected component (if applicable): golang-pkg-linux-arm-1.2.2-22.fc20.noarch golang-src-1.2.2-22.fc20.noarch golang-1.2.2-22.fc20.x86_64 How reproducible: always Steps to Reproduce: 1. GOARM=7 GOOS=linux GOARCH=arm go build 2. 3. Actual results: # _/home/mborzecki/work/openrnd/sonda/sonda-repo/proto/test-go cannot open file: /usr/lib/golang/pkg/linux_arm/runtime/cgo.a Expected results: binary for ARMv7 Additional info: rpm -ql golang-pkg-linux-arm-1.2.2-22.fc20.noarch | egrep 'cgo\.a' does not list any files
curious. So does the file "/usr/lib/golang/pkg/linux_arm/runtime/cgo.a" actually not exist or does it have bad permissions? The cgo.a is owned by "golang-pkg-bin-linux-arm" vbatts@noyee ~/Downloads (master) $ rpm -qplv ./golang-pkg-bin-linux-arm-1.2.2-22.fc20.armv7hl.rpm | grep cgo -rw-r--r-- 1 root root 37736 Aug 13 13:55 /usr/lib/golang/pkg/linux_arm/runtime/cgo.a What golang rpms do you have installed? (`rpm -qa | grep ^golang`)
(In reply to Vincent Batts from comment #1) > curious. So does the file "/usr/lib/golang/pkg/linux_arm/runtime/cgo.a" > actually not exist or does it have bad permissions? > > The cgo.a is owned by "golang-pkg-bin-linux-arm" > > vbatts@noyee ~/Downloads (master) $ rpm -qplv > ./golang-pkg-bin-linux-arm-1.2.2-22.fc20.armv7hl.rpm | grep cgo > -rw-r--r-- 1 root root 37736 Aug 13 13:55 > /usr/lib/golang/pkg/linux_arm/runtime/cgo.a You're checking the wrong package. I'm not using native armv7hl package as this is only used if I'm running say on Beagle Bone. Instead I'm cross compiling for armv7 target on a x86_64 host. Then the cross compilation package (in this case golang-pkg-linux-arm-1.2.2-22.fc20.noarch.rpm) is missing cgo.a > > > What golang rpms do you have installed? (`rpm -qa | grep ^golang`)
the cgo.a can only be produced on the native host it is compiling from. that is why on the fedora build cluster, the arm servers produce that cgo.a. The golang-pkg-linux-arm can not own it as noarch, since not all arches can produce the cgo.a Not an easy process to deal with. It has taken a while to get the rpm spec to handle the variation in build environments.
Seems to work. Closing for now.