Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.93k stars 10.71k forks source link

gtkwave commandline breaks after first start, subtools not usable #80901

Closed markusdd closed 4 years ago

markusdd commented 4 years ago

General troubleshooting steps

Description of issue

I'm installing gtkwave using brew cask install gtkwave. It creates a link in /usr/local/bin to the embedded bin_launcher script. I can then open a fresh terminal and type gtkwave, which will go through, but MacOS will complain about security, so I have to abort, allow it and then click open, it will then start. Also choosing the app launcher from GUI works from then on. From CLI though I will get the error below.

I am aware that I can add the path /Applications/gtkwave.app/Contents/Resources/bin/ to my env (from the link in the Caveats), but then I am overriding the gtkwave command with the perl script in the package. Launching gtkwave then works after installing the perl package, but e.g. rtlbrowse will complain like this:

dyld: Library not loaded: @executable_path/../Resources/lib/libgtk-quartz-2.0.0.dylib
  Referenced from: /Applications/gtkwave.app/Contents/Resources/bin/rtlbrowse
  Reason: image not found

I actually want to build a rather generic project build and gui startup flow, and wish to avoid ugly hardcoded mac specific paths. This should run on linux as well. So I would hope to just be able to call gtkwave, rtlbrowse, xml2stems in the scripts. Requiring other users or machines to patch their environments aside from installing the tools is usually a big ask and I do not know why gtkwave and related binaries are such a big hassle to install on Mac. icurus verilog, verilator etc. do not have these issues.

So all in all my questions are: Whats the purpose of the linked bin_launcher script if it always fails? Why are the other essential binaries not put into the path? What would be the recommended way to proceed?

Usuallly all other homebrew packages are a nice batteries included experience, but gtkwave is very different (I will say situation on Fink and Macports is not better).

Don't hesitate to ask if you have other questions.

Command that failed

gtkwave                                                                                                                                                                            
/usr/local/bin/gtkwave: line 122: test: too many arguments
/usr/local/bin/gtkwave: line 149: test: ==: unary operator expected
find: /share/locale: No such file or directory
/usr/local/bin/gtkwave: line 215: /usr/local/bin/../../../Contents/Resources/bin/: No such file or directory
/usr/local/bin/gtkwave: line 215: exec: /usr/local/bin/../../../Contents/Resources/bin/: cannot execute: No such file or directory

Output of command with --force --verbose --debug

brew itself does not fail

Output of brew cask doctor

brew cask doctor                                                                                                                                                                   ─╯
==> Homebrew Version
2.2.13
==> macOS
10.15.4
==> SIP
Enabled
==> Java
N/A
==> xattr issues
<NONE>
==> Gatekeeper support
Enabled
==> Homebrew Cask Install Location
<NONE>
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3536 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-1.38.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.5.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rexml-3.2.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.7.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.0.2.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-1.2.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thread_safe-0.3.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby
/Library/Ruby/Site/2.6.0
/Library/Ruby/Site/2.6.0/universal-darwin19
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/universal-darwin19
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19
/usr/local/Homebrew/Library/Homebrew
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin"
SHELL="/bin/zsh"

Output of brew tap

brew tap                                                                                                                                                                           
homebrew/cask
homebrew/core
vitorgalvao commented 4 years ago

I can then open a fresh terminal and type gtkwave, which will go through, but MacOS will complain about security, so I have to abort, allow it and then click open, it will then start.

That’s a macOS security feature. If you don’t want the protection, install with the --no-quarantine flag.

The rest of your issue is unrelated to Homebrew Cask, but to the tool itself, so you need to ask upstream.