Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

goclipse seems to be looking in /usr/local/go even If I set it to use another location in preferences #247

Closed
roshanail opened this issue Jun 4, 2017 · 6 comments

Comments

@roshanail
Copy link

I have setup go under /opt/go/v1.8.3

I wrote a simple program which prints out a message and tried to build it.

I get this error
>> Running: /opt/go/v1.8.3/bin/go clean -i -x net.arc.test/test go: cannot find GOROOT directory: /usr/local/go ^^^ Terminated, exit code: 2 ^^^
I have attached a screenshot showing my preferences and the error.

image

image

This looks like a bug.
Let me know if I made some mistake in the configuration.

@bruno-medeiros
Copy link
Contributor

What happens if you run /opt/go/v1.8.3/bin/go clean -i -x net.arc.test/test on the command line?

@ivandejanovic
Copy link

ivandejanovic commented Jun 22, 2017

I have the same issues as roshanail. Eclipse Mars with goclipse 0.14.1 works fine. Eclipse Neon with goclipse 0.16.1 reports the error. My go version is 1.8.3.

screenshot at 2017-06-22 14 51 15

screenshot at 2017-06-22 14 51 22

I created a new simple project. When i try to build from eclipse I get an error

screenshot at 2017-06-22 14 51 40

@roshanail
Copy link
Author

Here is the command line output

roshan@ARC-T470p:~/go/src$ /opt/go/v1.8.3/bin/go clean -i -x net.arc.test/test
cd /home/roshan/go/src/net.arc.test/test
rm -f test test.exe test.test test.test.exe hello hello.exe
rm -f /home/roshan/go/bin/test


roshan@ARC-T470p:~/go/src$ /opt/go/v1.8.3/bin/go install  -x net.arc.test/test
WORK=/tmp/go-build189825138
mkdir -p $WORK/net.arc.test/test/_obj/
mkdir -p $WORK/net.arc.test/test/_obj/exe/
cd /home/roshan/go/src/net.arc.test/test
/opt/go/v1.8.3/pkg/tool/linux_amd64/compile -o $WORK/net.arc.test/test.a -trimpath $WORK -p main -complete -buildid 8bda8c8360f1df2f2f79549d9b68695070b4fc76 -D _/home/roshan/go/src/net.arc.test/test -I $WORK -pack ./hello.go
cd .
/opt/go/v1.8.3/pkg/tool/linux_amd64/link -o $WORK/net.arc.test/test/_obj/exe/a.out -L $WORK -extld=gcc -buildmode=exe -buildid=8bda8c8360f1df2f2f79549d9b68695070b4fc76 $WORK/net.arc.test/test.a
mkdir -p /home/roshan/go/bin/
mv $WORK/net.arc.test/test/_obj/exe/a.out /home/roshan/go/bin/test

@bruno-medeiros
Copy link
Contributor

Okay, found it now, it has to do with a change introduced in 0.16.1 : https://github.com/GoClipse/goclipse/releases/tag/v0.16.1 , namely that the The GOROOT environment variable is no longer set. I thought the behavior introduced in 0.16.1 is the correct one, but now I'm not so sure. I think I will revert this change.

For now, as a workaround, you need to make GOROOT matches the Go installation you configured in Goclipse. (note you can either change GOROOT globally for your user, but you can also configure it per Build Target)

@lucadistefano
Copy link

How to change GOROOT globally for user? I tried to export GOROOT env variable when launching eclipse but seems is not seen by goclipse and I have not found in eclipse another place where set GOROOT .
thanks

@voinageo
Copy link

Sadly GoClipse is dead the developers stopped maintaining the plugin in 2016. I still love Eclipse but lack of Go support makes it unusable. Very Sad.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants