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

runc not building wth go 1.14.1 #2274

Closed
smijolovic opened this issue Mar 26, 2020 · 4 comments
Closed

runc not building wth go 1.14.1 #2274

smijolovic opened this issue Mar 26, 2020 · 4 comments

Comments

@smijolovic
Copy link

smijolovic commented Mar 26, 2020

CentOS 8.1
Download and unpack 1.0.0-rc10 (tar.gz)

go get -d ./...
make BUILDTAGS="seccomp selinux"

libcontainer/cgroups/systemd/apply_systemd.go:17:2: cannot find package "github.com/godbus/dbus" in any of:
/usr/local/go14/src/github.com/godbus/dbus (from $GOROOT)
/home/rpmbuild/nimbus8/runc-build/runc-1.0.0-rc10/src/github.com/godbus/dbus (from $GOPATH) <--by the way...it actually is there so this is puzzling
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
go build -buildmode=pie -ldflags "-X main.gitCommit="" -X main.version=1.0.0-rc10 " -tags "seccomp selinux" -o runc .

./checkpoint.go:29:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
./checkpoint.go:30:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
./checkpoint.go:31:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
./checkpoint.go:32:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
./checkpoint.go:33:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
./checkpoint.go:34:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
./checkpoint.go:35:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
./checkpoint.go:36:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
./checkpoint.go:37:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
./checkpoint.go:38:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
./checkpoint.go:38:17: too many errors
make: *** [Makefile:34: runc] Error 2

@AkihiroSuda
Copy link
Member

You need to checkout the code under $GOPATH/src/github.com/opencontainers/runc and set GO111MODULE=off

@smijolovic
Copy link
Author

I don't understand the rapid closing of this request.

It is not a good practice to pull from master branches in a production environment. Master branches are volatile and typically buggy with daily changes during the development lifecycle.

I am respectfully requesting instructions on how to pull a stable release branch (tar.gz) of rc10 and the correct means to build with go 1.14.1

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Mar 27, 2020

Sorry for unclarity, I didn't mean you need to checkout the master branch from the git repo. You need to just extract rc10 archive under $GOPATH/src/github.com/opencontainers/runc

But Go 1.14 is currently unsupported anyway because os the runtime incompatibility (e.g. #2258).

@smijolovic
Copy link
Author

Thank you for the clarity!

BUILD_RUNC_RELEASE=1.0.0-rc10
RUNC_SRC=$GOPATH/src/github.com/opencontainers
mkdir $RUNC_SRC
cd $RUNC_SRC
wget https://github.com/opencontainers/runc/archive/v$BUILD_RUNC_RELEASE.tar.gz
tar xzf v$BUILD_RUNC_RELEASE.tar.gz
mv runc-$BUILD_RUNC_RELEASE runc
cd $RUNC_SRC/runc
GO111MODULE=off make BUILDTAGS="seccomp selinux"

Worked for me!

Compiles for both 1.13 and 1.14 - but will hold off on building for 1.14 until the compatibility is addressed.

Thanks again!

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

2 participants