lyft / cni-ipvlan-vpc-k8s

AWS VPC Kubernetes CNI driver using IPvlan
Apache License 2.0
360 stars 58 forks source link

Build issues with golang:1.9.2-alpine3.6 docker image #5

Closed C45tr0 closed 6 years ago

C45tr0 commented 6 years ago

Trying to build/install this onto a coreos box for my kubernets cluster. I am pretty sure its something I am doing, but if you have any insight that would help, it would be appreciated.

Repo: https://github.com/C45tr0/install-cni-ipvlan-vpc-k8s Log:

docker run --net=host --rm -v /Path/install-cni-ipvlan-vpc-k8s/tmp:/shared install-cni-ip-vlan-vpc-k8s:latest
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
v3.6.2-223-gf6e5807065 [http://dl-cdn.alpinelinux.org/alpine/v3.6/main]
v3.6.2-216-g48901173c2 [http://dl-cdn.alpinelinux.org/alpine/v3.6/community]
OK: 8437 distinct packages available
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/18) Installing binutils-libs (2.28-r3)
(2/18) Installing binutils (2.28-r3)
(3/18) Installing gmp (6.1.2-r0)
(4/18) Installing isl (0.17.1-r0)
(5/18) Installing libgomp (6.3.0-r4)
(6/18) Installing libatomic (6.3.0-r4)
(7/18) Installing pkgconf (1.3.7-r0)
(8/18) Installing libgcc (6.3.0-r4)
(9/18) Installing mpfr3 (3.1.5-r0)
(10/18) Installing mpc1 (1.0.3-r0)
(11/18) Installing libstdc++ (6.3.0-r4)
(12/18) Installing gcc (6.3.0-r4)
(13/18) Installing libssh2 (1.8.0-r1)
(14/18) Installing libcurl (7.57.0-r0)
(15/18) Installing expat (2.2.0-r1)
(16/18) Installing pcre (8.41-r0)
(17/18) Installing git (2.13.5-r0)
(18/18) Installing make (4.2.1-r0)
Executing busybox-1.26.2-r9.trigger
OK: 108 MiB in 30 packages
Grabbing golang/dep
Grabbing lyft/cni-ipvlan-vpc-k8s
# github.com/vishvananda/netlink
src/github.com/vishvananda/netlink/bpf_linux.go:4:23: fatal error: asm/types.h: No such file or directory
 #include <asm/types.h>
                       ^
compilation terminated.
Making cni-ipvlan-vpc-k8s
fatal: No names found, cannot describe anything.
/go/bin/dep ensure -v
Gopkg.lock was already in sync with imports and Gopkg.toml
(1/19) Wrote github.com/j-keck/arping@master
(2/19) Wrote github.com/coreos/go-iptables@v0.2.0
(3/19) Wrote github.com/docker/go-units@v0.3.2
(4/19) Wrote github.com/vishvananda/netns@master
(5/19) Wrote github.com/pkg/errors@v0.8.0
(6/19) Wrote github.com/Microsoft/go-winio@v0.4.5
(7/19) Wrote github.com/jmespath/go-jmespath@0b12d6b5
(8/19) Wrote github.com/go-ini/ini@v1.30.3
(9/19) Wrote github.com/vishvananda/netlink@master
(10/19) Wrote github.com/nightlyone/lockfile@master
(11/19) Wrote github.com/containernetworking/cni@v0.6.0
(12/19) Wrote github.com/urfave/cli@v1.20.0
(13/19) Wrote golang.org/x/sys@master
(14/19) Wrote github.com/containernetworking/plugins@v0.6.0
(15/19) Wrote golang.org/x/net@master
(16/19) Wrote github.com/docker/go-connections@v0.3.0
(17/19) Wrote github.com/docker/distribution@v2.6.2
(18/19) Wrote github.com/aws/aws-sdk-go@v1.12.26
(19/19) Wrote github.com/docker/docker@v1.13.1
go install ./
# github.com/lyft/cni-ipvlan-vpc-k8s/vendor/github.com/vishvananda/netlink
vendor/github.com/vishvananda/netlink/bpf_linux.go:4:23: fatal error: asm/types.h: No such file or directory
 #include <asm/types.h>
                       ^
compilation terminated.
make: *** [Makefile:19: cache] Error 2
cp: can't stat 'cni-ipvlan-vpc-k8s-*.tar.gz': No such file or directory
theatrus commented 6 years ago

The netlink package requires kernel headers in order to build as it uses cgo under the hood - I'd try installing those for Alpine.

I just pushed a binary release to the releases system, which may be easier to test with.

C45tr0 commented 6 years ago

Awesome. I'll give that a try this weekend. Thanks for the fast response.

C45tr0 commented 6 years ago

I did try building with adding the linux-headers package. It got further but still failed when trying to load errno.h.

I have switched it for now to just pull your binary release, so I could try and get my cluster setup.