Unable to build source on Ubuntu 16.04
Description
Hi,
I have cloned eclipse che repository and then I have tried to compile it. Unfortunately the compilation process stops giving an error.
Reproduction Steps
I have tried to compile it with mvn clean install on the project root. I also tried with sudo but without sucess :(
OS and version:
Ubuntu: 16.04 Java: java version "1.8.0_171" GO: go1.9.6 linux/amd64 node: v8.11.1 npm: 6.0.1 python: Python 2.7.12 docker: Docker version 18.03.1-ce, build 9ee9f40
Diagnostics:
[ERROR] Failed to execute goal com.soebes.maven.plugins:iterator-maven-plugin:0.5.0:iterator (compile-go-agents) on project bootstrapper: Command execution failed.: Cannot run program "go" (in directory "/home/mtavares/Projetos/PE/VF-OS/che/agents/bootstrapper/target/go-workspace/src/github.com/eclipse/che/agents/go-agents/bootstrapper"): error=2, No such file or directory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn
The directory exists, If I type "ls" this is the folder's content booter cfg main.go
I also tried to do "go build" in that directory and I have the following result.
go build main.go:18:2: cannot find package "github.com/eclipse/che/agents/go-agents/bootstrapper/booter" in any of: /usr/local/go/src/github.com/eclipse/che/agents/go-agents/bootstrapper/booter (from $GOROOT) /home/mtavares/go/src/github.com/eclipse/che/agents/go-agents/bootstrapper/booter (from $GOPATH) main.go:19:2: cannot find package "github.com/eclipse/che/agents/go-agents/bootstrapper/cfg" in any of: /usr/local/go/src/github.com/eclipse/che/agents/go-agents/bootstrapper/cfg (from $GOROOT) /home/mtavares/go/src/github.com/eclipse/che/agents/go-agents/bootstrapper/cfg (from $GOPATH) main.go:20:2: cannot find package "github.com/eclipse/che/agents/go-agents/core/jsonrpc" in any of: /usr/local/go/src/github.com/eclipse/che/agents/go-agents/core/jsonrpc (from $GOROOT) /home/mtavares/go/src/github.com/eclipse/che/agents/go-agents/core/jsonrpc (from $GOPATH) main.go:21:2: cannot find package "github.com/eclipse/che/agents/go-agents/core/jsonrpc/jsonrpcws" in any of: /usr/local/go/src/github.com/eclipse/che/agents/go-agents/core/jsonrpc/jsonrpcws (from $GOROOT) /home/mtavares/go/src/github.com/eclipse/che/agents/go-agents/core/jsonrpc/jsonrpcws (from $GOPATH) main.go:22:2: cannot find package "github.com/eclipse/che/agents/go-agents/core/process" in any of: /usr/local/go/src/github.com/eclipse/che/agents/go-agents/core/process (from $GOROOT) /home/mtavares/go/src/github.com/eclipse/che/agents/go-agents/core/process (from $GOPATH)
Could you please help me with this issue please?
@mstavares probably go isn't correctly installed. Check GOPATH or GOROOT.
https://github.com/eclipse/che/issues/4181
Hi,
Which path should I set for those variables? Right now my GOPATH is equals to my HOME variable
Here https://golang.org/cmd/go/#hdr-GOPATH_environment_variable "GOPATH=/home/user/go
/home/user/go/ src/ foo/ bar/ (go code in package bar) x.go quux/ (go code in package main) y.go bin/ quux (installed command) pkg/ linux_amd64/ foo/ bar.a (installed package object) " The structure that I have in that eclipse che module is:
booter cfg main.go
Hi,
I have already found a solution. I just linked the go-workspace to my GOPATH and it seems ok.
Thanks,