Bug 1404679 - IfInfomsg struct incorrectly defined on s390x
Summary: IfInfomsg struct incorrectly defined on s390x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: golang
Version: rawhide
Hardware: s390x
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Čajka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1398575
Blocks: ZedoraTracker 1409483
TreeView+ depends on / blocked
 
Reported: 2016-12-14 12:18 UTC by Dan Horák
Modified: 2017-01-23 05:20 UTC (History)
14 users (show)

Fixed In Version: golang-1.7.4-2.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1398575
Environment:
Last Closed: 2017-01-23 05:20:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 149939 0 None None None 2016-12-14 13:55:12 UTC

Description Dan Horák 2016-12-14 12:18:33 UTC
+++ This bug was initially created as a clone of Bug #1398575 +++

--- Additional comment from Dan Horák on 2016-12-14 06:04:46 EST ---

Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.ukwE3x
+ umask 022
+ cd /home/sharkcz/golang-github-vishvananda-netlink
+ cd netlink-e73bad418fd727ed3a02830b1af1ad0283a1de6c
+ export GOPATH=/home/sharkcz/rpmbuild/BUILDROOT/golang-github-vishvananda-netlink-0-0.10.gite73bad4.fc26.s390x//usr/share/gocode:/usr/share/gocode
+ GOPATH=/home/sharkcz/rpmbuild/BUILDROOT/golang-github-vishvananda-netlink-0-0.10.gite73bad4.fc26.s390x//usr/share/gocode:/usr/share/gocode
+ gotest github.com/vishvananda/netlink/nl
+ go test github.com/vishvananda/netlink/nl
# github.com/vishvananda/netlink/nl
../../rpmbuild/BUILDROOT/golang-github-vishvananda-netlink-0-0.10.gite73bad4.fc26.s390x/usr/share/gocode/src/github.com/vishvananda/netlink/nl/nl_linux_test.go:34: msg.X__ifi_pad undefined (type *IfInfomsg has no field or method X__ifi_pad)
FAIL	github.com/vishvananda/netlink/nl [build failed]
error: Bad exit status from /var/tmp/rpm-tmp.ukwE3x (%check)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.ukwE3x (%check)
Could not execute local: Non zero exit

--- Additional comment from Dan Horák on 2016-12-14 06:23:12 EST ---

Looks as a bug in https://golang.org/src/syscall/ztypes_linux_s390x.go

	type IfInfomsg struct {
		Family uint8
		_      uint8
		Type   uint16
		Index  int32
		Flags  uint32
		Change uint32
	}

while https://golang.org/src/syscall/ztypes_linux_ppc64.go contains

type IfInfomsg struct {
		Family     uint8
		X__ifi_pad uint8
		Type       uint16
		Index      int32
		Flags      uint32
		Change     uint32
	}

--- Additional comment from Dan Horák on 2016-12-14 07:09:21 EST ---

The corresponding kernel structure is defined in include/uapi/linux/rtnetlink.h as 

struct ifinfomsg {
        unsigned char   ifi_family;
        unsigned char   __ifi_pad;
        unsigned short  ifi_type;               /* ARPHRD_* */
        int             ifi_index;              /* Link index   */
        unsigned        ifi_flags;              /* IFF_* flags  */
        unsigned        ifi_change;             /* IFF_* change mask */
};

Comment 1 Dan Horák 2016-12-14 12:26:36 UTC
And looking further in the ztypes_linux_s390x.go file this is not the only issue where a struct member is just "_".

Comment 2 Dan Horák 2016-12-14 12:27:52 UTC
A buggy tool that generates the ztypes-*.go files?

Comment 3 Dan Horák 2017-01-12 10:32:00 UTC
Reported upstream as https://github.com/golang/go/issues/18628

Comment 4 Dan Horák 2017-01-12 11:02:44 UTC
same root cause for golang-github-pkg-sftp

# github.com/pkg/sftp
../../BUILDROOT/golang-github-pkg-sftp-0-0.1.git8197a2e.fc26.s390x/usr/share/gocode/src/github.com/pkg/sftp/server_statvfs_linux.go:19: stat.Fsid.X__val undefined (type syscall.Fsid has no field or method X__val)
FAIL	github.com/pkg/sftp [build failed]

Comment 5 Dan Horák 2017-01-12 19:27:33 UTC
And transformed into https://github.com/golang/go/issues/18632 :-)

Comment 6 Fedora Update System 2017-01-20 14:47:48 UTC
golang-1.7.4-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-46c464ddb4

Comment 7 Fedora Update System 2017-01-21 22:25:15 UTC
golang-1.7.4-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-46c464ddb4

Comment 8 Fedora Update System 2017-01-23 05:20:09 UTC
golang-1.7.4-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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