Problem installing the gocode for goclipse

429 views
Skip to first unread message

Amitabh Arya

unread,
Mar 10, 2012, 4:08:40 PM3/10/12
to golan...@googlegroups.com
Hi

            I have Ubuntu 64bit OS, Go language and goclipse are working fine. But when I am trying to install the gocode for goclipse with following command: 

Getting error as go command not found in my terminal. 

Can any one suggest me the solution.

Also I didn't install the google app engine. Do I really need to install the google app engine. if yes then why? 

Graham Anderson

unread,
Mar 10, 2012, 4:17:23 PM3/10/12
to golan...@googlegroups.com
On Saturday 10 Mar 2012 13:08:40 Amitabh Arya wrote:
> Getting error as go command not found in my terminal.

Sounds like Go is not correctly installed/configured in your environment. See
the docs for correct setup:

http://weekly.golang.org/doc/install

Amitabh Arya

unread,
Mar 11, 2012, 11:58:50 AM3/11/12
to golan...@googlegroups.com
I am actually using 6g compiler and the document you are suggesting, is for different compiler. I again install the go from source as documented. "http://weekly.golang.org/doc/install/source"
And as before I am able to run my programs with, "6g then 6l and then 6.out" way.. not the other way "go run" 

So Do I need to install the other compiler GCC. And without it I can not use "gocode". Because with GCC, I am not able to set the Goclipse.

I have source code of gocode. And I think I just need to compile it to go/bin folder.

Please suggest me the better idea. All suggestions are welcome. 

Peter Bourgon

unread,
Mar 11, 2012, 12:02:32 PM3/11/12
to Amitabh Arya, golan...@googlegroups.com
The "go" tool is only in the "weekly" releases of Go, which you are
probably not running. Change to your go src directory and run

hg ident

Graham Anderson

unread,
Mar 11, 2012, 12:19:20 PM3/11/12
to golan...@googlegroups.com
On Sunday 11 Mar 2012 08:58:50 Amitabh Arya wrote:
> I am actually using 6g compiler and the document you are suggesting, is for
> different compiler. I again install the go from source as documented. "
> http://weekly.golang.org/doc/install/source"
> And as before I am able to run my programs with, "6g then 6l and then
> 6.out" way.. not the other way "go run"

The instructions you list above to install from source will install the last
stable release r60.3, the "go" tool is not available in that release. You will
need a newer release (weekly).

> So Do I need to install the other compiler GCC. And without it I can not
> use "gocode". Because with GCC, I am not able to set the Goclipse.

No you don't need gccgo.

Clean out your installation location then either use the same instructions you
pasted above (weekly.golang.org/doc/install/source) but instead of cloning and
updating to the release branch update to the latest weekly release. Go 1 is
not far away and I'd recommend using latest weekly as there have been
significant language changes sinece r60.3 release.

hg clone -u weekly https://code.google.com/p/go

Alternativley, instead of starting from the begining you may simply nuke your
install locations and in the source tree do:

$ hg update weekly
$ cd go/src
$ ./all.bash



> I have source code of gocode. And I think I just need to compile it to
> go/bin folder.

When you have built and installed the weekly release, make sure the gocode
source is located in the following directory:

$GOPATH/src/github.com/nsf/gocode

Then build gocode with:

go build -v github.com/nsf/gocode...

Alternatively just grab the latest and install using go get

go get github.com/nsf/gocode


Graham Anderson

unread,
Mar 11, 2012, 12:21:06 PM3/11/12
to golan...@googlegroups.com
On Sunday 11 Mar 2012 17:19:20 you wrote:
> Then build gocode with:
>
> go build -v github.com/nsf/gocode...

Sorry that should be:

go install -v github.com/nsf/gocode...

Amitabh Arya

unread,
Mar 11, 2012, 3:10:06 PM3/11/12
to golan...@googlegroups.com
Seems its too hard to install the gocode for me lol. I did all that and when I am running following command ( $ ./all.bash) after update, getting following error

/home/amitabh/go/src/pkg/runtime/zruntime_defs_linux_amd64.go:54: too many errors
go tool dist: FAILED: /home/amitabh/go/pkg/tool/linux_amd64/6g -o $WORK/_go_.6 -p runtime -+ /home/amitabh/go/src/pkg/runtime/debug.go /home/amitabh/go/src/pkg/runtime/error.go /home/amitabh/go/src/pkg/runtime/extern.go /home/amitabh/go/src/pkg/runtime/mem.go /home/amitabh/go/src/pkg/runtime/runtime_defs.go /home/amitabh/go/src/pkg/runtime/softfloat64.go /home/amitabh/go/src/pkg/runtime/type.go /home/amitabh/go/src/pkg/runtime/zgoarch_amd64.go /home/amitabh/go/src/pkg/runtime/zgoos_linux.go /home/amitabh/go/src/pkg/runtime/zruntime_defs_linux_amd64.go /home/amitabh/go/src/pkg/runtime/zversion.go
amitabh@ubuntu:~/go/src$ go
go: command not found

Amitabh Arya

unread,
Mar 11, 2012, 3:30:07 PM3/11/12
to golan...@googlegroups.com
Also at update, it has deleted my compiler 6g. Was this expected or something went wrong.  Attaching complete terminal command I run (as log file). Please check. Thanks for your support Graham.
ternimalLog.txt

DisposaBoy

unread,
Mar 11, 2012, 3:58:49 PM3/11/12
to golan...@googlegroups.com
The error about redeclaration suggests you might have old files still lying around. have you tried explcitly clear(deleting) everything in the `go` directory to ensure a clean install?
Reply all
Reply to author
Forward
0 new messages