docker-machine-driver-xhyve
docker-machine-driver-xhyve copied to clipboard
Failure to build with Xcode 10 / macOS 10.14 Mojave
Discovered during Homebrew testing: https://github.com/Homebrew/homebrew-core/issues/31740
The error is:
$ opam config exec -- make lib9p
vendor/lib9p/request.c:28:10: vendor/lib9p/pack.c:32:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
^~~~~~~~~~
vendor/lib9p/connection.c:28:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
^~~~~~~~~~
fatal error: 'stdlib.h' file not found
#include <stdlib.h>
^~~~~~~~~~
vendor/lib9p/log.c:28:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
make: *** [vendor/build/lib9p/log.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
1 error generated.
make: *** [vendor/build/lib9p/connection.o] Error 1
make: *** [vendor/build/lib9p/request.o] Error 1
make: *** [vendor/build/lib9p/pack.o] Error 1
eagerly awaiting this task
Looks like default Xcode installation through the store doesn't install this package:
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Tried compiling the lib independently and installing the package fixes the issue.
(To install do simply do open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg in a terminal
)
If you build the driver with qcow2 which is the default, you're gonna get this error:
[ERROR] The compilation of ocaml-system failed at "/private/tmp/docker-machine-driver-xhyve-20181011-14594-10x1d8n/.brew_home/.opam/opam-init/hooks/sandbox.sh build ocaml gen_ocaml_config.ml".
# === ERROR while compiling ocaml-system.4.07.0 ================================#
# context 2.0.0 | macos/x86_64 | | https://opam.ocaml.org#ebd2104d
# path ~/.opam/default/.opam-switch/build/ocaml-system.4.07.0
# command ~/.opam/opam-init/hooks/sandbox.sh build ocaml gen_ocaml_config.ml
# exit-code 71
# env-file /private/tmp/opam-jelmansouri-15282/ocaml-system-15282-2c871f.env
# output-file /private/tmp/opam-jelmansouri-15282/ocaml-system-15282-2c871f.out
### output ###
# sandbox-exec: sandbox_apply_container: Operation not permitted
The current workaround is to do:
brew install docker-machine-driver-xhyve --without-qcow2