Skip to content

Instantly share code, notes, and snippets.

@V0XNIHILI
Last active September 2, 2024 17:04
Show Gist options
  • Save V0XNIHILI/61d1e46684de56357990b5f75a14b8cc to your computer and use it in GitHub Desktop.
Save V0XNIHILI/61d1e46684de56357990b5f75a14b8cc to your computer and use it in GitHub Desktop.
How to compile GTKWave for Apple Silicon (M1/M2/M3 Macs)

How to compile GTKWave for Apple Silicon (M1/M2/M3 Macs)

Based on this tutorial for the M1 Mac, find below a step-by-step guide on how to compile GTKWave from scratch for the M3 MacBook (Pro). See my LinkedIn post with the short announcement here.

Note: it is a prerequisite to have HomeBrew installed (find installation instructions at site).

Steps

1. Install required Homebrew packages

brew install gtk+3 gtk-mac-integration tcl-tk desktop-file-utils meson cmake pango libffi zlib expat shared-mime-info

2. Set linker, compiler and package environment variables

export LDFLAGS="-L/opt/homebrew/opt/libffi/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libffi/include"
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:/opt/homebrew/opt/libffi/lib/pkgconfig:/opt/homebrew/opt/zlib/lib/pkgconfig:/opt/homebrew/opt/gtk+3/lib/pkgconfig:/opt/homebrew/opt/expat/lib/pkgconfig"

3. Build, compile and install GTKWave

git clone "[email protected]:gtkwave/gtkwave.git"
cd gtkwave
meson setup build -Dintrospection=false
meson compile -C build
meson install -C build

4. Run GTKWave!

gtkwave
@V0XNIHILI
Copy link
Author

@Kurumiiw happy to hear, enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment