Actual solution:
I reproduced the issue with:
- calling the 1.1.2
go.exe
directly (I didn't have %GOROOT%\bin
in my path)
- with
GOROOT
pointing to the previous 1.1.1 installation folder (I kept go 1.1.1 and 1.1.2 installed in separated folders).
If you are sticking with the default go setup (ie: one C:\go
installation directory, and %GOROOT%\bin
in your PATH
), you won't see this error.
But if you do see this error:
- make sure
%GOROOT%
is consistent with the go.exe
you are calling
-
go install -a
as explained below. The go clean
mentioned below won't be necessary.
As jnml comments:
the Go build system is supposed to figure out any obsolete stuff in $GOPATH/pkg
and (transitively) rebuild it on demand.
Original solution:
In the "Remove object files" section of "Command go" page, I missed the go clean -i
option:
-i
The -i
flag causes clean to remove the corresponding installed archive or binary (what 'go install' would create).
And those .a
file (like hopwatch.a) are precisely what go install generates for libraries (in Windows).
So the full clean command, to make sure go rebuild everything, would be:
cd C:\Users\VonC\prog\go\src\github.com\spf13\hugo
go clean -r -i
go install -a
That will rebuild and install everything, including all dependent packages.
The -a
is actually a build option, which forces rebuilding of packages that are already up-to-date.
As usual, go clean -r -n
would show you what would be cleaned (-n
: preview option).
It doesn't hurt to be sure of what will be deleted... before actually deleting anything.