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

drand is using kyber.Groupable which was never merged into kyber #116

Closed
AnomalRoil opened this issue May 6, 2019 · 9 comments
Closed

Comments

@AnomalRoil
Copy link
Member

Currently a fresh install of drand fails because of the following:

$> go get -u github.com/dedis/drand
# github.com/dedis/drand/protobuf/crypto
drand/protobuf/crypto/converter.go:56:17: undefined: kyber.Groupable
drand/protobuf/crypto/converter.go:84:17: undefined: kyber.Groupable

since kyber.Groupable wasn't merged in dedis/kyber#298.

@nikkolasg
Copy link
Collaborator

Have you tried using GO111MODULE=on go get -u github.com/dedis/drand ?
The go.mod file should take the right branch into account. However, the module feature is not enabled by default inside regular repository (i.e. like github.com/.... ) and we need to export the variable GO111MODULE=on first.
But this makes me think that I have to update the readme to explicitely say that.

@AnomalRoil
Copy link
Member Author

Right, I forgot about it, but this time it is failing because of:

$> rm -rf drand
$> GO111MODULE=on go get -u github.com/dedis/drand
build github.com/dedis/drand: cannot load github.com/dedis/kyber: cannot find module providing package github.com/dedis/kyber

Am I missing something else?

@AnomalRoil
Copy link
Member Author

AnomalRoil commented May 6, 2019

I can try and download the drand package using

$> go get -u github.com/dedis/drand

which works (but module are not in use there) [Edit: it seems it is somehow finding and using the right module to build the binary in the $GOBIN ??]
And then I can try and tidy the modules using:

$> cd $GOPATH/src/github.com/dedis/drand
$> GO111MODULE=on go mod tidy
go: downloading go.dedis.ch/kyber/v3 v3.0.3-0.20190426163307-88c7f0c6c771

And then the build works, but you have to keep using the GO111MODULE=on variable:

GO111MODULE=on go build

@AnomalRoil
Copy link
Member Author

There is definitively something fishy there:

  1. Using GO111MODULE=on go get -u github.com/dedis/drand fails as explained above
  2. Using go get -u github.com/dedis/drand works and add a drand binary in the $GOBIN, but then you have to use GO111MODULE=on go build to build
  3. I couldn't reproduce my first attempt where a plain go get -u failed, but it might have been related to outdated dependencies in my GOPATH that somehow caused it to fail.

The error about cannot load github.com/dedis/kyber is really strange since this URL appears nowhere excepted in Kyber's README.md file?!

@Daeinar
Copy link
Contributor

Daeinar commented May 9, 2019

Fyi, I've just reinstalled and built drand via go get -u github.com/dedis/drand and go build
and everything has worked out just fine (without using GO111MODULE=on go get ..., etc.).

@AnomalRoil
Copy link
Member Author

@Daeinar Indeed, it seems that a8c85aa fixed the problem with undefined: kyber.Groupable!

@AnomalRoil
Copy link
Member Author

Interestingly, it did not fix the problem when running :
GO111MODULE=on go get -u github.com/dedis/drand@master 😣

@AnomalRoil
Copy link
Member Author

Okay, now it works using go get and go build because of the vendor folder that is actually taking over Go modules when Go modules are disabled, like for example when you're in the GOPATH, which is the case using go get.

@nikkolasg
Copy link
Collaborator

It now works because drand is in its own organisation and has forked off kyber.

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

3 participants