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: cannot write to /dev/null anymore #12407

Closed
mpl opened this issue Aug 30, 2015 · 4 comments
Closed

cmd/go: cannot write to /dev/null anymore #12407

mpl opened this issue Aug 30, 2015 · 4 comments
Milestone

Comments

@mpl
Copy link
Contributor

mpl commented Aug 30, 2015

I'm not sure it should be considered a regression, but here it is, just in case:

with go version go1.4.2 linux/amd64:

% go build -x -o /dev/null ./bar.go
WORK=/tmp/go-build940372956
mkdir -p $WORK/command-line-arguments/_obj/
mkdir -p /dev/
cd /home/mpl/src/camlistore.org
/home/mpl/go1.4/pkg/tool/linux_amd64/6g -o $WORK/command-line-arguments.a -trimpath $WORK -p command-line-arguments -complete -D _/home/mpl/src/camlistore.org -I $WORK -pack ./bar.go
cd .
/home/mpl/go1.4/pkg/tool/linux_amd64/6l -o /dev/null -L $WORK -extld=gcc $WORK/command-line-arguments.a

whereas with go version go1.5 linux/amd64:

% go build -x -o /dev/null ./bar.go
WORK=/tmp/go-build128307931
mkdir -p $WORK/command-line-arguments/_obj/
mkdir -p $WORK/command-line-arguments/_obj/exe/
cd /home/mpl/src/camlistore.org
/home/mpl/go1.5/pkg/tool/linux_amd64/compile -o $WORK/command-line-arguments.a -trimpath $WORK -p main -complete -buildid c4b06a82929758039f6ab20686e934c659cc642a -D _/home/mpl/src/camlistore.org -I $WORK -pack ./bar.go
cd .
/home/mpl/go1.5/pkg/tool/linux_amd64/link -o $WORK/command-line-arguments/_obj/exe/a.out -L $WORK -extld=gcc -buildmode=exe -buildid=c4b06a82929758039f6ab20686e934c659cc642a $WORK/command-line-arguments.a
mkdir -p /dev/
cp $WORK/command-line-arguments/_obj/exe/a.out /dev/null
go install command-line-arguments: build output "/dev/null" already exists and is not an object file
@dominikh
Copy link
Member

It should be noted that before 1.4.2, it didn't work, either. See #4851 for reference.

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Aug 31, 2015
@mpl
Copy link
Contributor Author

mpl commented Aug 31, 2015

@dominikh I see, thanks.

@0xmohit
Copy link
Contributor

0xmohit commented Oct 23, 2015

@dominikh FWIW, setting build output file to /dev/null works with all go versions from 1.3 through 1.4.3; doesn't work with 1.5 & 1.5.1 (not tested with earlier versions).

@gopherbot
Copy link

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

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