based on this article https://ughe.github.io/2018/11/06/gtkwave-osx (which does not work for me, as is)
- Motivation
While installing and running GTKWave is straightforward on macOS, it is slightly more difficult to get the command line tool running properly:
$ /Applications/gtkwave.app/Contents/Resources/bin/gtkwave
Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Applications/gtkwave.app/Contents/Resources/bin/gtkwave line 2.
BEGIN failed--compilation aborted at /Applications/gtkwave.app/Contents/Resources/bin/gtkwave line 2.
- Fix
you need the same version of Perl that gtkwave uses under the hood, seemingly 5.18
.
brew install [email protected]
then follow what the article suggests with slightly modified commands, according to the version of Perl
/usr/local/Cellar/[email protected]/5.18.4_1/bin/cpan install Switch
sudo cp /usr/local/Cellar/[email protected]/5.18.4_1/lib/site_perl/5.18.4/Switch.pm /Library/Perl/5.18/
ln -s /Applications/gtkwave.app/Contents/Resources/bin/gtkwave /usr/local/bin
done, now you call gtkwave
from any location.
Nov 26, 2021