Bug 71635 - gcc-go fails to link golang-googlecode-net
Summary: gcc-go fails to link golang-googlecode-net
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: go (show other bugs)
Version: 6.1.1
: P3 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-23 15:56 UTC by Dan Horák
Modified: 2018-02-05 05:50 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Horák 2016-06-23 15:56:44 UTC
build of golang-googlecode-net package fails with gcc-go (checked on s390x in Fedora buildsystem and manually on x86_64) due a linking error

...
+ go test -compiler gccgo -gccgoflags '-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=z9-109 -mtune=z10 ' golang.org/x/net/ipv4
# testmain
/tmp/go-build546930784/golang.org/x/net/libipv4.a(_go_.o): In function `golang_org_x_net_ipv4.set.pN28_golang_org_x_net_ipv4.rawOpt':
/builddir/build/BUILDROOT/golang-googlecode-net-0-0.32.gitbc3663d.fc25.s390x/usr/share/gocode/src/golang.org/x/net/ipv4/control.go:18: multiple definition of `golang_org_x_net_ipv4.set.pN28_golang_org_x_net_ipv4.rawOpt'
/tmp/go-build546930784/golang.org/x/net/ipv4/_test/golang.org/x/net/libipv4.a(_go_.o):/builddir/build/BUILDROOT/golang-googlecode-net-0-0.32.gitbc3663d.fc25.s390x/usr/share/gocode/src/golang.org/x/net/ipv4/control.go:18: first defined here
/tmp/go-build546930784/golang.org/x/net/libipv4.a(_go_.o): In function `golang_org_x_net_ipv4.clear.pN28_golang_org_x_net_ipv4.rawOpt':
/builddir/build/BUILDROOT/golang-googlecode-net-0-0.32.gitbc3663d.fc25.s390x/usr/share/gocode/src/golang.org/x/net/ipv4/control.go:19: multiple definition of `golang_org_x_net_ipv4.clear.pN28_golang_org_x_net_ipv4.rawOpt'
/tmp/go-build546930784/golang.org/x/net/ipv4/_test/golang.org/x/net/libipv4.a(_go_.o):/builddir/build/BUILDROOT/golang-googlecode-net-0-0.32.gitbc3663d.fc25.s390x/usr/share/gocode/src/golang.org/x/net/ipv4/control.go:19: first defined here
/tmp/go-build546930784/golang.org/x/net/libipv4.a(_go_.o): In function `golang_org_x_net_ipv4.isset.pN28_golang_org_x_net_ipv4.rawOpt':
/builddir/build/BUILDROOT/golang-googlecode-net-0-0.32.gitbc3663d.fc25.s390x/usr/share/gocode/src/golang.org/x/net/ipv4/control.go:20: multiple definition of `golang_org_x_net_ipv4.isset.pN28_golang_org_x_net_ipv4.rawOpt'
/tmp/go-build546930784/golang.org/x/net/ipv4/_test/golang.org/x/net/libipv4.a(_go_.o):/builddir/build/BUILDROOT/golang-googlecode-net-0-0.32.gitbc3663d.fc25.s390x/usr/share/gocode/src/golang.org/x/net/ipv4/control.go:20: first defined here
/tmp/go-build546930784/golang.org/x/net/libipv4.a(_go_.o): In function `golang_org_x_net_ipv4.ok.pN32_golang_org_x_net_ipv4.genericOpt':
/builddir/build/BUILDROOT/golang-googlecode-net-0-0.32.gitbc3663d.fc25.s390x/usr/share/gocode/src/golang.org/x/net/ipv4/endpoint.go:24: multiple definition of `golang_org_x_net_ipv4.ok.pN32_golang_org_x_net_ipv4.genericOpt'
/tmp/go-build546930784/golang.org/x/net/ipv4/_test/golang.org/x/net/libipv4.a(_go_.o):/builddir/build/BUILDROOT/golang-googlecode-net-0-0.32.gitbc3663d.fc25.s390x/usr/share/gocode/src/golang.org/x/net/ipv4/endpoint.go:24: first defined here
/tmp/go-build546930784/golang.org/x/net/libipv4.a(_go_.o): In function `golang_org_x_net_ipv4.ok.pN30_golang_org_x_net_ipv4.dgramOpt':
/builddir/build/BUILDROOT/golang-googlecode-net-0-0.32.gitbc3663d.fc25.s390x/usr/share/gocode/src/golang.org/x/net/ipv4/endpoint.go:48: multiple definition of `golang_org_x_net_ipv4.ok.pN30_golang_org_x_net_ipv4.dgramOpt'
...

for full log please see http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2266794

upstream sources for the package is https://github.com/golang/net

Version-Release number of selected component (if applicable):
gcc-go-6.1.1-2.fc24

Steps to reproduce locally:
mkdir -p src/golang.org/x/
cd src/golang.org/x/
git clone https://github.com/golang/net.git
cd ../..
GOPATH=`pwd`/.. go test golang.org/x/net/ipv4
Comment 1 Dan Horák 2016-06-23 15:57:42 UTC
original Fedora bug is https://bugzilla.redhat.com/show_bug.cgi?id=1349371
Comment 2 Ian Lance Taylor 2018-02-05 05:50:41 UTC
As far as I can tell this works on tip, after some symbol renaming changes.  Please comment if you disagree.