Build and install of Kata runtime fails
Successfully built the Kata runtime
runtime]# make && sudo -E PATH=$PATH make install
CLEAN clean
GENERATE cli/config-generated.go
CONFIG data/kata-collect-data.sh
kata-runtime - version 1.2.0 (commit ed6f715ae6d46171c170c98909656539005766e3)
• architecture:
Host: x86_64
golang: amd64
Build: amd64
• golang:
go version go1.8.3 linux/amd64
• Summary:
destination install path (DESTDIR) : /
binary installation path (BINDIR) : /usr/local/bin
binaries to install :
- /usr/local/bin/kata-runtime
- /usr/local/bin/data/kata-collect-data.sh
config to install (CONFIG) : cli/config/configuration.toml
install path (CONFIG_PATH) : /usr/share/defaults/kata-containers/configuration.toml
alternate config path (SYSCONFIG) : /etc/kata-containers/configuration.toml
hypervisor path (QEMUPATH) : /usr/bin/qemu-lite-system-x86_64
assets path (PKGDATADIR) : /usr/share/kata-containers
proxy+shim path (PKGLIBEXECDIR) : /usr/libexec/kata-containers
BUILD /home/nitesh/TST/kata/src/github.com/kata-containers/runtime/kata-runtime
# github.com/kata-containers/runtime/virtcontainers
../virtcontainers/agent.go:94: cannot use kataAgent literal (type *kataAgent) as type agent in return argument:
*kataAgent does not implement agent (wrong type for init method)
have init("github.com/kata-containers/runtime/vendor/golang.org/x/net/context".Context, *Sandbox, interface {}) error
want init("context".Context, *Sandbox, interface {}) error
make: *** [Makefile:331: /home/nitesh/TST/kata/src/github.com/kata-containers/runtime/kata-runtime] Error
Could you try a git clean -dfx?
Oh - wait - I think you might be trying to build outside of your $GOPATH?
@jodh-intel : I think $GOPATH is set fine. I checked out 1.2.0 tag and everything built fine. Checked back to master and saw the build failure.
@nitkon is /home/nitesh/TST/kata your GOPATH? as @jodh-intel mentions probably you are not building kata in your GOPATH
@devimc :
[root@nitkon runtime]# pwd
/home/nitesh/TST/kata/src/github.com/kata-containers/runtime
[root@nitkon runtime]# echo $GOPATH
/home/nitesh/TST/kata/
[root@nitkon runtime]# git branch
* master
[root@nitkon runtime]# make && sudo -E PATH=$PATH make install
CLEAN clean
GENERATE cli/config-generated.go
CONFIG data/kata-collect-data.sh
kata-runtime - version 1.2.0 (commit ed6f715ae6d46171c170c98909656539005766e3)
• architecture:
Host: x86_64
golang: amd64
Build: amd64
• golang:
go version go1.8.3 linux/amd64
• Summary:
destination install path (DESTDIR) : /
binary installation path (BINDIR) : /usr/local/bin
binaries to install :
- /usr/local/bin/kata-runtime
- /usr/local/bin/data/kata-collect-data.sh
config to install (CONFIG) : cli/config/configuration.toml
install path (CONFIG_PATH) : /usr/share/defaults/kata-containers/configuration.toml
alternate config path (SYSCONFIG) : /etc/kata-containers/configuration.toml
hypervisor path (QEMUPATH) : /usr/bin/qemu-lite-system-x86_64
assets path (PKGDATADIR) : /usr/share/kata-containers
proxy+shim path (PKGLIBEXECDIR) : /usr/libexec/kata-containers
BUILD /home/nitesh/TST/kata/src/github.com/kata-containers/runtime/kata-runtime
# github.com/kata-containers/runtime/virtcontainers
../virtcontainers/agent.go:94: cannot use kataAgent literal (type *kataAgent) as type agent in return argument:
*kataAgent does not implement agent (wrong type for init method)
have init("github.com/kata-containers/runtime/vendor/golang.org/x/net/context".Context, *Sandbox, interface {}) error
want init("context".Context, *Sandbox, interface {}) error
make: *** [Makefile:331: /home/nitesh/TST/kata/src/github.com/kata-containers/runtime/kata-runtime] Error 2
[root@nitkon runtime]# git checkout 1.2.0
Note: checking out '1.2.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 0bcb32f... Merge pull request #555 from jcvenegas/1.2.0-branch-bump
[root@nitkon runtime]# make && sudo -E PATH=$PATH make install
CLEAN clean
GENERATE cli/config-generated.go
CONFIG data/kata-collect-data.sh
kata-runtime - version 1.2.0 (commit 0bcb32f7042625ea0ecee8f37b99b4459ebd5af8)
• architecture:
Host: x86_64
golang: amd64
Build: amd64
• golang:
go version go1.8.3 linux/amd64
• Summary:
destination install path (DESTDIR) : /
binary installation path (BINDIR) : /usr/local/bin
binaries to install :
- /usr/local/bin/kata-runtime
- /usr/local/bin/data/kata-collect-data.sh
config to install (CONFIG) : cli/config/configuration.toml
install path (CONFIG_PATH) : /usr/share/defaults/kata-containers/configuration.toml
alternate config path (SYSCONFIG) : /etc/kata-containers/configuration.toml
hypervisor path (QEMUPATH) : /usr/bin/qemu-lite-system-x86_64
assets path (PKGDATADIR) : /usr/share/kata-containers
proxy+shim path (PKGLIBEXECDIR) : /usr/libexec/kata-containers
BUILD /home/nitesh/TST/kata/src/github.com/kata-containers/runtime/kata-runtime
CONFIG cli/config/configuration.toml
kata-runtime - version 1.2.0 (commit 0bcb32f7042625ea0ecee8f37b99b4459ebd5af8)
• architecture:
Host: x86_64
golang: amd64
Build: amd64
• golang:
go version go1.8.3 linux/amd64
• Summary:
destination install path (DESTDIR) : /
binary installation path (BINDIR) : /usr/local/bin
binaries to install :
- /usr/local/bin/kata-runtime
- /usr/local/bin/data/kata-collect-data.sh
config to install (CONFIG) : cli/config/configuration.toml
install path (CONFIG_PATH) : /usr/share/defaults/kata-containers/configuration.toml
alternate config path (SYSCONFIG) : /etc/kata-containers/configuration.toml
hypervisor path (QEMUPATH) : /usr/bin/qemu-lite-system-x86_64
assets path (PKGDATADIR) : /usr/share/kata-containers
proxy+shim path (PKGLIBEXECDIR) : /usr/libexec/kata-containers
INSTALL install-scripts
INSTALL install-completions
INSTALL install-config
INSTALL install-bin
Do you have local changes maybe? (git checkout -f to reset?)
Does this work for you?
dir="/tmp/go"
url="github.com/kata-containers/runtime"
GOPATH="$dir" go get -d "$url"
cd "$dir/src/$url"
GOPATH="$dir" make
No, I do not have any local changes.
[root@nitkon runtime]# dir="/tmp/go"
[root@nitkon runtime]# url="github.com/kata-containers/runtime"
[root@nitkon runtime]# GOPATH="$dir" go get -d "$url"
package github.com/kata-containers/runtime: no buildable Go source files in /tmp/go/src/github.com/kata-containers/runtime
[root@nitkon runtime]# cd "$dir/src/$url"
[root@nitkon runtime]# GOPATH="$dir" make
CLEAN clean
GENERATE cli/config-generated.go
CONFIG data/kata-collect-data.sh
kata-runtime - version 1.2.0 (commit 8b5fa32d9b55b8a456807fe3e7fe527633bf389b)
• architecture:
Host: x86_64
golang: amd64
Build: amd64
• golang:
go version go1.8.3 linux/amd64
• Summary:
destination install path (DESTDIR) : /
binary installation path (BINDIR) : /usr/local/bin
binaries to install :
- /usr/local/bin/kata-runtime
- /usr/local/bin/data/kata-collect-data.sh
config to install (CONFIG) : cli/config/configuration.toml
install path (CONFIG_PATH) : /usr/share/defaults/kata-containers/configuration.toml
alternate config path (SYSCONFIG) : /etc/kata-containers/configuration.toml
hypervisor path (QEMUPATH) : /usr/bin/qemu-lite-system-x86_64
assets path (PKGDATADIR) : /usr/share/kata-containers
proxy+shim path (PKGLIBEXECDIR) : /usr/libexec/kata-containers
BUILD /tmp/go/src/github.com/kata-containers/runtime/kata-runtime
# github.com/kata-containers/runtime/virtcontainers
../virtcontainers/agent.go:94: cannot use kataAgent literal (type *kataAgent) as type agent in return argument:
*kataAgent does not implement agent (wrong type for init method)
have init("github.com/kata-containers/runtime/vendor/golang.org/x/net/context".Context, *Sandbox, interface {}) error
want init("context".Context, *Sandbox, interface {}) error
make: *** [Makefile:331: /tmp/go/src/github.com/kata-containers/runtime/kata-runtime] Error 2
@nitkon ahhh the problem is the version go1.8.3 , please try with a new version
btw I faced some runtime failures using that version
@caoruidong I think so, and I think we shouldn't support that version any more
@egernst @jodh-intel @bergwolf what do you think ?
Yes. We can update https://github.com/kata-containers/runtime/blob/8b5fa32d9b55b8a456807fe3e7fe527633bf389b/versions.yaml#L183-L188. But how to limit it from compiling?
If I'm reading this correctly: https://golang.org/dl/
then 1.8.x is not a stable release anymore - minimum looks like v1.9.7
We'll need to fix up:
https://github.com/kata-containers/runtime/blob/master/versions.yaml#L186
Works for me, if it is not listed as effectively supported on the golang pages any more.
I agree - 1.8.3 is getting pretty old now (https://github.com/golang/go/releases/tag/go1.8.3). Centos 7 even has golang 1.9.4 in their repo.
I'll raise a PR to bump the YAML config...
See #643.
@devimc : So kata runtime with golang version 1.9.7 builds fine? I might have a local setup issue then ...
[root@nitkon runtime]# export GOROOT=/usr/local/go
[root@nitkon runtime]# export GOPATH=/home/nitesh/TST/kata/
[root@nitkon runtime]# export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
[root@nitkon runtime]# go version
go version go1.9.7 linux/amd64
[root@nitkon runtime]# cat versions.yaml | grep "Google's 'go' language" -A2 -B2
golang:
description: "Google's 'go' language"
notes: "'version' is the default minimum version used by this project."
version: "1.9.7"
[root@nitkon runtime]# PWD
bash: PWD: command not found...
Similar command is: 'pwd'
[root@nitkon runtime]# pwd
/home/nitesh/TST/kata/src/github.com/kata-containers/runtime
[root@nitkon runtime]# make && sudo -E PATH=$PATH make install
CLEAN clean
GENERATE cli/config-generated.go
CONFIG data/kata-collect-data.sh
kata-runtime - version 1.2.0 (commit ed6f715ae6d46171c170c98909656539005766e3-dirty)
• architecture:
Host: x86_64
golang: amd64
Build: amd64
• golang:
go version go1.9.7 linux/amd64
• Summary:
destination install path (DESTDIR) : /
binary installation path (BINDIR) : /usr/local/bin
binaries to install :
- /usr/local/bin/kata-runtime
- /usr/local/bin/data/kata-collect-data.sh
config to install (CONFIG) : cli/config/configuration.toml
install path (CONFIG_PATH) : /usr/share/defaults/kata-containers/configuration.toml
alternate config path (SYSCONFIG) : /etc/kata-containers/configuration.toml
hypervisor path (QEMUPATH) : /usr/bin/qemu-lite-system-x86_64
assets path (PKGDATADIR) : /usr/share/kata-containers
proxy+shim path (PKGLIBEXECDIR) : /usr/libexec/kata-containers
BUILD /home/nitesh/TST/kata/src/github.com/kata-containers/runtime/kata-runtime
# runtime
/usr/local/go/src/runtime/mstkbar.go:151:10: debug.gcstackbarrieroff undefined (type struct { allocfreetrace int32; cgocheck int32; efence int32; gccheckmark int32; gcpacertrace int32; gcshrinkstackoff int32; gcrescanstacks int32; gcstoptheworld int32; gctrace int32; invalidptr int32; sbrk int32; scavenge int32; scheddetail int32; schedtrace int32 } has no field or method gcstackbarrieroff)
/usr/local/go/src/runtime/mstkbar.go:162:24: division by zero
/usr/local/go/src/runtime/mstkbar.go:162:43: invalid expression unsafe.Sizeof(composite literal)
/usr/local/go/src/runtime/mstkbar.go:162:44: undefined: stkbar
/usr/local/go/src/runtime/mstkbar.go:212:4: gp.stkbar undefined (type *g has no field or method stkbar)
/usr/local/go/src/runtime/mstkbar.go:213:15: gp.stkbar undefined (type *g has no field or method stkbar)
/usr/local/go/src/runtime/mstkbar.go:216:23: undefined: stackBarrierPC
/usr/local/go/src/runtime/mstkbar.go:226:28: gp.stkbarPos undefined (type *g has no field or method stkbarPos)
/usr/local/go/src/runtime/mstkbar.go:227:19: gp.stkbarPos undefined (type *g has no field or method stkbarPos)
/usr/local/go/src/runtime/mstkbar.go:248:41: undefined: stkbar
/usr/local/go/src/runtime/mstkbar.go:227:19: too many errors
make: *** [Makefile:331: /home/nitesh/TST/kata/src/github.com/kata-containers/runtime/kata-runtime] Error 2
@nitkon - file /usr/local/go/src/runtime/mstkbar.go:151 is specific to go1.8.3 fwics so, yes, I think you have an environment issue.
@jodh-intel : Yes, you were right! I cleaned up and now I am able to build it without errors. Cool!
should we close this issue?
I think so as it's... cough... "fixed" by #643.
Most helpful comment
@nitkon - file
/usr/local/go/src/runtime/mstkbar.go:151is specific to go1.8.3 fwics so, yes, I think you have an environment issue.