go-delve / homebrew-delve

Homebrew formula for the Delve Go debugger
Apache License 2.0
48 stars 13 forks source link

MacOS install err #10

Closed lakruzz closed 7 years ago

lakruzz commented 7 years ago

I get this:

> brew install go-delve/delve/delve

==> Tapping go-delve/delve
Cloning into '/usr/local/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.
Checking connectivity... done.
Tapped 1 formula (32 files, 37.2K)
==> Installing delve from go-delve/delve
==> Downloading https://github.com/derekparker/delve/archive/v0.12.1.tar.gz
==> Downloading from https://codeload.github.com/derekparker/delve/tar.gz/v0.12.1
######################################################################## 100.0%
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-ce
==> [SUDO] Installing dlv-cert as root
==> sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
Password:
Password:
==> sudo security import dlv-cert.key -A -k /Library/Keychains/System.keychain
==> [SUDO] Killing taskgated
==> sudo pkill -f /usr/libexec/taskgated
==> make build BUILD_SHA=v0.12.1
Last 15 lines from /Users/lak/Library/Logs/Homebrew/delve/05.make:
2017-03-22 09:33:34 +0100

make
build
BUILD_SHA=v0.12.1

go build -ldflags="-s -X main.Build=v0.12.1" github.com/derekparker/delve/cmd/dlv
# github.com/derekparker/delve/proc
clang: warning: no such sysroot directory: ''
In file included from src/github.com/derekparker/delve/proc/proc_darwin.go:3:
./proc_darwin.h:1:10: fatal error: 'sys/types.h' file not found
#include <sys/types.h>
         ^
1 error generated.
make: *** [build] Error 2
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/go-delve/homebrew-delve/issues

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:353:in `open_http': 422 Unprocessable Entity (GitHub::Error)
Validation Failed
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:709:in `buffer_open'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:210:in `block in open_loop'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:208:in `catch'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:208:in `open_loop'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:149:in `open_uri'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:689:in `open'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:30:in `open'
    from /usr/local/Library/Homebrew/utils.rb:523:in `open'
    from /usr/local/Library/Homebrew/utils.rb:554:in `issues_matching'
    from /usr/local/Library/Homebrew/utils.rb:586:in `issues_for_formula'
    from /usr/local/Library/Homebrew/exceptions.rb:222:in `fetch_issues'
    from /usr/local/Library/Homebrew/exceptions.rb:218:in `issues'
    from /usr/local/Library/Homebrew/exceptions.rb:263:in `dump'
    from /usr/local/Library/brew.rb:132:in `rescue in <main>'
    from /usr/local/Library/brew.rb:28:in `<main>'

The Error message is fishy though - I don't have neither Fink - nor MacPorts installed

lakruzz commented 7 years ago

Aaargh!

Running it again 5 mins later says:

>brew install go-delve/delve/delve
==> Installing delve from go-delve/delve
==> Downloading https://github.com/derekparker/delve/archive/v0.12.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/delve-0.12.1.tar.gz
==> dlv-cert is already installed, no need to create it
==> make build BUILD_SHA=v0.12.1
==> 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).

==> Summary
🍺  /usr/local/Cellar/delve/0.12.1: 5 files, 10.7M, built in 19 seconds

And then opening a new terminal and running it again gives me:

>brew install go-delve/delve/delve
Warning: go-delve/delve/delve-0.12.1 already installed

And dlv it actually seems like it working as expected.

Hmmmmm????

lakruzz commented 7 years ago

Well - when analyzing my cmd history I actually also ran xcode-select --install in between attempts? (grasping for straws)

Could that really explain it?

Well - anyway - I'm having a dialog with my self here - thanks for listening 👍

aarzilli commented 7 years ago

Could that really explain it?

yes.