-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go build -a rebuilds standard library on linux #12203
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
Comments
In Go 1.5 "go build -a" will rebuild the standard library if the set of source files have changed. It should not rebuild if the time is out of date but the source files have not changed. How did you install the release? CC @rsc |
Hi I'm working in a VMWare Fusion guest running Ubuntu 14.04. The under Ubuntu seems OK but I ran ntpdate manually to be sure but it didn't help. I extracted the download under a sudo shell in /usr/local with: tar xvf ~/Downloads/go1.5.linux-amd64.tar.gz I just tried against but this time with: tar xpvf ~/Downloads/go1.5.linux-amd64.tar.gz but the issue remains. When I rebuild my gofarmhash package it tries to rebuild runtime. The files in pkg/linux_amd64/runtime are all newer than the files in src/runtime: pkg/linux_amd64/runtime: src/runtime/: but still they are rebuilt. |
Do you have GOROOT set in the environment? If not, what do you see in the directory printed by "go env GOROOT"? |
Hi I dont have GOROOT set in my environment $ go env GOROOT |
I just deleted /usr/local/go, reinstalled go 1.4.2 and "go build -v -a" does not build the system libraries. So it is unlikely to be an issue with my system causing the problem with go 1.5 |
I believe its actually now the expected behaviour after reading: https://go-review.googlesource.com/#/c/10761/ cmd/go: make -a apply to the standard library, like in Go 1.3 So consider this issue closed |
CL https://golang.org/cl/13799 mentions this issue. |
@mikioh, why are you re-opening this? The new behavior is intentional. @ianlancetaylor is just fixing a documentation bug. |
I see, CL 13799 is just an update. |
This changed in https://golang.org/cl/10761. Update #12203. Change-Id: Ia37ebb7ecba689ad3cb2559213d675f21cf03a95 Reviewed-on: https://go-review.googlesource.com/13799 Reviewed-by: Russ Cox <[email protected]>
CL https://golang.org/cl/14226 mentions this issue. |
This changed in https://golang.org/cl/10761. Update #12203. Change-Id: Ia37ebb7ecba689ad3cb2559213d675f21cf03a95 Reviewed-on: https://go-review.googlesource.com/13799 Reviewed-by: Russ Cox <[email protected]> Reviewed-on: https://go-review.googlesource.com/14226 Reviewed-by: Minux Ma <[email protected]>
Just trying out the newly released go 1.5 on Linux (Ubuntu 14.04) and found that:
go build -v -a
reports rebuilding everything including every standard library file I use. Pre-1.5 the standard library wasn't mentioned. Note that when I ran the above "go build..." I did not have permission to write to /usr/local/go/
go build -v -a -x
shows standard library being rebuilt:
$ go build -v -a -x
WORK=/tmp/go-build359871788
runtime
mkdir -p $WORK/runtime/_obj/
mkdir -p $WORK/
cd /usr/local/go/src/runtime
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/runtime.a -trimpath $WORK -p runtime -+ -buildid 6d5354bd14cc24df376bca66e501e715c0c9847b -D _/usr/local/go/src/runtime -I $WORK -pack -asmhdr $WORK/runtime/_obj/go_asm.h ./alg.go ./arch1_amd64.go ./arch_amd64.go ./atomic_amd64x.go ./atomic_pointer.go ./cgo.go ./cgocall.go ./cgocallback.go ./chan.go ./compiler.go ./complex.go ./cpuprof.go ./cputicks.go ./debug.go ./defs_linux_amd64.go ./env_posix.go ./error.go ./extern.go ./hash64.go ./hashmap.go ./hashmap_fast.go ./heapdump.go ./iface.go ./lfstack.go ./lfstack_amd64.go ./lock_futex.go ./malloc.go ./mbarrier.go ./mbitmap.go ./mcache.go ./mcentral.go ./mem_linux.go ./mfinal.go ./mfixalloc.go ./mgc.go ./mgcmark.go ./mgcsweep.go ./mgcwork.go ./mheap.go ./mprof.go ./msize.go ./mstats.go ./netpoll.go ./netpoll_epoll.go ./os1_linux.go ./os2_linux.go ./os_linux.go ./panic.go ./panic1.go ./parfor.go ./print1.go ./print1_write.go ./proc.go ./proc1.go ./race0.go ./rdebug.go ./rune.go ./runtime.go ./runtime1.go ./runtime2.go ./select.go ./sema.go ./signal1_unix.go ./signal_amd64x.go ./signal_linux.go ./signal_linux_amd64.go ./signal_unix.go ./sigpanic_unix.go ./sigqueue.go ./slice.go ./softfloat64.go ./sqrt.go ./stack1.go ./stack2.go ./string.go ./string1.go ./stubs.go ./stubs2.go ./symtab.go ./sys_x86.go ./time.go ./trace.go ./traceback.go ./type.go ./typekind.go ./typekind1.go ./unaligned1.go ./vdso_linux_amd64.go ./wbfat.go ./zgoarch_amd64.go ./zgoos_linux.go ./zversion.go
/usr/local/go/pkg/tool/linux_amd64/asm -o $WORK/runtime/_obj/asm.o -trimpath $WORK -I $WORK/runtime/_obj/ -I /usr/local/go/pkg/include -D GOOS_linux -D GOARCH_amd64 ./asm.s
/usr/local/go/pkg/tool/linux_amd64/asm -o $WORK/runtime/_obj/asm_amd64.o -trimpath $WORK -I $WORK/runtime/_obj/ -I /usr/local/go/pkg/include -D GOOS_linux -D GOARCH_amd64 ./asm_amd64.s
/usr/local/go/pkg/tool/linux_amd64/asm -o $WORK/runtime/_obj/duff_amd64.o -trimpath $WORK -I $WORK/runtime/_obj/ -I /usr/local/go/pkg/include -D GOOS_linux -D GOARCH_amd64 ./duff_amd64.s
/usr/local/go/pkg/tool/linux_amd64/asm -o $WORK/runtime/_obj/memclr_amd64.o -trimpath $WORK -I $WORK/runtime/_obj/ -I /usr/local/go/pkg/include -D GOOS_linux -D GOARCH_amd64 ./memclr_amd64.s
/usr/local/go/pkg/tool/linux_amd64/asm -o $WORK/runtime/_obj/memmove_amd64.o -trimpath $WORK -I $WORK/runtime/_obj/ -I /usr/local/go/pkg/include -D GOOS_linux -D GOARCH_amd64 ./memmove_amd64.s
/usr/local/go/pkg/tool/linux_amd64/asm -o $WORK/runtime/_obj/rt0_linux_amd64.o -trimpath $WORK -I $WORK/runtime/_obj/ -I /usr/local/go/pkg/include -D GOOS_linux -D GOARCH_amd64 ./rt0_linux_amd64.s
/usr/local/go/pkg/tool/linux_amd64/asm -o $WORK/runtime/_obj/sys_linux_amd64.o -trimpath $WORK -I $WORK/runtime/_obj/ -I /usr/local/go/pkg/include -D GOOS_linux -D GOARCH_amd64 ./sys_linux_amd64.s
pack r $WORK/runtime.a $WORK/runtime/_obj/asm.o $WORK/runtime/_obj/asm_amd64.o $WORK/runtime/_obj/duff_amd64.o $WORK/runtime/_obj/memclr_amd64.o $WORK/runtime/_obj/memmove_amd64.o $WORK/runtime/_obj/rt0_linux_amd64.o $WORK/runtime/_obj/sys_linux_amd64.o # internal
...
$ go version
go version go1.5 linux/amd64
The text was updated successfully, but these errors were encountered: