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

project can not compile #8

Closed
tiny1990 opened this issue May 27, 2020 · 6 comments · Fixed by #12
Closed

project can not compile #8

tiny1990 opened this issue May 27, 2020 · 6 comments · Fixed by #12
Assignees

Comments

@tiny1990
Copy link

run make error.

go: finding module for package golang.org/x/oauth2
go: finding module for package github.com/Azure/go-ansiterm/winterm
go: finding module for package github.com/Azure/go-ansiterm
go: finding module for package github.com/Sirupsen/logrus
go: found github.com/Azure/go-ansiterm/winterm in github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78
go: found github.com/Sirupsen/logrus in github.com/Sirupsen/logrus v1.6.0
go: github.com/alibaba/openyurt/cmd/yurt-controller-manager/app imports
        k8s.io/apiserver/pkg/util/term imports
        github.com/docker/docker/pkg/term imports
        github.com/docker/docker/pkg/term/windows imports
        github.com/Sirupsen/logrus: github.com/Sirupsen/[email protected]: parsing go.mod:
        module declares its path as: github.com/sirupsen/logrus
                but was required as: github.com/Sirupsen/logrus
@Fei-Guo
Copy link
Member

Fei-Guo commented May 27, 2020

The repo is still under construction, bear us with any build failures.

@rambohe-ch
Copy link
Member

@tiny1990 what's version of your go that used for compile.
and can you try compile again after clear up go mod file($GOPATH/pkg)

by the way, i haven't come across this compile error.

@tiny1990
Copy link
Author

@rambohe-ch build with golang 1.14

@ruster-cn
Copy link

github.com/Sirupsen/logrus is the old path, the author suggest "Anything using it should be updated to import and require github.com/sirupsen/logrus." . I think we can change as github.com/sirupsen/logrus, because this change can run in go version >= 1.13.

@tiny1990
Copy link
Author

tiny1990 commented May 27, 2020

@rambohe-ch
in order to isolate host GOPATH , build in container.
if i run command docker run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp golang:1.13 go mod vendor
logs.

go: github.com/alibaba/openyurt/cmd/yurt-controller-manager/app imports
	k8s.io/apiserver/pkg/util/term imports
	github.com/docker/docker/pkg/term imports
	github.com/docker/docker/pkg/term/windows imports
	github.com/Sirupsen/logrus: github.com/Sirupsen/[email protected]: parsing go.mod:
	module declares its path as: github.com/sirupsen/logrus
	        but was required as: github.com/Sirupsen/logrus

so we need replace github.com/Sirupsen/logrus => github.com/sirupsen/logrus

and run command docker run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp golang:1.13 make.
logs

build github.com/alibaba/openyurt/cmd/yurtctl: cannot load github.com/googleapis/gnostic/OpenAPIv2: module github.com/googleapis/gnostic@latest found (v0.4.1), but does not contain package github.com/googleapis/gnostic/OpenAPIv2

so. i think we need replace two package

github.com/googleapis/gnostic and github.com/Sirupsen/logrus

the package name tolower in new version.

@charleszheng44
Copy link
Member

@tiny1990 thanks for filing the issue. I have changed the github.com/googleapis/gnostic to v0.3.1. It should work 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

Successfully merging a pull request may close this issue.

5 participants