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/go: "executable file not found" error if -out file exists #23147

Closed
ernado opened this issue Dec 15, 2017 · 6 comments
Closed

cmd/go: "executable file not found" error if -out file exists #23147

ernado opened this issue Dec 15, 2017 · 6 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@ernado
Copy link
Contributor

ernado commented Dec 15, 2017

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

go version devel +67295d6 Thu Dec 14 22:12:09 2017 +0000 linux/amd64

Does this issue reproduce with the latest release?

It's on tip

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ernado/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build292560017=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ go test -cpuprofile cpu.out . # first
$ go test -cpuprofile cpu.out . # second (cached?)

What did you expect to see?

$ go test -cpuprofile cpu.out .
ok  	github.com/ernado/bug-donotuse	0.203s
$ go test -cpuprofile cpu.out .
ok  	github.com/ernado/bug-donotuse	0.203s

What did you see instead?

$ go test -cpuprofile cpu.out .
ok  	github.com/ernado/bug-donotuse	0.203s
$ go test -cpuprofile cpu.out .
exec: "DO NOT USE - link": executable file not found in $PATH
FAIL	github.com/ernado/bug-donotuse	0.000s

The package file I have used to reproduce that issue:

# bug_test.go
package bug

import "testing"

func TestNothing(t *testing.T) {
	if true == false {
		t.Fatal("-")
	}
}

upd: works even when "-o" is passed and the output file already exists.

@ernado
Copy link
Contributor Author

ernado commented Dec 15, 2017

@ernado ernado changed the title testing: -cpuprofile causes "executable file not found" error on tip on second run testing: -cpuprofile causes "executable file not found" error if -out file exists Dec 15, 2017
@ernado ernado changed the title testing: -cpuprofile causes "executable file not found" error if -out file exists testing: "executable file not found" error if -out file exists Dec 15, 2017
@ernado
Copy link
Contributor Author

ernado commented Dec 15, 2017

/cc @dominikh

@ianlancetaylor
Copy link
Contributor

Is this the same as #23150?

@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Dec 15, 2017
@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Dec 15, 2017
@ianlancetaylor ianlancetaylor changed the title testing: "executable file not found" error if -out file exists cmd/go: "executable file not found" error if -out file exists Dec 15, 2017
@ernado
Copy link
Contributor Author

ernado commented Dec 15, 2017

@ianlancetaylor yes, it is the same issue.

@ianlancetaylor
Copy link
Contributor

Closing as dup.

@ernado
Copy link
Contributor Author

ernado commented Dec 16, 2017

Technically 23147 can't be dup of 23150 because first was created earlier.
But I see that cl84376 is already linked to 23150 so I got it :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

3 participants