26

I was using Go 1.3.3. After installing 1.4, there are many errors similar to this:

db/base.go:4: import /home/asd/Dropbox/go/pkg/linux_amd64/projc1/libs/Bool.a: 
 object is [linux amd64 go1.3.3 X:precisestack] 
  expected [linux amd64 go1.4 X:precisestack]

How do I resolve this? I've tried go build on $GOPATH/src/projc1/libs/Bool/ but it has no effect.

Rick-777
  • 9,714
  • 5
  • 34
  • 50
Kokizzu
  • 24,974
  • 37
  • 137
  • 233

2 Answers2

31

You're probably looking for go build -a to force rebuilding of existing packages.

dyoo
  • 11,795
  • 1
  • 34
  • 44
12

Ah I see, removing /home/asd/Dropbox/go/pkg/linux_amd64/projc1/ would solve this problem.

Kokizzu
  • 24,974
  • 37
  • 137
  • 233
  • 3
    Removing already compiled packages will solve the error message, but the packages are not recompiled automatically so every 'go build' recompiles every package. 'go install' should compile and save the package for later reuse. – siritinga Dec 16 '14 at 11:46