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: goroot exception in stale computation does not trigger when GOROOT=$HOME/go/src/.. #12000

Closed
dvyukov opened this issue Aug 3, 2015 · 4 comments

Comments

@dvyukov
Copy link
Member

dvyukov commented Aug 3, 2015

After running make.bash standard packages are not installed, I need to run go install std to install them:

~/src/go/src$ git status
# On branch master
# Your branch is up-to-date with 'origin/master'.
#
nothing to commit, working directory clean

~/src/go/src$ env | grep GO
GOROOT=/usr/local/google/home/dvyukov/src/go/src/..
GOPATH=/usr/local/google/home/dvyukov/src/gopath

~/src/go/src$ ./make.bash
##### Building Go bootstrap tool.
cmd/dist

##### Building Go toolchain using /usr/local/google/home/dvyukov/go1.4.
bootstrap/internal/obj
bootstrap/asm/internal/flags
bootstrap/compile/internal/big
bootstrap/internal/gcprog
bootstrap/internal/obj/arm
bootstrap/internal/obj/arm64
bootstrap/internal/obj/ppc64
bootstrap/internal/obj/x86
bootstrap/asm/internal/lex
bootstrap/link/internal/ld
bootstrap/compile/internal/gc
bootstrap/asm/internal/arch
bootstrap/asm/internal/asm
bootstrap/asm
bootstrap/link/internal/amd64
bootstrap/link/internal/arm
bootstrap/link/internal/arm64
bootstrap/link/internal/ppc64
bootstrap/link/internal/x86
bootstrap/link
bootstrap/compile/internal/amd64
bootstrap/compile/internal/arm
bootstrap/compile/internal/arm64
bootstrap/compile/internal/ppc64
bootstrap/compile/internal/x86
bootstrap/compile

##### Building go_bootstrap for host, linux/amd64.
runtime
errors
sync/atomic
sync
internal/singleflight
io
unicode
unicode/utf8
unicode/utf16
bytes
math
strings
strconv
bufio
sort
container/heap
encoding/base64
syscall
internal/syscall/windows/registry
time
internal/syscall/windows
os
reflect
fmt
encoding
encoding/binary
encoding/json
flag
path/filepath
path
io/ioutil
log
regexp/syntax
regexp
go/token
go/scanner
go/ast
go/parser
os/exec
os/signal
net/url
text/template/parse
text/template
go/doc
go/build
hash
crypto
crypto/sha1
debug/dwarf
debug/elf
cmd/go

##### Building packages and commands for linux/amd64.
runtime
sync/atomic
unicode
errors
unicode/utf8
math
sort
container/list
container/ring
crypto/subtle
encoding
image/color
unicode/utf16
runtime/race
cmd/vet/whitelist
sync
container/heap
image/color/palette
io
internal/singleflight
syscall
hash
crypto/cipher
runtime/trace
hash/crc32
hash/adler32
crypto/hmac
hash/crc64
hash/fnv
bytes
strings
bufio
text/tabwriter
path
html
strconv
math/rand
math/cmplx
time
internal/syscall/unix
compress/bzip2
reflect
regexp/syntax
crypto
crypto/aes
crypto/rc4
encoding/base64
encoding/ascii85
encoding/base32
image
crypto/sha512
crypto/md5
crypto/sha1
crypto/sha256
encoding/pem
os
image/internal/imageutil
image/draw
image/jpeg
regexp
os/signal
path/filepath
io/ioutil
os/exec
encoding/binary
fmt
cmd/pprof/internal/svg
crypto/des
index/suffixarray
cmd/internal/rsc.io/x86/x86asm
log
cmd/internal/rsc.io/arm/armasm
debug/gosym
flag
debug/dwarf
debug/plan9obj
archive/tar
compress/flate
compress/lzw
math/big
encoding/hex
go/token
database/sql/driver
encoding/csv
encoding/gob
encoding/json
mime
encoding/xml
mime/quotedprintable
net/http/internal
net/url
text/template/parse
text/scanner
runtime/pprof
internal/trace
net/internal/socktest
runtime/debug
cmd/compile/internal/big
cmd/internal/gcprog
cmd/pprof/internal/tempfile
testing/iotest
cmd/pack
go/scanner
image/gif
database/sql
cmd/internal/obj
testing/quick
cmd/asm/internal/flags
cmd/dist
go/ast
testing
archive/zip
compress/gzip
compress/zlib
image/png
text/template
cmd/pprof/internal/profile
internal/testenv
crypto/elliptic
encoding/asn1
crypto/dsa
crypto/rand
go/constant
debug/elf
debug/macho
debug/pe
cmd/internal/obj/ppc64
cmd/internal/obj/arm64
cmd/internal/obj/arm
cmd/internal/goobj
cmd/internal/obj/x86
cmd/asm/internal/lex
cmd/compile/internal/gc
go/parser
go/printer
crypto/rsa
crypto/x509/pkix
crypto/ecdsa
html/template
go/doc
cmd/internal/objfile
cmd/link/internal/ld
cmd/pprof/internal/plugin
cmd/pprof/internal/symbolz
cmd/pprof/internal/symbolizer
go/types
cmd/cgo
internal/format
cmd/addr2line
cmd/nm
cmd/objdump
cmd/asm/internal/arch
go/build
go/format
cmd/gofmt
cmd/fix
cmd/yacc
cmd/pprof/internal/report
cmd/asm/internal/asm
cmd/cover
cmd/doc
cmd/newlink
cmd/asm
cmd/pprof/internal/commands
cmd/pprof/internal/driver
go/internal/gccgoimporter
go/internal/gcimporter
cmd/api
cmd/link/internal/amd64
cmd/link/internal/arm
cmd/link/internal/arm64
cmd/link/internal/ppc64
cmd/link/internal/x86
runtime/cgo
go/importer
cmd/vet
cmd/link
net
os/user
crypto/x509
net/textproto
log/syslog
mime/multipart
net/mail
crypto/tls
cmd/compile/internal/amd64
cmd/compile/internal/arm
cmd/compile/internal/arm64
cmd/compile/internal/ppc64
cmd/compile/internal/x86
net/http
net/smtp
cmd/compile
net/http/cgi
expvar
net/http/cookiejar
net/http/httptest
net/http/httputil
net/http/pprof
net/rpc
cmd/go
cmd/pprof/internal/fetch
cmd/trace
cmd/pprof
net/http/fcgi
net/rpc/jsonrpc


---
Installed Go for linux/amd64 in /usr/local/google/home/dvyukov/src/go
Installed commands in /usr/local/google/home/dvyukov/src/go/bin

~/src/go/src$ go install -v std
runtime
sync/atomic
unicode
errors
unicode/utf8
math
sort
container/list
container/ring
crypto/subtle
encoding
unicode/utf16
image/color
runtime/race
sync
container/heap
image/color/palette
io
syscall
internal/singleflight
crypto/cipher
hash
runtime/trace
hash/crc32
hash/adler32
crypto/hmac
hash/crc64
hash/fnv
bytes
strings
strconv
math/rand
math/cmplx
bufio
text/tabwriter
path
html
time
internal/syscall/unix
compress/bzip2
reflect
crypto
crypto/aes
crypto/rc4
encoding/base64
encoding/ascii85
encoding/base32
regexp/syntax
image
crypto/md5
crypto/sha512
crypto/sha1
crypto/sha256
encoding/pem
os
image/internal/imageutil
image/draw
image/jpeg
regexp
path/filepath
os/signal
fmt
encoding/binary
io/ioutil
os/exec
crypto/des
index/suffixarray
compress/flate
compress/lzw
archive/tar
math/big
encoding/hex
debug/dwarf
flag
go/token
database/sql/driver
debug/gosym
debug/plan9obj
encoding/csv
encoding/gob
encoding/json
encoding/xml
log
mime
mime/quotedprintable
net/http/internal
net/url
text/template/parse
text/scanner
runtime/pprof
internal/trace
net/internal/socktest
runtime/debug
image/gif
go/scanner
database/sql
testing/iotest
testing/quick
testing
go/ast
archive/zip
compress/gzip
compress/zlib
image/png
text/template
internal/testenv
debug/elf
debug/pe
debug/macho
crypto/dsa
encoding/asn1
crypto/elliptic
crypto/rand
go/constant
go/parser
go/printer
crypto/rsa
crypto/ecdsa
crypto/x509/pkix
go/doc
html/template
go/types
runtime/cgo
internal/format
go/format
go/build
net
os/user
go/internal/gccgoimporter
go/internal/gcimporter
go/importer
crypto/x509
net/textproto
log/syslog
mime/multipart
net/mail
crypto/tls
net/http
net/smtp
expvar
net/http/cgi
net/http/cookiejar
net/http/httptest
net/http/httputil
net/http/pprof
net/rpc
net/http/fcgi
net/rpc/jsonrpc

~/src/go/src$ go install -v std

~/src/go/src$ go version
go version devel +e3c26b2 Mon Aug 3 16:06:52 2015 +0000 linux/amd64
@ianlancetaylor ianlancetaylor added this to the Go1.5 milestone Aug 3, 2015
@rsc rsc changed the title make.bash: does not install std packages cmd/go: packages appear stale after 'go install std cmd' Aug 3, 2015
@rsc
Copy link
Contributor

rsc commented Aug 3, 2015

They are most definitely installed. However, they look out-of-date for some reason. I can reproduce this on my linux/amd64 workstation. I cannot reproduce it on my darwin/amd64 MacBook Pro. I suspect something about mtimes.

@rsc
Copy link
Contributor

rsc commented Aug 3, 2015

The problem is that you have GOROOT set to $HOME/go/src/.. instead of $HOME/go. Don't do that. I will fix this bug but not for Go 1.5.

@rsc rsc modified the milestones: Go1.6Early, Go1.5 Aug 3, 2015
@rsc rsc changed the title cmd/go: packages appear stale after 'go install std cmd' cmd/go: packages appear stale after 'go install std cmd' with GOROOT=$HOME/go/src/.. Aug 3, 2015
@rsc rsc changed the title cmd/go: packages appear stale after 'go install std cmd' with GOROOT=$HOME/go/src/.. cmd/go: goroot exception in stale computation does not trigger when GOROOT=$HOME/go/src/.. Aug 3, 2015
@dvyukov
Copy link
Member Author

dvyukov commented Aug 3, 2015

I don't do this specially. I have a script that sets up environment when executed from go/src dir, it sets GOROOT to $PWD/..

@rsc
Copy link
Contributor

rsc commented Nov 5, 2015

Duplicate of #12690 (vice versa, really, but there's a CL out for 12690).

@rsc rsc closed this as completed Nov 5, 2015
@golang golang locked and limited conversation to collaborators Nov 4, 2016
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

4 participants