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

Build Errors in Modules #843

Closed
balajeerc opened this issue Apr 20, 2019 · 5 comments
Closed

Build Errors in Modules #843

balajeerc opened this issue Apr 20, 2019 · 5 comments

Comments

@balajeerc
Copy link

I use the following procedure to install the go binding in the 'module' mode as shown here

go mod download && go get -u -v github.com/therecipe/qt/cmd/qtsetup && go get -u -v github.com/therecipe/qt/cmd/...

go mod vendor && cd ./vendor/github.com/therecipe && git clone https://github.com/therecipe/env_$(go env GOOS)_amd64_512.git && cd ../../..

This was working fine for me the last time I checked. However, today, my builds break with the following error:

$ go mod download && go get -u -v github.com/therecipe/qt/cmd/qtsetup && go get -u -v github.com/therecipe
/qt/cmd/...
go: finding github.com/therecipe/qt/cmd/qtsetup latest
go: finding github.com/therecipe/qt/cmd latest
Fetching https://golang.org/x/tools?go-get=1
Fetching https://golang.org/x/net?go-get=1
Fetching https://golang.org/x/crypto?go-get=1
Fetching https://golang.org/x/text?go-get=1
Fetching https://golang.org/x/sys?go-get=1
Parsing meta tags from https://golang.org/x/text?go-get=1 (status code 200)
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
get "golang.org/x/text": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200)
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
get "golang.org/x/crypto": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto?go-ge
t=1
get "golang.org/x/net": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net?go-get=1
get "golang.org/x/tools": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools?go-get=1
get "golang.org/x/sys": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys?go-get=1
go: finding golang.org/x/sys latest
go: finding golang.org/x/net latest
go: finding golang.org/x/crypto latest
go: finding golang.org/x/tools latest
github.com/therecipe/qt/cmd/qtsetup
# github.com/therecipe/qt/cmd/qtsetup
../../../go/pkg/mod/github.com/therecipe/qt/cmd@v0.0.0-20190420173532-a06d10664ec5/qtsetup/main.go:97:13: too many arguments in call to setup.Prep
        have (string)
        want ()
../../../go/pkg/mod/github.com/therecipe/qt/cmd@v0.0.0-20190420173532-a06d10664ec5/qtsetup/main.go:107:13: too many arguments in call to setup.Prep
        have (string)
        want ()

I see recent commits mentioning "breaking changes". Would this be because of them?

OS: Linux Ubuntu 18.04.1 LTS

@therecipe
Copy link
Owner

Hey

Yeah, it's not directly related but yes the commit probably broke the setup for you.
I think this is because I didn't properly pin the internal package dependency.
(i.e. therecipe/qt/cmd and therecipe/qt/internal got out of sync)

But it should be fixed now, maybe try to run go get -u -v github.com/therecipe/qt/cmd/qtsetup && go get -u -v github.com/therecipe/qt/cmd/... again.
Also if nothing works, then try to clean you go mod cache with go clean -modcache first.

@balajeerc
Copy link
Author

Hi @therecipe. Thanks for responding.

Tried running modache clean and go get -u -v github.com/therecipe/qt/cmd/qtsetup && go get -u -v github.com/therecipe/qt/cmd/... again.

Am afraid I have a new set of errors now:

$ go get -u -v github.com/therecipe/qt/cmd/qtsetup && go get -u -v github.com/therecipe/qt/cmd/...
go: finding github.com/therecipe/qt/cmd/qtsetup latest
go: finding github.com/therecipe/qt/cmd latest
go: finding github.com/therecipe/qt latest
Fetching https://golang.org/x/sys?go-get=1
Fetching https://golang.org/x/net?go-get=1
Fetching https://golang.org/x/tools?go-get=1
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200)
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
get "golang.org/x/net": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net?go-get=1
get "golang.org/x/crypto": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto?go-get=1
go: finding golang.org/x/net latest
go: finding golang.org/x/crypto latest
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
get "golang.org/x/sys": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys?go-get=1
get "golang.org/x/tools": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools?go-get=1
go: finding github.com/gopherjs/gopherjs latest
Fetching https://golang.org/x/text?go-get=1
go: finding golang.org/x/sys latest
go: finding golang.org/x/tools latest
Parsing meta tags from https://golang.org/x/text?go-get=1 (status code 200)
get "golang.org/x/text": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text?go-get=1
package github.com/therecipe/qt/cmd/qtsetup: unknown import path "github.com/therecipe/qt/cmd/qtsetup": ambiguous import: found github.com/therecipe/qt/cmd/qtsetup in multiple modules:
        github.com/therecipe/qt v0.0.0-20190421004712-8a1f02f0e2b1 (/home/balajeerc/go/pkg/mod/github.com/therecipe/qt@v0.0.0-20190421004712-8a1f02f0e2b1/cmd/qtsetup)
        github.com/therecipe/qt/cmd v0.0.0-20190409181433-20875b03279f (/home/balajeerc/go/pkg/mod/github.com/therecipe/qt/cmd@v0.0.0-20190409181433-20875b03279f/qtsetup)

@therecipe
Copy link
Owner

Mh, this looks like the cache is somehow still containing one of the old versions.
Maybe try to manually remove the $GOPATH/pkg/mod* folder first.
And/or maybe run go clean -cache && go clean -modcache

@therecipe
Copy link
Owner

Also check your go.mod, maybe it's containing some older entries.

@balajeerc
Copy link
Author

Tried running go clean -cache && go clean -modcache but that did not help.
Clearing my go.mod and running it again helped fix the build.

@therecipe Thanks for the help!

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