homebrew-delve
homebrew-delve copied to clipboard
Upgrade to delve fails
Tried a 'brew upgrade delve' to get that latest. It fails with the following error:
==> Upgrading 1 outdated package, with result:
go-delve/delve/delve 1.0.0-rc.1
==> Upgrading go-delve/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.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring go-1.9.sierra.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: 7,639 files, 293.7MB ==> Installing go-delve/delve/delve ==> Downloading https://github.com/derekparker/delve/archive/v1.0.0-rc.1.tar.gz ==> Downloading from https://codeload.github.com/derekparker/delve/tar.gz/v1.0.0-rc.1 ######################################################################## 100.0% ==> dlv-cert is already installed, no need to create it ==> make build BUILD_SHA=v1.0.0-rc.1 Last 15 lines from /Users/pgissel/Library/Logs/Homebrew/delve/01.make: 2017-08-29 07:31:56 -0700
make build BUILD_SHA=v1.0.0-rc.1
go build -ldflags="-s" github.com/derekparker/delve/cmd/dlv
github.com/derekparker/delve/pkg/proc/native
src/github.com/derekparker/delve/pkg/proc/native/threads.go:16:28: undefined: WaitStatus src/github.com/derekparker/delve/pkg/proc/native/threads.go:24:18: undefined: OSSpecificDetails make: *** [build] Error 2
OSSpecificDetails and WaitStatus are defined in pkg/proc/native/threads_darwin.go. I don't see a reason why your compiler isn't seeing them. You could manually do a go build -x -ldflags="-s" github.com/derekparker/delve/cmd/dlv
and see what the output is.
It looks like this is caused by having cgo
disabled. I was able to fix this issue by adding the CGO_ENABLED=1
environment variable, like CGO_ENABLED=1 brew install go-delve/delve/delve
Source: https://github.com/derekparker/delve/issues/790
@BrianBland @derekparker I tried CGO_ENABLED=1 brew install go-delve/delve/delve
, but it still does not work on a up-to-date macOS and Homebrew.
@nikolay what is the output of that command?
I'm getting an error as well when I try to install it enabling CGO, this is the output:
$ CGO_ENABLED=1 brew install go-delve/delve/delve
==> Installing delve from go-delve/delve
==> Downloading https://github.com/derekparker/delve/archive/v1.0.0-rc.2.tar.gz
Already downloaded: /Users/xyz/Library/Caches/Homebrew/delve-1.0.0-rc.2.tar.gz
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-c
==> [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/xyz/Library/Logs/Homebrew/delve/02.sudo:
2017-12-17 15:43:56 -0600
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
Delve Install on OSX High Sierra 10.13.1 https://github.com/go-delve/homebrew-delve/issues/24
$ brew --version
Homebrew 1.4.0
macOS: High Sierra
Version: 10.13.2 (17C88)
Same here:
CGO_ENABLED=1 brew install go-delve/delve/delve
==> Installing delve from go-delve/delve
==> Downloading https://github.com/derekparker/delve/archive/v1.0.0-rc.2.tar.gz
Already downloaded: /Users/xxx/Library/Caches/Homebrew/delve-1.0.0-rc.2.tar.gz
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.c
==> [SUDO] Installing dlv-cert as root
==> sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.
Last 15 lines from /Users/xxx/Library/Logs/Homebrew/delve/02.sudo:
2017-12-18 17:03:27 +0300
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
Delve Install on OSX High Sierra 10.13.1 https://github.com/go-delve/homebrew-delve/issues/24
brew --version
Homebrew 1.4.0
Homebrew/homebrew-core (git revision c33d; last commit 2017-12-18)
macOS: Sierra
Version: 10.12.6
Any updates so far?
@eiser82 @dvsekhvalnov have you tried the certificate fix here? https://github.com/go-delve/homebrew-delve/issues/19#issuecomment-330442033
You may need to do this to properly install the self-signed cert and then use CGO_ENABLED=1 brew install go-delve/delve/delve
to properly compile the package.
Hi @BrianBland ,
thanks for reference, somehow missed it. Yep, worked for me. (Though fixing homebrew installation could be nice).
Thanks !
Error: security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
the log was like
NMBP:workspace simon$ brew install go-delve/delve/delve
Updating Homebrew...
==> Installing delve from go-delve/delve
==> Downloading https://github.com/derekparker/delve/archive/v1.0.0-rc.2.tar.gz
Already downloaded: /Users/simon/Library/Caches/Homebrew/delve-1.0.0-rc.2.tar.gz
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/simon/Library/Logs/Homebrew/delve/02.sudo:
2017-12-19 21:33:08 +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
I ran into the very same problem with Sierra 10.12.6 and CGO_ENABLED=1 brew install go-delve/delve/delve
didn't help :(
xcode-select --install
helped in my case. not sure if it is related
check comment, works on latest Mac. In summary, install dlv-cert separately then run the command is OK.
same to @Lida4py , didn't help. Use CGO_ENABLED=1 brew install go-delve/delve/delve
Using the manual installation worked for me.
https://github.com/derekparker/delve/blob/master/Documentation/installation/osx/install.md#manual-install
I am using vscode debgger
tks @BrianBland ,
actually I did this: cd $HOME/Library/Caches/Homebrew tar xf delve-*.gz go into directory ( mine is delve-1.0.0-rc.1 ) sh scripts/gencert.sh it will asks for password, and you're done. After that just re run brew install go-delve/delve/delve and it will pass without problems
run this before brew install go-delve/delve/delve
work for me
tks @BrianBland it's perfect
manual installation worked for me in VScode and latest mac
Just run
go get -u github.com/derekparker/delve/cmd/dlv