genuinetools / img

Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder.
https://blog.jessfraz.com/post/building-container-images-securely-on-kubernetes/
MIT License
3.88k stars 229 forks source link

Build fails on MacOS #338

Closed Constantin07 closed 3 years ago

Constantin07 commented 3 years ago

Trying to build on MacOS (https://github.com/genuinetools/img#from-source) but it fails:

$ make
( cd /Users/user1/go/src/github.com/genuinetools/img/cross/src/github.com/opencontainers/runc ; git checkout 56aca5aa50d07548d5db8fd33e9dc562f70f3208 )
HEAD is now at 56aca5aa Merge pull request #2295 from kolyshkin/integration-cgroups
make -C "/Users/user1/go/src/github.com/genuinetools/img/cross/src/github.com/opencontainers/runc" static BUILDTAGS="seccomp apparmor"
make[1]: Entering directory '/Users/user1/go/src/github.com/genuinetools/img/cross/src/github.com/opencontainers/runc'
CGO_ENABLED=1 go build  -tags "seccomp apparmor netgo osusergo" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit="56aca5aa50d07548d5db8fd33e9dc562f70f3208" -X main.version=1.0.0-rc10+dev " -o runc .
package github.com/opencontainers/runc
    imports github.com/opencontainers/runc/libcontainer/nsenter: C source files not allowed when not using cgo or SWIG: cloned_binary.c nsexec.c
make[1]: *** [Makefile:44: static] Error 1
make[1]: Leaving directory '/Users/user1/go/src/github.com/genuinetools/img/cross/src/github.com/opencontainers/runc'
make: *** [Makefile:23: /Users/user1/go/src/github.com/genuinetools/img/cross/bin/runc] Error 2
$ go version
go version go1.16.3 darwin/amd64

What am I doing wrong ?