metaverse/truss

installation issue

sagadsalem opened this issue · 9 comments

Hi
I try to install truss I follow the steps on USAGE.md file
when I run
make dependencies
I get

fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
go get -u github.com/gogo/protobuf/protoc-gen-gogo
go get github.com/gogo/protobuf/protoc-gen-gogo: module github.com/gogo/protobuf@upgrade found (v1.3.1), but does not contain package github.com/gogo/protobuf/protoc-gen-gogo
make: *** [dependencies] Error 1

and when i run make
i get

go: github.com/metaverse/truss/cmd/truss imports
	github.com/Sirupsen/logrus: github.com/Sirupsen/logrus@v1.6.0: parsing go.mod:
	module declares its path as: github.com/sirupsen/logrus
	        but was required as: github.com/Sirupsen/logrus
make: *** [truss] Error 1

This is certainly a bit strange. Can you share a bit more a kit your environment. OS, go version, etc

Off the cuff I might suggest deleting and recloning the repo, the git errors make me think something real funky is going on.

@zaquestion my os is MacOS
go version is 1.13
i delete the repo and clone it again so many times nothing changed

@sagadsalem sorry you're running into so much trouble here. I tried out an install on a couple macs I have around, brew to install protoc and go, but otherwise just cloned truss into the gopath and ran those 2 commands without hiccup. I was running go 1.15 both time, but I saw a number of installs on mac while 1.13 was the latest. I suspect something funky is up with your go environment. 1.13 is what the CI is still running as well so I think we can rule that out, but it is a linux containerized environment.

so what you suggest?

I'd probably try blowing away my go environment and installing the latest, but im grasping at straws. Are you able to run go get other modules?

I'd clear out the modules cache $GOPATH/pkg/mod and the existing go installation and install the latest with brew.

@zaquestion thanx for fast response
no, I can't go get any other modules
also, I uninstall go and install go1.15 clear cache
still can't go get truss

so for, I manage to install truss
first of all, I turn off GO111MODULE
after that, I run go get truss
everything works fine but when I use truss get_started.proto to test the installation
I get

truss get_started.proto
FATA[0000] cannot parse input: proto files not found in importable go package: go [list -e -json -compiled=true -test=false -export=false -deps=false -find=true -- /Users/sagad/go/src/sagadsalem/gokit-test]: exit status 1: go: cannot find main module; see 'go help modules'

then I run go mod init
and run truss get_started.proto again
I get

cannot parse input: cannot create .pb.go files: cannot exec protoc with protoc-gen-gogo: protoc exec failed.
protoc output:


protoc arguments:

[protoc --proto_path=/Users/sagad/go/src/sagadsalem/gokit-test -I/Users/sagad/go/src --gogofaster_out=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,paths=source_relative,plugins=grpc:/Users/sagad/go/src/sagadsalem/gokit-test /Users/sagad/go/src/sagadsalem/gokit-test/get_started.proto]

: fork/exec /Users/sagad/go/bin/protoc: bad CPU type in executable

Looks like your protoc binary is bad -- Seems related to https://unix.stackexchange.com/questions/550616/executing-bad-cpu-type-executables-in-10-15-x

You might try deleting the version you have and installing the latest with brew

brew install protobuf@3.13

Also I'm working on getting brew installation functioning, so that may be a viable option soon #275

thanx everything working just fine now