Please update the documentation to highlight that it does not work on OSX 10.12.2
Error message is: could not launch process: could not get thread count
This is how I got it to work:
— Install via brew
— then you need to change delve version locally.
cd $GOPATH/src/github.com/derekparker/'
cd delve
git fetch origin pull/665/head
git checkout FETCH_HEAD
CERT=dlv-cert make install
Make sure you run the one you built, i.e. $GOPATH/bin/dlv debug
@andrewbruno Thanks for this.
Are you cloning the repo into $GOPATH/src/github.com/derekparker/ before you git fetch origin pull/665/head? Or should brew be putting it there?
I've been trying every combination in 10.12.2 with no luck.
Thanks!
@aaronhackney I followed these two instructions on how to do a manual install (after installing with brew).
And then used @andrewbruno's instructions to get it working.
Thanks for the feedback. Here is what I have learned:
I installed on my home iMac running 10.12.2 using the HEAD method and delve works just fine!
Installing on my Macbook Pro Laptop, which has my company's corporate image on it, I get the errors and it does not work. I used the exact same method and I'm running the exact same version of 10.12.2. I suspect there is some corporate security software that is preventing delve from accessing the threads, even though, when prompted, I entered my credentials with super-user access. Perhaps it's anti-virus or something. I'm not sure. I'm going to attempt to find out from our help desk what we may be running that could be interfering with delve's thread access. Thanks again for the suggestions!
Here is a gist of a successful install on 10.12.2 if anyone is interested.
https://gist.github.com/aaronhackney/1ad35a5824bd66701504f9156fcdc99a
Thanks!
Can confirm this worked for me!
I was able to trace my issue to the Crowd Strike Falcon Host protection client installed on my MBP. https://www.crowdstrike.com/products/falcon-host/ Once I removed this client, the thread issues went away. We have opened a ticket with CrowdStrike to see if we can get delve whitelisted.
@derekparker Since the Mac OSX issue seems to come up a lot in the issues section, I made a quick howto detailing as many steps as I could. https://github.com/aaronhackney/delve_on_mac
Thanks again for your project!
this worked for me:
brew install go-delve/delve/delve --HEAD
This should be solved, the latest version of Delve should now be available in the latest HomeBrew formula as of https://github.com/go-delve/homebrew-delve/commit/f27054f461fbe547dd95abac4f70df18f6782e24 (merged 4 days ago).
when I install delve on OSX use homebrew ,it failed.I got the message follow:
$brew install go-delve/delve/delve
==> Tapping go-delve/delve
Cloning into '/usr/local/Homebrew/Library/Taps/go-delve/homebrew-delve'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 0), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
Tapped 1 formula (33 files, 41.4KB)
==> Installing delve from go-delve/delve
==> Installing dependencies for go-delve/delve/delve: go
==> Installing go-delve/delve/delve dependency: go
==> Downloading https://homebrew.bintray.com/bottles/go-1.9.2.el_capitan.bottle.tar.gz
==> Pouring go-1.9.2.el_capitan.bottle.tar.gz
==> Caveats
A valid GOPATH is required to use the go get command.
If $GOPATH is not specified, $HOME/go will be used by default:
https://golang.org/doc/code.html#GOPATH
You may wish to add the GOROOT-based install location to your PATH:
export PATH=$PATH:/usr/local/opt/go/libexec/bin
==> Summary
/usr/local/Cellar/go/1.9.2: 7,646 files, 293.9MB
==> Installing go-delve/delve/delve
==> Downloading https://github.com/derekparker/delve/archive/v1.0.0-rc.2.tar.gz
==> Downloading from https://codeload.github.com/derekparker/delve/tar.gz/v1.0.0-rc.2
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
==> Generating dlv-cert
==> openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.cfg -extensions codesign_reqext -batch -out dlv-ce
==> [SUDO] Installing dlv-cert as root
==> sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
Last 15 lines from /Users/leeco/Library/Logs/Homebrew/delve/02.sudo:
2017-11-21 18:57:52 +0800
sudo
security
add-trusted-cert
-d
-r
trustRoot
-k
/Library/Keychains/System.keychain
dlv-cert.cer
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/go-delve/homebrew-delve/issues
These open issues may also help:
Upgrade to delve fails https://github.com/go-delve/homebrew-delve/issues/20
@derekparker ,@jsaguiar:
your advices are useful. The latest version can solves the problem.
so,install the latest version,then it is success.
brew install go-delve/delve/delve --HEAD
➜ dev brew install go-delve/delve/delve --HEAD
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
libressl
==> Installing delve from go-delve/delve
==> Cloning https://github.com/derekparker/delve.git
Updating /Users/zerak/Library/Caches/Homebrew/delve--git
==> Checking out branch master
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
==> Generating dlv-cert
==> openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.cfg -extensions codesign_reqext -batch -out dlv-cert.cer -keyout dlv-cert.key
==> [SUDO] Installing dlv-cert as root
==> sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
Last 15 lines from /Users/zerak/Library/Logs/Homebrew/delve/02.sudo:
2017-12-22 01:03:34 +0800
sudo
security
add-trusted-cert
-d
-r
trustRoot
-k
/Library/Keychains/System.keychain
dlv-cert.cer
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/go-delve/homebrew-delve/issues
These open issues may also help:
Upgrade to delve fails https://github.com/go-delve/homebrew-delve/issues/20
➜ dev go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/zerak/Project/goPro/"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4y/4gqbm3y57dn7n0nfzmwg9c1h0000gn/T/go-build802535093=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
➜ dev brew info delve
go-delve/delve/delve: stable 1.0.0-rc.2, HEAD
Debugger for the Go programming language.
https://github.com/derekparker/delve
Not installed
From: https://github.com/go-delve/homebrew-delve/blob/master/Formula/delve.rb
==> Dependencies
Build: go ✔
==> Caveats
If you get "could not launch process: could not fork/exec", you need to try
in a new terminal.
When uninstalling, to remove the dlv-cert certificate, run this command:
$ sudo security delete-certificate -t -c dlv-cert /Library/Keychains/System.keychain
Alternatively, you may want to delete from the Keychain (with the Imported private key).
the go version go1.9.2 darwin/amd64
it's not work for me
macOs version 10.13.2
Same here. macOS 10.13.3, --HEAD or not, cannot install delve with exact same error.
@unjello also on macOS 10.13.3, this worked for me:
$ dlv version
Delve Debugger
Version: 1.0.0-rc.2
Build: 62fe792bfdf6599ad06c084096efd96a01246ab8
and
go version go1.9.3 darwin/amd64
@mihei hmm... wierd. It did indeed install today as you say. Maybe just a glitch in a spore network. Thanks for making me re-try it!
Same problem for me on 10.13.3 (17D47)
brew install -vd go-delve/delve/delve --HEAD
==> sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
Failed to execute: sudo
/usr/local/Homebrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb
/usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'
If this was mentioned on the install page it would have saved me a lot of trouble.
The fix mentioned here works for me
`brew install go-delve/delve/delve --HEAD
Error: No available formula with the name "go-delve/delve/delve"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.`
Most helpful comment
➜ dev brew install go-delve/delve/delve --HEAD
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
libressl
==> Installing delve from go-delve/delve
==> Cloning https://github.com/derekparker/delve.git
Updating /Users/zerak/Library/Caches/Homebrew/delve--git
==> Checking out branch master
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
==> Generating dlv-cert
==> openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.cfg -extensions codesign_reqext -batch -out dlv-cert.cer -keyout dlv-cert.key
==> [SUDO] Installing dlv-cert as root
==> sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
Last 15 lines from /Users/zerak/Library/Logs/Homebrew/delve/02.sudo:
2017-12-22 01:03:34 +0800
sudo
security
add-trusted-cert
-d
-r
trustRoot
-k
/Library/Keychains/System.keychain
dlv-cert.cer
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/go-delve/homebrew-delve/issues
These open issues may also help:
Upgrade to delve fails https://github.com/go-delve/homebrew-delve/issues/20
➜ dev go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/zerak/Project/goPro/"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4y/4gqbm3y57dn7n0nfzmwg9c1h0000gn/T/go-build802535093=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
➜ dev brew info delve
go-delve/delve/delve: stable 1.0.0-rc.2, HEAD
Debugger for the Go programming language.
https://github.com/derekparker/delve
Not installed
From: https://github.com/go-delve/homebrew-delve/blob/master/Formula/delve.rb
==> Dependencies
Build: go ✔
==> Caveats
If you get "could not launch process: could not fork/exec", you need to try
in a new terminal.
When uninstalling, to remove the dlv-cert certificate, run this command:
Alternatively, you may want to delete from the Keychain (with the Imported private key).
the go version go1.9.2 darwin/amd64
it's not work for me
macOs version 10.13.2