
On macOS 10.14 Apple changed the command line tools so that system headers now need to be manually installed. Instead of adding one extra install step to the install procedure add a build tag to allow compilation of delve without the native backend on macOS. By default (i.e. when using `go get`) this is how delve will be compiled on macOS, the make script is changed to enable compiling the native backend if the required dependencies have been installed. Insure that both configuration still build correctly on Travis CI and change the documentation to describe how to compile the native backend and that it isn't normally needed. Fixes #1359
984 B
984 B
Installation on OSX
Ensure you have a proper compilation toolchain.
This should be as simple as:
xcode-select --install
Now you can install delve using go get
:
$ go get -u github.com/derekparker/delve/cmd/dlv
With this method you will not be able to use delve's native backend, but you don't need it anyway: the native backend on macOS has known problems on recent issues of the OS and is not currently maintained.
Compiling the native backend
Only do this if you have a valid reason to use the native backend.
- Run
xcode-select --install
- On macOS 10.14 manually install the legacy include headers by running
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
- Clone the repo into
$GOPATH/src/github.com/derekparker/delve
- Run
make install
in that directory
The makefile will take care of creating and installing a self-signed certificate automatically.