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: 'build -v' shows no output when linking a binary on 1.10rc1 #23718

Closed
meilihao opened this issue Feb 6, 2018 · 6 comments
Closed

cmd/go: 'build -v' shows no output when linking a binary on 1.10rc1 #23718

meilihao opened this issue Feb 6, 2018 · 6 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.

Comments

@meilihao
Copy link

meilihao commented Feb 6, 2018

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

go version go1.10rc1 linux/amd64

Does this issue reproduce with the latest release?

go1.9.2 is ok

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/chen/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/chen/git/go"
GORACE=""
GOROOT="/opt/go"
GOTMPDIR=""
GOTOOLDIR="/opt/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-build935946469=/tmp/go-build -gno-record-gcc-switches"

What did you do?

first is no binary in package.

> ~/g/g/s/g/m/micro on master ◦ pwd                                                                                                                                                                        
/home/chen/git/go/src/github.com/micro/micro
⋊> ~/g/g/s/g/m/micro on master ◦ ls                                                                                                                                                                        
api/  bot/  car/  cli/  cmd/  Dockerfile  internal/  LICENSE  main.go  new/  plugin/  README.md  run/  web/
⋊> ~/g/g/s/g/m/micro on master ◦ go build -v                                                                                                                                                                
⋊> ~/g/g/s/g/m/micro on master ⨯ ls                                                                                                                                                                         
api/  bot/  car/  cli/  cmd/  Dockerfile  internal/  LICENSE  main.go  micro*  new/  plugin/  README.md  run/  web/

What did you expect to see?

build log

What did you see instead?

no output

@mvdan
Copy link
Member

mvdan commented Feb 6, 2018

This might be related to the build cache. I have seen similar cases where a binary is linked, yet go build -v does not print anything. I presume this is because -v only prints a package name if it's being compiled, not linked. So if all that needs doing is linking thanks to the cache, that could explain why nothing is printed.

/cc @rsc @myitcv

@mvdan mvdan changed the title go build -v no output on go1.10rc1 cmd/go: 'build -v' shows no output when linking a binary on 1.10rc1 Feb 6, 2018
@mvdan mvdan added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Feb 6, 2018
@ianlancetaylor
Copy link
Contributor

What is the output of GOCACHE=off go build -v?

@ianlancetaylor
Copy link
Contributor

It's also now affected by which packages have been installed. To see the old results use go build -v -a.

@meilihao
Copy link
Author

meilihao commented Feb 7, 2018

@ianlancetaylor GOCACHE=off go build -v is ok, please update go1.10.html.

@meilihao
Copy link
Author

meilihao commented Feb 7, 2018

And what is the mechanism of GOCACHE?

@ianlancetaylor
Copy link
Contributor

The cache is already mentioned in the release notes (https://tip.golang.org/doc/go1.10#build), and it points to https://tip.golang.org/cmd/go/#hdr-Build_and_test_caching which documents GOCACHE. I don't think there is anything else to do here. Closing.

@golang golang locked and limited conversation to collaborators Feb 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

4 participants