Skip to content

cmd/go: TestCgoConsistentResults fails with clang-3.8 #18338

Closed
@bcmills

Description

@bcmills
$ go version
go version devel +0cd2bf4 Thu Dec 15 22:43:28 2016 +0000 linux/amd64
$ $(go env CC) --version
clang version 3.8.0-2ubuntu3~trusty4 (tags/RELEASE_380/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ ./all.bash
[…]
--- FAIL: TestCgoConsistentResults (2.20s)
        go_test.go:260: running testgo [build -o /tmp/gotest228308975/cgotest1 cgotest]
        go_test.go:260: running testgo [build -x -o /tmp/gotest228308975/cgotest2 cgotest]
        go_test.go:279: standard error:
        go_test.go:280: WORK=/tmp/go-build626506272
                mkdir -p $WORK/cgotest/_obj/
                mkdir -p $WORK/
                cd /home/bcmills/src/go/src/cmd/go/testdata/src/cgotest
                CGO_LDFLAGS="-g" "-O2" /home/bcmills/src/go/pkg/tool/linux_amd64/cgo -objdir $WORK/cgotest/_obj/ -importpath cgotest -- -I $WORK/cgotest/_obj/ -g -O2 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/bcmills/src/go/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_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 -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 -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/bcmills/src/go/pkg/tool/linux_amd64/cgo -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/bcmills/src/go/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/bcmills/src/go/pkg/tool/linux_amd64/compile -o $WORK/cgotest.a -trimpath $WORK -p cgotest -buildid da5b9c65b792216896a366eaca307b723dab842e -D _/home/bcmills/src/go/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/gotest228308975/
                mv $WORK/cgotest.a /tmp/gotest228308975/cgotest2

        go_test.go:3383: building cgotest twice did not produce the same output
FAIL
FAIL    cmd/go  68.182s

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions