3

In the middle of a development session, this stupid behavior started and now it looks permanent. I have no idea what happened:

[dtrombley@sleet bin]$ echo $GOROOT
/usr/lib/golang
[dtrombley@sleet bin]$ echo $GOPATH
/home/dtrombley/go/
[dtrombley@sleet bin]$ ./liteide

liteide build error:

 ../../github.com/Sirupsen/logrus/writer.go:4:2: cannot find package "bufio" in any of:
/home/dtrombley/go/src/bufio (from $GOROOT)
/home/dtrombley/go/src/bufio (from $GOPATH)

What? Why is it using GOPATH in place of GOROOT? This used to work, and mysteriously switched to broken while liteide was running, from one build to the next, literally a few seconds later...

Has anyone seen this? Is there some way I can inspect/set the GOROOT within liteide?

[Edit] Further weirdness: I thought the / at the end of GOPATH might be confusing it, so I removed that. Now:

 [dtrombley@sleet bin]$ echo $GOROOT
 /usr/lib/golang
 [dtrombley@sleet bin]$ echo $GOPATH
 /home/dtrombley/go
 [dtrombley@sleet bin]$ ./liteide

...

warning: GOPATH set to GOROOT (/home/dtrombley/go) has no effect
../../github.com/Sirupsen/logrus/writer.go:4:2: cannot find package "bufio" in any of:
/home/dtrombley/go/src/bufio (from $GOROOT)
($GOPATH not set)

Misery.

BadZen
  • 4,083
  • 2
  • 25
  • 48

1 Answers1

2

You can check if GOROOT is set at all in /usr/share/liteide/liteenv/linux*.env (which can be an issue as reported in here)
You can also check if GOROOT is set in other place as well.

Finally check if the issue persists with the latest liteide (x27.2.1).


The OP BadZen confirms in the comments:

It switched in the middle of the session because I must have stray clicked and switched my target from linux64 to linux32 - the linux32.env had the buggy GOROOT entry (GOROOT=$HOME/go).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Ah, yeah, that was the problem. It switched in the middle of the session because I must have stray clicked and switched my target from linux64 to linux32 - the linux32.env had the buggy GOROOT entry (GOROOT=$HOME/go). Ugh, that should not override environment. TYVM – BadZen May 08 '15 at 07:39
  • @BadZen Great! I have included your comment in the answer for more visibility. – VonC May 08 '15 at 07:42