-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
Please answer these questions before submitting your issue. Thanks!
- What version of Go are you using (
go version
)?
go version devel +f8fc371 Thu Apr 21 17:04:01 2016 +0000 linux/amd64
(butGOROOT_BOOTSTRAP
is set to an installation ofgo1.6.2
) - What operating system and processor architecture are you using (
go env
)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/etiennebruines/workspaces/go"
GORACE=""
GOROOT="/home/etiennebruines/workspaces/go-master"
GOTOOLDIR="/home/etiennebruines/workspaces/go-master/pkg/tool/linux_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build179019630=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
(Tested different versions of `clang` (with different results!), more info down below. )
- What did you do?
Attempted to buildmaster
branch of Go (currently HEAD is at 40f1d0c )
(more specifically:./all.bash
within thesrc
directory) - What did you expect to see?
No errors. - What did you see instead?
An error within the tests, namely:
--- FAIL: TestCgoConsistentResults (1.10s)
go_test.go:244: running testgo [build -o /tmp/gotest260338695/cgotest1 cgotest]
go_test.go:244: running testgo [build -x -o /tmp/gotest260338695/cgotest2 cgotest]
go_test.go:263: standard error:
go_test.go:264: WORK=/tmp/go-build737947577
mkdir -p $WORK/cgotest/_obj/
mkdir -p $WORK/
cd /home/etiennebruines/workspaces/go-master/src/cmd/go/testdata/src/cgotest
CGO_LDFLAGS="-g" "-O2" /home/etiennebruines/workspaces/go-master/pkg/tool/linux_amd64/cgo -objdir $WORK/cgotest/_obj/ -importpath cgotest -- -I $WORK/cgotest/_obj/ m.go
cd $WORK
clang-3.8 -fdebug-prefix-map=a=b -c trivial.c
clang-3.8 -gno-record-gcc-switches -c trivial.c
cd /home/etiennebruines/workspaces/go-master/src/cmd/go/testdata/src/cgotest
clang-3.8 -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -I $WORK/cgotest/_obj/ -g -O2 -o $WORK/cgotest/_obj/_cgo_main.o -c $WORK/cgotest/_obj/_cgo_main.c
clang-3.8 -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -I $WORK/cgotest/_obj/ -g -O2 -o $WORK/cgotest/_obj/_cgo_export.o -c $WORK/cgotest/_obj/_cgo_export.c
clang-3.8 -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -I $WORK/cgotest/_obj/ -g -O2 -o $WORK/cgotest/_obj/m.cgo2.o -c $WORK/cgotest/_obj/m.cgo2.c
clang-3.8 -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -o $WORK/cgotest/_obj/_cgo_.o $WORK/cgotest/_obj/_cgo_main.o $WORK/cgotest/_obj/_cgo_export.o $WORK/cgotest/_obj/m.cgo2.o -g -O2
/home/etiennebruines/workspaces/go-master/pkg/tool/linux_amd64/cgo -objdir $WORK/cgotest/_obj/ -dynpackage cgotest -dynimport $WORK/cgotest/_obj/_cgo_.o -dynout $WORK/cgotest/_obj/_cgo_import.go
cd $WORK
clang-3.8 -no-pie -c trivial.c
cd /home/etiennebruines/workspaces/go-master/src/cmd/go/testdata/src/cgotest
clang-3.8 -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -o $WORK/cgotest/_obj/_all.o $WORK/cgotest/_obj/_cgo_export.o $WORK/cgotest/_obj/m.cgo2.o -g -O2 -Wl,-r -nostdlib -Wl,--build-id=none
/home/etiennebruines/workspaces/go-master/pkg/tool/linux_amd64/compile -o $WORK/cgotest.a -trimpath $WORK -p cgotest -buildid 1491fc40a2d4f2376923084c60120b2fd293fe0e -D _/home/etiennebruines/workspaces/go-master/src/cmd/go/testdata/src/cgotest -I $WORK -pack $WORK/cgotest/_obj/_cgo_gotypes.go $WORK/cgotest/_obj/m.cgo1.go $WORK/cgotest/_obj/_cgo_import.go
pack r $WORK/cgotest.a $WORK/cgotest/_obj/_all.o # internal
mkdir -p /tmp/gotest260338695/
mv $WORK/cgotest.a /tmp/gotest260338695/cgotest2
go_test.go:2775: building cgotest twice did not produce the same output
FAIL
FAIL cmd/go 29.068s
Notes
- Without
clang
, this error is not thrown (fails at cmd/cgo: ThreadSanitizer barks about data races in all.bash #14602, so not sure if issue is present) - With
clang-3.6
, this error is not thrown (not sure why not, but some things are disabled with older clang and newer kernel (4.3)) - With
clang-3.8
, this error is thrown (but cmd/cgo: ThreadSanitizer barks about data races in all.bash #14602 is "fixed").
When running CGO_ENABLED=0
, all errors go away (makes sense).
wheelcomplex, mewmew, LiuPai and EddieRingle
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.