mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
cni: fix problem about cross compilation
When setting up k8s, the following error appeared, failing to setup coredns pod. NetworkPlugin cni failed to set up pod "coredns-5f7fc64c95-4nnfq_kube-system" network: fork/exec /opt/cni/bin/loopback: no such file or directory This is because the binary, /opt/cni/bin/loopback, has wrong interpreter. So fix do_compile to use ${GO} instead of go to fix this problem. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
4eca42bc3b
commit
9267ddff1a
|
@ -47,10 +47,10 @@ do_compile() {
|
|||
export CGO_ENABLED="1"
|
||||
|
||||
cd ${S}/src/import/vendor/github.com/containernetworking/cni/libcni
|
||||
go build
|
||||
${GO} build
|
||||
|
||||
cd ${S}/src/import/vendor/github.com/containernetworking/cni/cnitool
|
||||
go build
|
||||
${GO} build
|
||||
|
||||
cd ${S}/src/import/vendor/github.com/containernetworking/plugins/
|
||||
PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/main/* | grep -v windows)"
|
||||
|
@ -58,7 +58,7 @@ do_compile() {
|
|||
for p in $PLUGINS; do
|
||||
plugin="$(basename "$p")"
|
||||
echo "building: $p"
|
||||
go build -o ${WORKDIR}/plugins/bin/$plugin github.com/containernetworking/plugins/$p
|
||||
${GO} build -o ${WORKDIR}/plugins/bin/$plugin github.com/containernetworking/plugins/$p
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user