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

cmd/link: TestStrictDup fails in module mode #35790

Closed
fhs opened this issue Nov 22, 2019 · 1 comment
Closed

cmd/link: TestStrictDup fails in module mode #35790

fhs opened this issue Nov 22, 2019 · 1 comment

Comments

@fhs
Copy link
Contributor

@fhs fhs commented Nov 22, 2019

What version of Go are you using (go version)?

$ go version
go version devel +05511a5c0a Fri Nov 22 17:33:48 2019 +0000 linux/amd64

What operating system and processor architecture are you using (go env)?

go env Output
$ go env | egrep -v '^(GONOPROXY|GONOSUMDB|GOPRIVATE)='
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/fhs/.cache/go-build"
GOENV="/home/fhs/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOOS="linux"
GOPATH="/home/fhs/go"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/big/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/big/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build121624413=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go test cmd/link -run TestStrictDup

What did you expect to see?

Test pass

What did you see instead?

--- FAIL: TestStrictDup (0.01s)
    link_test.go:428: linking with -strictdups=1 failed: exit status 1
    link_test.go:431: unexpected output:
        go: cannot find main module; see 'go help modules'
    link_test.go:441: unexpected output:
        go: cannot find main module; see 'go help modules'
FAIL
FAIL	cmd/link	0.011s
FAIL

The test passes in GOPATH mode:

$ GO111MODULE=off go test cmd/link -run TestStrictDup
ok  	cmd/link	0.236s

@gopherbot Add labels Testing, NeedsFix, modules

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 23, 2019

Change https://golang.org/cl/208517 mentions this issue: cmd/link: fix TestStrictDup in module mode

@gopherbot gopherbot closed this in 5de3b97 Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.