opencontainers / runc

CLI tool for spawning and running containers according to the OCI specification
https://www.opencontainers.org/
Apache License 2.0
11.89k stars 2.11k forks source link

Error on build attempt with make #1426

Open ghost opened 7 years ago

ghost commented 7 years ago

When following the build instructions specified in the readme on macOS 10.12.3 I get the following error from the make command.

 ~/P/L/G/s/g/o/runc (master=) make                                                  ~/P/L/G/s/g/o/runc
go build -i -ldflags "-X main.gitCommit="b6b70e53451794e8333e9b602cc096b47a20bd0f" -X main.version=1.0.0-rc3" -tags "seccomp" -o runc .
# github.com/opencontainers/runc/libcontainer/utils
libcontainer/utils/utils_unix.go:38: undefined: syscall.SOCK_CLOEXEC
make: *** [runc] Error 2
cyphar commented 7 years ago

That's not really surprising, since runc simply won't work on macOS (it's GNU/Linux only). It should build and work on a GNU/Linux system though.

fanux commented 7 years ago

@cyphar why docker runtime is runc on macOS but runc can't build on mac?

xigang commented 7 years ago

github.com/opencontainers/runc/libcontainer/utils libcontainer/utils/utils_unix.go:38: undefined: syscall.SOCK_CLOEXEC

same problem. mark

cyphar commented 7 years ago

@fanux "Docker on macOS" uses Linux, they just use VMs (boot2docker or xhyve) to run Linux so they can run runc. They do a bunch of other tricks to make it look transparent.