Bug 1148356 - golang-pkg-linux-arm missing cgo.a
Summary: golang-pkg-linux-arm missing cgo.a
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: golang
Version: 20
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Vincent Batts
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-01 09:17 UTC by Maciek Borzecki
Modified: 2014-10-02 20:36 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-10-02 20:36:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Maciek Borzecki 2014-10-01 09:17:38 UTC
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

Comment 1 Vincent Batts 2014-10-02 16:37:38 UTC
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`)

Comment 2 Maciek Borzecki 2014-10-02 19:51:52 UTC
(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`)

Comment 3 Vincent Batts 2014-10-02 20:08:08 UTC
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.

Comment 4 Maciek Borzecki 2014-10-02 20:36:47 UTC
Seems to work. Closing for now.


Note You need to log in before you can comment on or make changes to this bug.