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

Error with a golang dependency when using Go 1.10 #432

Closed
Anirudh-MV opened this issue Nov 3, 2020 · 7 comments
Closed

Error with a golang dependency when using Go 1.10 #432

Anirudh-MV opened this issue Nov 3, 2020 · 7 comments

Comments

@Anirudh-MV
Copy link

Hello, I'm trying to build Acra from sources but I'm failing at the first step of the guide which is to install acra-keymaker.

This is the error I get when I run go get github.com/cossacklabs/acra/cmd/acra-keymaker

ubuntu@ip-10-1-1-1:~/work/src/go.opencensus.io$ go get github.com/cossacklabs/acra/cmd/acra-keymaker
package go.opencensus.io/exporter/jaeger: cannot find package "go.opencensus.io/exporter/jaeger" in any of:
        /usr/lib/go-1.10/src/go.opencensus.io/exporter/jaeger (from $GOROOT)
        /home/ubuntu/work/src/go.opencensus.io/exporter/jaeger (from $GOPATH)

This got resolved when I downgraded go.opencensus.io/ from latest to v0.19.x because the package jaeger is moved to contrib.go.opencensus.io

@ilammy ilammy added the docs label Nov 3, 2020
@ilammy
Copy link
Contributor

ilammy commented Nov 3, 2020

Hi @Anirudh-MV,

Based on /usr/lib/go-1.10/src I suspect that you are using Go 1.10.

Some time ago development version of Acra started requiring at least Go 1.13 for compilation. This pulls in Go 1.11 module support and it should fix the issues with packages changing their source location.

While using older versions might work for some tools, it is recommended to use the latest stable version of Go (currently, that's Go 1.15).

Admittely, Go version requirements are not well-documented :(

vixentael added a commit that referenced this issue Nov 3, 2020
As pointed out in #432 we need to update docs a bit.
@vixentael vixentael mentioned this issue Nov 3, 2020
vixentael added a commit that referenced this issue Nov 3, 2020
* Update readme

As pointed out in #432 we need to update docs a bit.

* Apply suggestions from code review

Co-authored-by: Alexei Lozovsky <alexei@cossacklabs.com>

* Update README.md

Co-authored-by: Alexei Lozovsky <alexei@cossacklabs.com>
@vixentael
Copy link
Collaborator

Thank you @Anirudh-MV for pushing us to update Readme :)

As @ilammy mentioned, we support Acra for 2-3 latest Go versions only. We can't guarantee that it will work if you're using Go 1.10. Please use Go 1.11-1.13 or consider downloading Acra's as package or Docker container.

@vixentael vixentael changed the title Error with a golang dependency Error with a golang dependency when using Go 1.10 Nov 3, 2020
@Anirudh-MV
Copy link
Author

thank you for letting me know that I had to upgrade my golang

@vixentael
Copy link
Collaborator

Please let us know if you have any further issues! Thank you for using Acra.

@Anirudh-MV
Copy link
Author

Hi, I am running into the same error as the original post with go version 1.15 and 1.13.15 linux/amd64

@Anirudh-MV Anirudh-MV reopened this Nov 4, 2020
@ilammy
Copy link
Contributor

ilammy commented Nov 4, 2020

Hm 🤔 🤔 🤔

It seems that newer Go does not default to using modules for out-of-tree go gets.

Could you please set

export GO111MODULE=on

in the shell before issuing go get commands? That should help.

Alternatively, this variable can be set for individual commands, for example:

GO111MODULE=on go get github.com/cossacklabs/acra/cmd/acra-keymaker

This too needs to be noted in the docs, I guess...

@Anirudh-MV
Copy link
Author

Hi,

The export GO111MODULE=on fix worked and I could install acra modules without any errors thrown.

Yes, I think this should be noted in the docs because I had the issue with different versions of go on different machines.

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

No branches or pull requests

3 participants