Closed PYMartres closed 5 years ago
The file empty.proto exist under /home/ubuntu/go/src/github.com/golang/protobuf/ptypes/empty/ and ~/go/src/github.com/CS-SI/SafeScale/vendor/github.com/golang/protobuf/ptypes/empty/
I'm currently trying to build the "development" branch.
Hello,
can you try building SafeScale as a regular user ( without sudo
) ?
If it fails, can you send us the output of env
command ?
Same result running the command as a regular user (ubuntu). Here's the result of env command:
LESSCLOSE=/bin/lesspipe %s %s LANG=C.UTF-8 DISPLAY=:10.0 OLDPWD=/home/ubuntu/go/src/github.com/CS-SI COLORTERM=truecolor SSH_AUTH_SOCK=/tmp/ssh-0RCjNZaS2J7a/agent.1532 XDG_SESSION_ID=c3 XRDP_SOCKET_PATH=/var/run/xrdp/sockdir USER=ubuntu GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/eec25f1a_54db_490f_aec8_278281c19b26 PULSE_SCRIPT=/etc/xrdp/pulse/default.pa PWD=/home/ubuntu/go/src/github.com/CS-SI/SafeScale HOME=/home/ubuntu UID=1000 SSH_AGENT_PID=1590 QT_ACCESSIBILITY=1 XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop GTK_MODULES=gail:atk-bridge SHELL=/bin/bash VTE_VERSION=5202 TERM=xterm-256color GNOME_TERMINAL_SERVICE=:1.48 SHLVL=1 LOGNAME=ubuntu DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus XDG_RUNTIME_DIR=/run/user/1000 PATH=/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin:/home/ubuntu/go/bin SESSION_MANAGER=local/ip-172-31-44-134:@/tmp/.ICE-unix/1599,unix/ip-172-31-44-134:/tmp/.ICE-unix/1599 XRDPSESSION=1 LESSOPEN=| /bin/lesspipe %s =/usr/bin/env
Do a
export GOPATH=$HOME/go
then
make all
Please let us know if it solves your issue ;)
I applied the full build procedure from scratch, here is my build log:
make all [INFO] Build begins... [INFO] Testing tool prerequisites, target ground [INFO] Testing prerequisites, target getdevdeps [INFO] Checking versions, target ensure [INFO] Downloading all dependencies from zero, this is gonna take a while..., target ensure dep: WARNING: Unknown field in manifest: prune dep: WARNING: Unknown field in manifest: prune dep: WARNING: Unknown field in manifest: prune [INFO] Running code generation, target generate protoc-gen-go: program not found or is not executable --go_out: protoc-gen-go: Plugin failed with status code 1. Makefile:23: recipe for target 'sdk' failed make[1]: [sdk] Error 1 Makefile:183: recipe for target 'generate' failed make: [generate] Error 2
It seems that GOPATH/bin is not in your PATH try this:
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
make all
Sorry but I already have errors while building : [INFO] Build begins... [INFO] Testing tool prerequisites, target ground [INFO] Testing prerequisites, target getdevdeps [INFO] Checking versions, target ensure [INFO] Updating vendor dir..., target ensure dep: WARNING: Unknown field in manifest: prune dep: WARNING: Unknown field in manifest: prune dep: WARNING: Unknown field in manifest: prune [INFO] Running code generation, target generate
../../../broker.pb.go:24:11: undefined: proto.ProtoPackageIsVersion3
../../../broker.pb.go:24:11: undefined: proto.ProtoPackageIsVersion3
/home/ubuntu/go/src/github.com/CS-SI/SafeScale/broker/broker.pb.go:24:11: undefined: proto.ProtoPackageIsVersion3 2018/11/28 14:11:23 Loading input failed: exit status 2 broker/server/services/bucket.go:28: running "mockgen": exit status 1
../../../../broker/broker.pb.go:24:11: undefined: proto.ProtoPackageIsVersion3
../../../../broker/broker.pb.go:24:11: undefined: proto.ProtoPackageIsVersion3
/home/ubuntu/go/src/github.com/CS-SI/SafeScale/broker/broker.pb.go:24:11: undefined: proto.ProtoPackageIsVersion3 2018/11/28 14:11:24 Loading input failed: exit status 2 deploy/cluster/api/api.go:52: running "mockgen": exit status 1
../../../broker/broker.pb.go:24:11: undefined: proto.ProtoPackageIsVersion3
../../../broker/broker.pb.go:24:11: undefined: proto.ProtoPackageIsVersion3
/home/ubuntu/go/src/github.com/CS-SI/SafeScale/broker/broker.pb.go:24:11: undefined: proto.ProtoPackageIsVersion3 2018/11/28 14:11:25 Loading input failed: exit status 2 deploy/install/installer.go:19: running "mockgen": exit status 1 [WARNING] Warning generating code, if RICE related, then is a false warning ! [INFO] Building providers, target providers [INFO] Building utils, target utils [INFO] Building system, target system [INFO] Building service broker, target broker
../../broker.pb.go:24:11: undefined: proto.ProtoPackageIsVersion3 Makefile:22: recipe for target 'all' failed make[3]: [all] Error 2 Makefile:12: recipe for target 'broker' failed make[2]: [broker] Error 2 Makefile:26: recipe for target 'cli' failed make[1]: [cli] Error 2 Makefile:126: recipe for target 'broker' failed make: [broker] Error 2
Can you send us the output of:
protoc --version
and
grep ProtoPackageIs broker/broker.pb.go
?
The output of protoc --version:
protoc --version libprotoc 3.6.1
The output of grep command: grep ProtoPackageIs broker/broker.pb.go const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
The binary that actually generates proker.pb.go is protoc-gen-go
, unfortunately
they don't provide version info:
https://github.com/golang/protobuf/issues/524
so we need the md5sum to make sure we are running the same binary as you do... can you send us the output of:
md5sum $(which protoc-gen-go)
and
go version
?
Here is the md5 sum: 9d7121bd9cad51719cee4764755a90f5 /home/ubuntu/go/bin/protoc-gen-go
And the go version: go version go1.10.4 linux/amd64
Is not the same protoc-gen-go version... :(
The build generates a file Gopkg.lock
In there, there are several [[projects]] sections...
we are looking for the [[projects]]
section with
name = "github.com/golang/protobuf"
can you send us that section ?
After that I'll need to make some changes in the Makefiles to prevent this from happening ever again I'll get back to you when it's done
Here is the project section from Gopkg.lock:
[[projects]] name = "github.com/golang/protobuf" packages = ["proto","protoc-gen-go","protoc-gen-go/descriptor","protoc-gen-go/generator","protoc-gen-go/generator/internal/remap","protoc-gen-go/grpc","protoc-gen-go/plugin","ptypes","ptypes/any","ptypes/duration","ptypes/empty","ptypes/timestamp"] revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" version = "v1.2.0"
Done.
Start removing previous protoc-gen-go:
rm $(which protoc-gen-go)
Then update the code, git fetch, etc...
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
make all
Everything now just builds fine, thanks for help !
Hello,
When I run the "make all" command, I have the following error, did I do something wrong ?
~/go/src/github.com/CS-SI/SafeScale$ sudo make all [INFO] Build begins... [INFO] Testing tool prerequisites, target ground [INFO] Testing prerequisites, target getdevdeps [INFO] Checking versions, target ensure [INFO] Updating vendor dir..., target ensure dep: WARNING: Unknown field in manifest: prune [INFO] Running code generation, target generate /src: warning: directory does not exist. github.com/golang/protobuf/ptypes/empty/empty.proto: File not found. broker.proto: Import "github.com/golang/protobuf/ptypes/empty/empty.proto" was not found or had errors. broker.proto:15:15: "google.protobuf.Empty" is not defined. broker.proto:16:35: "google.protobuf.Empty" is not defined. broker.proto:17:14: "google.protobuf.Empty" is not defined. broker.proto:85:36: "google.protobuf.Empty" is not defined. broker.proto:159:36: "google.protobuf.Empty" is not defined. broker.proto:160:35: "google.protobuf.Empty" is not defined. broker.proto:161:34: "google.protobuf.Empty" is not defined. broker.proto:162:36: "google.protobuf.Empty" is not defined. broker.proto:253:43: "google.protobuf.Empty" is not defined. broker.proto:254:43: "google.protobuf.Empty" is not defined. broker.proto:255:36: "google.protobuf.Empty" is not defined. broker.proto:282:33: "google.protobuf.Empty" is not defined. broker.proto:283:45: "google.protobuf.Empty" is not defined. broker.proto:284:47: "google.protobuf.Empty" is not defined. broker.proto:285:33: "google.protobuf.Empty" is not defined. broker.proto:286:14: "google.protobuf.Empty" is not defined. broker.proto:339:36: "google.protobuf.Empty" is not defined. broker.proto:340:14: "google.protobuf.Empty" is not defined. broker.proto:342:48: "google.protobuf.Empty" is not defined. Makefile:20: recipe for target 'sdk' failed make[1]: [sdk] Error 1 Makefile:181: recipe for target 'generate' failed make: [generate] Error 2
Thanks for support. Best regards.