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

flag provided but not defined: -mod #40491

Closed
bren-doyle opened this issue Jul 30, 2020 · 9 comments
Closed

flag provided but not defined: -mod #40491

bren-doyle opened this issue Jul 30, 2020 · 9 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@bren-doyle
Copy link

go version go1.9.4 linux/amd64


Does this issue reproduce with the latest release?

Have not tried the latest release, I want to build with this release

What operating system and processor architecture are you using (go env)?

go env Output

go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build921471675=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

type make

What did you expect to see?

it to build

I see that there have been posts about -mod before, but none of them tell me how to make it work with this release.
They seem to say the flag was removed in v1.14, but I am using 1.9 so I would have expected to be there? Do I just
remove that flag and hope it works.

What did you see instead?

flag provided but not defined: -mod

@davecheney
Copy link
Contributor

It looks like you are building a third party project which expects a version of Go newer than Go 1.9. If the project has go.mod file in its root directory it may list the minimum version of Go required.

Please keep in mind that even though your operating system vendor has bundled Go 1.9, that version is no longer supported. You can find more information about the support policy here, https://github.com/golang/go/wiki/Go-Release-Cycle

@davecheney davecheney added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jul 30, 2020
@bren-doyle
Copy link
Author

bren-doyle commented Jul 30, 2020

From the software I am trying to build:
"Ensure go version >= 1.8"
Which it is, also from what I can find the flag was supposed to be removed in 1.14, so I would exp[ect it to be there in 1.9
some consistent documentation would be nice :(

@davecheney
Copy link
Contributor

What is the project you are trying to build? Is it public? If not, can you share the relevant parts of the make file?

@seankhliao
Copy link
Member

@bren-doyle the -mod flag for the go toolchain as well as support all module related operations were added in go1.11 and remains in there for the current releases

@bren-doyle
Copy link
Author

@davecheney
Copy link
Contributor

davecheney commented Jul 31, 2020

This project indicates it requires a minimum of Go 1.13

https://github.com/ovn-org/ovn-kubernetes/blob/master/go-controller/go.mod#L3

It should build with any currently supported version of Go. As @seankhliao pointed out the -mod flag was added somewhere around Go 1.11.

@bren-doyle
Copy link
Author

bren-doyle commented Jul 31, 2020

@seankhliao
Copy link
Member

@bren-doyle that is an issue with the project not properly documenting its requirements, not a go issue

@bren-doyle
Copy link
Author

Agreed

@golang golang locked and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants