10

I am running Eclipse 4.6.3 with GoClipse and NodeClipse installed. I have configured Go in Preferences -> Go.

I want autocomplete to work for Go. However, it is giving me the error: writing to process input broken pipe

See screenshots below for error and configuration.

Error

Go

enter image description here

How do I fix this problem?

  • 1
    I would seriously reconsider using Eclipse. Instead look at gogland if you want a complete IDE. – Adam Dymitruk Jul 13 '17 at 20:23
  • @AdamDymitruk agreed but for unmentioned reasons here I have to use Eclipse unfortunately –  Jul 13 '17 at 20:24
  • some stacks you should check as this error doesn't seem language specific. This is more of a general issue with eclipse. https://stackoverflow.com/questions/12871947/eclipse-warning-problems-during-content-assist https://stackoverflow.com/questions/10706430/eclipse-content-assist-error https://www.eclipse.org/forums/index.php/t/367694/ That all being said and shown, you will likely have better turn around asking in an eclipse only community. – reticentroot Jul 17 '17 at 15:51
  • 1
    I guess the executables for `gocode`, `guru` and `godef` that you specify in the preferences were incorrect. The executables should be `$GOPATH/bin/gocode`, `$GOPATH/bin/guru` and `$GOPATH/bin/godef` (replace `$GOPATH` with real path). Don't forget to install those tools. – putu Jul 17 '17 at 18:03
  • @putu is correct. This is at least part of your problem. The `.go` files are most definitely not executable. – RayfenWindspear Jul 17 '17 at 20:19
  • @putu your comment actually solved the problem for me. I already installed those but just didn't point to the right places. If you post an answer I will accept it –  Jul 18 '17 at 14:03
  • The answer is provided by @mhutter. Please accept it. – putu Jul 18 '17 at 23:20
  • @putu done thanks guys –  Jul 19 '17 at 18:43

1 Answers1

7

At least on the second page, all of the paths seem wrong. You supplied the path to the source code where the dialog asks for the path to the executable.

To make sure you have all the tools installed run the following commands in the terminal:

go get -u github.com/nsf/gocode
go get -u golang.org/x/tools/cmd/guru
go get -u github.com/rogpeppe/godef

Now, for each of the tools run

which <tool>
# example:
which guru
# => /Users/user/gocode/bin/gocode

Copy the output into the Executable: field in the config screen.

For gofmt you should be able to simply tick "Use default location"

mhutter
  • 2,369
  • 17
  • 26
  • I just noticed the same was discussed in the comments (which I blatantly ignored). If @putu wants to add this as an answer I'll delete mine. – mhutter Jul 18 '17 at 14:19