Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc/cgo/testso: broken by https://go-review.googlesource.com/8523 on darwin, netbsd #10360

Closed
mikioh opened this issue Apr 7, 2015 · 10 comments
Milestone

Comments

@mikioh
Copy link
Contributor

mikioh commented Apr 7, 2015

It fails with the following dying message:

# _/go/misc/cgo/testso
duplicate symbol _exported_var in:
    $WORK/_/go/misc/cgo/testso/_obj/_cgo_export.o
    $WORK/_/go/misc/cgo/testso/_obj/cgoso.cgo2.o
duplicate symbol _exported_var in:
    $WORK/_/go/misc/cgo/testso/_obj/_cgo_export.o
    $WORK/_/go/misc/cgo/testso/_obj/cgoso.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@mikioh
Copy link
Contributor Author

mikioh commented Apr 7, 2015

cd $GOROOT/misc/cgo/testso && go build -x -v -work main.go

WORK=/var/folders/vf/54l674h969s3l44yrks6f50r0000gn/T/go-build797442963
_/go/misc/cgo/testso
mkdir -p $WORK/_/go/misc/cgo/testso/_obj/
mkdir -p $WORK/_/go/misc/cgo/
cd /go/misc/cgo/testso
CGO_LDFLAGS="-g" "-O2" "-L." "libcgosotest.dylib" /go/pkg/tool/darwin_amd64/cgo -objdir $WORK/_/go/misc/cgo/testso/_obj/ -- -I $WORK/_/go/misc/cgo/testso/_obj/ cgoso.go
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -print-libgcc-file-name
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/_/go/misc/cgo/testso/_obj/ -g -O2 -o $WORK/_/go/misc/cgo/testso/_obj/_cgo_main.o -c $WORK/_/go/misc/cgo/testso/_obj/_cgo_main.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/_/go/misc/cgo/testso/_obj/ -g -O2 -o $WORK/_/go/misc/cgo/testso/_obj/_cgo_export.o -c $WORK/_/go/misc/cgo/testso/_obj/_cgo_export.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/_/go/misc/cgo/testso/_obj/ -g -O2 -o $WORK/_/go/misc/cgo/testso/_obj/cgoso.cgo2.o -c $WORK/_/go/misc/cgo/testso/_obj/cgoso.cgo2.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/_/go/misc/cgo/testso/_obj/ -g -O2 -o $WORK/_/go/misc/cgo/testso/_obj/cgoso.o -c ./cgoso.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -o $WORK/_/go/misc/cgo/testso/_obj/_cgo_.o $WORK/_/go/misc/cgo/testso/_obj/_cgo_main.o $WORK/_/go/misc/cgo/testso/_obj/_cgo_export.o $WORK/_/go/misc/cgo/testso/_obj/cgoso.cgo2.o $WORK/_/go/misc/cgo/testso/_obj/cgoso.o -g -O2 -L. libcgosotest.dylib
# _/go/misc/cgo/testso
duplicate symbol _exported_var in:
    $WORK/_/go/misc/cgo/testso/_obj/_cgo_export.o
    $WORK/_/go/misc/cgo/testso/_obj/cgoso.cgo2.o
duplicate symbol _exported_var in:
    $WORK/_/go/misc/cgo/testso/_obj/_cgo_export.o
    $WORK/_/go/misc/cgo/testso/_obj/cgoso.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@mikioh mikioh added this to the Go1.5 milestone Apr 7, 2015
@mikioh mikioh changed the title misc/cg/testso: broken by https://go-review.googlesource.com/8523 on darwin misc/cg/testso: broken by https://go-review.googlesource.com/8523 on darwin, netbsd Apr 7, 2015
@mikioh
Copy link
Contributor Author

mikioh commented Apr 7, 2015

Also NetBSD: http://build.golang.org/log/d6bf46b1935d9684bf8c87864ad30aa482db9a0c

##### ../misc/cgo/testso
panic: testExportedVar: got "", but want "Hello world"

goroutine 1 [running]:
_/tmp/gobuilder/netbsd-386-minux-9fa9f966e99e/go/misc/cgo/testso.testExportedVar()
    /tmp/gobuilder/netbsd-386-minux-9fa9f966e99e/go/misc/cgo/testso/cgoso.go:39 +0x35b
_/tmp/gobuilder/netbsd-386-minux-9fa9f966e99e/go/misc/cgo/testso.Test()
    /tmp/gobuilder/netbsd-386-minux-9fa9f966e99e/go/misc/cgo/testso/cgoso.go:32 +0x22
main.main()
    /tmp/gobuilder/netbsd-386-minux-9fa9f966e99e/go/misc/cgo/testso/main.go:12 +0x18

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /tmp/gobuilder/netbsd-386-minux-9fa9f966e99e/go/src/runtime/asm_386.s:1637 +0x1
2015/04/07 03:14:01 Failed: exit status 2

@bradfitz bradfitz changed the title misc/cg/testso: broken by https://go-review.googlesource.com/8523 on darwin, netbsd misc/cgo/testso: broken by https://go-review.googlesource.com/8523 on darwin, netbsd Apr 7, 2015
@bradfitz
Copy link
Contributor

bradfitz commented Apr 7, 2015

@alexbrainman, please revert your change or fix quickly.

@alexbrainman
Copy link
Member

@bradfitz I don't know how to fix this I will leave it for @minux. I am happy to revert. Do I just press "revert" button in "Gerrit"?

Alex

@alexbrainman
Copy link
Member

https://go-review.googlesource.com/#/c/8527/ to revert. I wonder why trybots didn't complain before we have submitted original change

Alex

@alexbrainman
Copy link
Member

I guess trybots didn't complain, because we don't have any darwin or netbsd trybots running at this moment. I will just revert.

Alex.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/10608 mentions this issue.

alexbrainman added a commit that referenced this issue Jun 12, 2015
I would like to re-apply reverted http://golang.org/cl/8523.
Reverted tests still fail in some environments (see issue #10360).
It is easier to run tests selectively when in Go.
This CL prepares for the changes.

Updates #10360

Change-Id: Iefeb1d71cb3d1cfa653a6ccd9f6e35686c0c5b24
Reviewed-on: https://go-review.googlesource.com/10608
Reviewed-by: Brad Fitzpatrick <[email protected]>
@gopherbot
Copy link
Contributor

CL https://golang.org/cl/11119 mentions this issue.

alexbrainman added a commit that referenced this issue Jun 17, 2015
This change reintroduces CL 8523. CL 8523 was reverted because
it broke darwin and netbsd builds. Now that this test is part
of "go tool dist test" command we could skip OSes that fail.

Updates #10360

Change-Id: Iaaeb5b800126492f36415a439c333a218fe4ab67
Reviewed-on: https://go-review.googlesource.com/11119
Reviewed-by: Brad Fitzpatrick <[email protected]>
@ianlancetaylor
Copy link
Member

Should be fixed by https://golang.org/cl/12470.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/12702 mentions this issue.

ianlancetaylor added a commit that referenced this issue Jul 27, 2015
CL https://golang.org/cl/12470 has reportedly fixed the problems that
the misc/cgo/testsovar test encountered on darwin and netbsd.  Let's
actually run the test.

Update #10360.
Update #11654.

Change-Id: I4cdd27a8ec8713620e0135780a03f63cfcc538d0
Reviewed-on: https://go-review.googlesource.com/12702
Reviewed-by: Russ Cox <[email protected]>
@golang golang locked and limited conversation to collaborators Aug 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants