Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation issue #303

Closed
sagadsalem opened this issue Aug 15, 2020 · 9 comments
Closed

installation issue #303

sagadsalem opened this issue Aug 15, 2020 · 9 comments

Comments

@sagadsalem
Copy link

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
@zaquestion
Copy link
Member

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.

@sagadsalem
Copy link
Author

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

@zaquestion
Copy link
Member

@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.

@sagadsalem
Copy link
Author

so what you suggest?

@zaquestion
Copy link
Member

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.

@sagadsalem
Copy link
Author

@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

@sagadsalem
Copy link
Author

sagadsalem commented Aug 22, 2020

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

@zaquestion
Copy link
Member

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

@sagadsalem
Copy link
Author

thanx everything working just fine now

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

No branches or pull requests

2 participants