8000 Unable to launch GTKWave on macOS Sonoma · Issue #250 · gtkwave/gtkwave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Unable to launch GTKWave on macOS Sonoma #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
andylin2004 opened this issue Sep 15, 2023 · 85 comments
Open

Unable to launch GTKWave on macOS Sonoma #250

andylin2004 opened this issue Sep 15, 2023 · 85 comments

Comments

@andylin2004
Copy link
Screenshot 2023-09-15 at 8 55 51 AM

This prompt will show up, and then the app will close out

@gtkwave
Copy link
Collaborator
gtkwave commented Sep 15, 2023 via email

@andylin2004
Copy link
Author

I am using version 3.3.107, installed via brew on macOS.

@gtkwave
Copy link
Collaborator
gtkwave commented Sep 17, 2023 via email

@randomplum
Copy link
Contributor
randomplum commented Sep 27, 2023

@andylin2004

if you're using brew you can try:

class Gtkwave < Formula
desc "GTKWave"
homepage "https://gtkwave.sourceforge.net"
license "GPL-2.0-or-later"
head "https://github.com/randomplum/gtkwave.git", branch: "macos_sonoma"

depends_on "desktop-file-utils" => :build # for update-desktop-database
depends_on "shared-mime-info" => :build
depends_on "gobject-introspection" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "gtk+3"

def install
ENV["DESTDIR"] = "/"
system "meson", "setup", "build", *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end

end

save it in gtkwave.rb file and run brew install --build-from-source --HEAD ./gtkwave.rb

This is the only needed part of the patch I have in the fork
regex

There is however a problem, on Apple silicon based laptops GTKWave only displays waveforms correctly on the external screen. when using the build in screen, only 1/4 of the waveform window renders waveforms

gtkwave_1_4

I'm looking into it, but any ideas on what's happening are welcome.

@rfuest
Copy link
Collaborator
rfuest commented Sep 28, 2023

I'm kind of surprised that GTKWave build on macOS at the moment, because I didn't have any way of testing it during the rewrite. But it's nice to see that it still works. The same regex line did also cause issues in some Windows builds in the past.

There is however a problem, on Apple silicon based laptops GTKWave only displays waveforms correctly on the external screen. when using the build in screen, only 1/4 of the waveform window renders waveforms

I'm looking into it, but any ideas on what's happening are welcome.

This probably has something to do with display scaling, maybe the image surface isn't large enough. You can try to manually increase the size here, to try to debug the issue: https://github.com/gtkwave/gtkwave/blob/a2cb676327193e37bf99615d0388d752938b170c/src/wave_view.c#L701C1-L706C86
But the entire drawing code will be replaced soon and I would suggest to not spend too much time on trying to fixing this.

@dpretet
Copy link
dpretet commented Sep 28, 2023

Hello,

I have the same problem than @andylin2004 and would be glad to keep GTKWave in my workflow If possible. Thanks @randomplum for the fix :) It works also on my side with the same 1/4 issue. I use a mbp m1 2020 if useful for anybody.

Damien

@randomplum
Copy link
Contributor
randomplum commented Sep 28, 2023

@rfuestThat was it

gtkwave/src/wave_view.c

Lines 700 to 712 in 0fe81d1

scale = gtk_widget_get_scale_factor(widget);
allocation->width *= scale;
allocation->height *= scale;
g_clear_pointer(&self->traces_surface, cairo_surface_destroy);
self->traces_surface =
gdk_window_create_similar_image_surface(gtk_widget_get_window(widget),
CAIRO_FORMAT_ARGB32,
allocation->width,
allocation->height,
scale);

I'm not familiar enough with gtk to know of it's a proper way to do it, but https://docs.gtk.org/gdk3/method.Window.create_similar_image_surface.html points to scaling width and height you feed to gdk_window_create_similar_image_surface.

I was also surprised that it worked so easily (I even got it to build a proper .app without homebrew, but this takes quite a bit more hacking to get for not much gain), good job!

Would You accept this and regex_t with the APPLE if def ?
Unless this code will be gone by the time 3.4.0 get's released.
Either way I'll try to push the homebrew formula when the 3.4.x get's released, if you're ok with it.

For anyone wanting to run on macos, I've updated my fork. if there is enough people interested I can setup a homebrew tap.

@andylin2004
Copy link
Author

@rfuest @randomplum Thanks y'all for the help on getting this whole issue fixed! Sorry I couldn't be of help (since I'm relatively unfamiliar with the frameworks used in this project and it's academic season for me)

@rfuest
Copy link
Collaborator
rfuest commented Sep 28, 2023

I'm not familiar enough with gtk to know of it's a proper way to do it, but https://docs.gtk.org/gdk3/method.Window.create_similar_image_surface.html points to scaling width and height you feed to gdk_window_create_similar_image_surface.

Thanks for verifying this. I can't replicate the problem at the moment, because I don't have a HiDPI display and trying to enable scaling in Linux did just result in a blurry display.

One thing I noticed is that the current code actually modifies the passed allocation object, which might not be a good idea. You could try this code to see if it changes anything:

    scale = gtk_widget_get_scale_factor(widget);

    g_clear_pointer(&self->traces_surface, cairo_surface_destroy);

    self->traces_surface =
        gdk_window_create_similar_image_surface(gtk_widget_get_window(widget),
                                                CAIRO_FORMAT_ARGB32,
                                                allocation->width * scale,
                                                allocation->height * scale,
                                                scale);

@andylin2004
Copy link
Author

Also for curiosity sake, how did you make a .app binary for gtkwave?

@randomplum
Copy link
Contributor
randomplum commented Sep 28, 2023

@rfuest Yes, I agree. Tested and it works correctly.
I've also setup a hombrew tap. Now it should be possible for everyone to just run
brew install --HEAD randomplum/gtkwave/gtkwave
and it'll build master branch gtkwave.
This is the patch it applies in order to build and work:
https://github.com/randomplum/homebrew-gtkwave/blob/f9e0b2f5fdc02d4c9aa09f26ac6b0bd267df9c60/macos_compat.diff

@andylin2004 macos .app are just directories with specific structure and a Info.plist file. The real fun starts when the app is using some libraries and you want to make it portable. You basically need to rebuild all the prerequisites against MacOS SDK and make library paths relative. Then for distribution you need to sign all the files, ideally with a nice apple developer program signature (99$/year) so you don't anger the Gatekeeper.

@diogratia
Copy link

First off, I really appreciate what you guys have been doing. I have a slight problem with the result which may be from my naivete on the subject:

Screenshot 2023-09-29 at 4 23 38 PM

The size of the waveforms and text in the waves frame are scaled a bit small as is the text in the associated signals frame.

I've prefixed invoking your tap

arch -x86_64 brew install --HEAD randomplum/gtkwave/gtkwave

because I have both an arm64 Homebrew installation (for a native ghdl-llvm) and an x86_64 installation in /usr/local for ghdl nightly builds both supplying supplying a llvm@15.

This is on a 2020 Macbook Air M1 running macOS 14.0.

System Settings -> Displays -> Built-in Display -> 1680 x 1050 (which scales text to be readable on the 13.3 inch panel for compliant applications)`

Any hints on how to deal with the vertical height in the unlabelled waves and signals frames? I'd imagine that has to do with the ratio of the internal'virtual' display size and the actual screen size (2560 x 1600) of 0.64453125 on X and 0.65625 on Y.

Nothing showing up on stdout/stderr when running gtkwave or exiting.

@randomplum
Copy link
Contributor

@diogratia I think the problem can be that there is no Monospace font in macos, and that's the default (I have custom font in .gtkwaverc so I didn't notice). You can change font and size in the .gtkwaverc file (you most likely need to create one in user home directory).
I run this:
fontname_signals "Hack Nerd Font Mono" 16
fontname_waves "Hack Nerd Font Mono" 12

I use Hack Nerd Font which is not part of macos, but you can replace "Hack Nerd Font Mono" with "Menlo" which is macos monospace font.

@randomplum
Copy link
Contributor
randomplum commented Sep 29, 2023

@diogratia I found the problem. I've updated my tap to now build gtkwave with full mac integration support, this should make the default font correct.
since it's head only formula tap to update you need to run:
brew uninstall gtkwave
brew untap randomplum/gtkwave
brew install --HEAD randomplum/gtkwave/gtkwave

@rfuest I've added some more changes to get the gtk-mac-integrations to work https://github.com/randomplum/homebrew-gtkwave/blob/11cd7d28cf0324f07dc9ec189b404c438fdaf7e8/macos_compat.diff

@rfuest @gtkwave let me know if you're open to a PR for improved macos support. I'm open to keep supporting it for as long as I'm using a mac.

@rfuest
Copy link
Collaborator
rfuest commented Sep 29, 2023

@rfuest I've added some more changes to get the gtk-mac-integrations to work https://github.com/randomplum/homebrew-gtkwave/blob/11cd7d28cf0324f07dc9ec189b404c438fdaf7e8/macos_compat.diff

I've just applied the type change of preg_regex_c_1 to regex_t unconditionally. The same issue existed on Windows and I think the original code was incorrect. There should be no need for an ifdef anymore. I'll take a closer look at the rest of the changes when you open a PR for them.

@rfuest @gtkwave let me know if you're open to a PR for improved macos support. I'm open to keep supporting it for as long as I'm using a mac.

Sure, any help is appreciated. Tony and I both have the problem that we can't support the macOS version, because we don't have access to the appropriate hardware. It would be great if you could take over support for the macOS version. At some point we should also setup CI to build a macOS version to at least get a notification if we did accidentally break macOS support in the future.

@andylin2004
Copy link
Author
andylin2004 commented Sep 29, 2023

@diogratia I found the problem. I've updated my tap to now build gtkwave with full mac integration support, this should make the default font correct. since it's head only formula tap to update you need to run: brew uninstall gtkwave brew untap randomplum/gtkwave brew install --HEAD randomplum/gtkwave/gtkwave

@rfuest I've added some more changes to get the gtk-mac-integrations to work https://github.com/randomplum/homebrew-gtkwave/blob/11cd7d28cf0324f07dc9ec189b404c438fdaf7e8/macos_compat.diff

@rfuest @gtkwave let me know if you're open to a PR for improved macos support. I'm open to keep supporting it for as long as I'm using a mac.

I'm attempting to reinstall gtkwave via these instructions, but it doesn't seem to be working, with the terminal output showing this:

Treating gtkwave as a formula. For the cask, use homebrew/cask/gtkwave
==> Fetching randomplum/gtkwave/gtkwave
==> Downloading https://raw.githubusercontent.com/randomplum/homebrew-gtkwave/ma
######################################################################### 100.0%
==> Cloning https://github.com/gtkwave/gtkwave.git
Updating /Users/andylin/Library/Caches/Homebrew/gtkwave--git
==> Checking out branch master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at d011156 Add GwColorTheme to manage waveform colors
==> Installing randomplum/gtkwave/gtkwave
8000
 
==> Patching
==> Applying macos_compat.diff
patching file meson.build
patching file 'src/cocoa/cocoa_misc.c'
patching file 'src/cocoa/cocoa_misc.h'
patching file 'src/main.c'
patching file 'src/meson.build'
No file to patch.  Skipping...
2 out of 2 hunks ignored--saving rejects to 'src/wave_view.c.rej'

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/randomplum/homebrew-gtkwave/issues

gtkwave's formula was built from an unstable upstream --HEAD.
This build failure is expected behaviour.
Do not create issues about this on Homebrew's GitHub repositories.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.

I'll stick to the manual install for now

Edit: I think what's going on is that the patch file expects wave_view.c but the actual file is named gw-wave_view.c when it attempts to patch the file

Edit 2: that was indeed the case! I have forked off of @randomplum's tap with the edits made to fix the patch and compile issues. However, with this new fork, the program has an assertion issue: (gtkwave:91845): Gtk-CRITICAL **: 22:31:59.668: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed

@krishnachaitanya1132
Copy link

@diogratia I found the problem. I've updated my tap to now build gtkwave with full mac integration support, this should make the default font correct. since it's head only formula tap to update you need to run: brew uninstall gtkwave brew untap randomplum/gtkwave brew install --HEAD randomplum/gtkwave/gtkwave

@rfuest I've added some more changes to get the gtk-mac-integrations to work https://github.com/randomplum/homebrew-gtkwave/blob/11cd7d28cf0324f07dc9ec189b404c438fdaf7e8/macos_compat.diff

@rfuest @gtkwave let me know if you're open to a PR for improved macos support. I'm open to keep supporting it for as long as I'm using a mac.

Hello @randomplum
I tried the brew install command as you mentioned in my apple M2 silicon with macOs 14 and facing error as below. can you let me if there is any workaround for this
error

@randomplum
Copy link
Contributor

@andylin2004 @krishnachaitanya1132 This is the problem when applying patches to an active repo.
I've pinned the tap to a forked repo so it's stable for now, until gtkwave gets to the release.

This is an experimental tap that builds git master branch, issues are expected.
please report tap issues here: https://github.com/randomplum/homebrew-gtkwave/issues

@andylin2004 I'm aware of the GTK asserts, I'll address them at some point in the future. It doesn't affect most of the application.

@krishnachaitanya1132
Copy link
krishnachaitanya1132 commented Sep 30, 2023

Can you let me know how to brew install using forked repo.
In the above run i just gave the brew install -HEAD cmd as you suggested.

Should I download the forked repo and install it as usual??
Using

  • ./configure
  • make
  • sudo make install

@randomplum
Copy link
Contributor

Can you let me know how to brew install using forked repo. In the above run i just gave the brew install -HEAD cmd as you suggested.

Should I download the forked repo and install it as usual?? Using

  • ./configure
  • make
  • sudo make install

@krishnachaitanya1132 The forked repo should be transparent.
All you need is to run those commands (if you didn't get it to install before just the last command should be enough)
brew uninstall gtkwave
brew untap randomplum/gtkwave
brew install --HEAD randomplum/gtkwave/gtkwave

@diogratia
Copy link

@randomplum

After finding the issue reported here I found your closed homebrew-gtkwave issue #1 and figured from the description it was the same cause so didn't stir the pot further.

I had noticed the File -> Grab to File has a scaling problem showing about a quarter of the gtkwave window and after your tap update allowing gtkwave to be built again the portion grabbed got smaller again while being enlarged. Not trying to push priorities, macOS users can screenshot the window just fine.

I also noticed the font and size in the SST frame is different from the waves frame. Checking the gtkwaverc.5 man page and checking every (albeit a bit dated) .gtkwaverc file I have none of them contain fontname_logfile, fontname_signals or fontname_waves. I can easily imagine the defaults are different and now as shown.

Thanks for all the great work.

@dlueder
Copy link
dlueder commented Oct 1, 2023

Can you let me know how to brew install using forked repo. In the above run i just gave the brew install -HEAD cmd as you suggested.
Should I download the forked repo and install it as usual?? Using

  • ./configure
  • make
  • sudo make install

@krishnachaitanya1132 The forked repo should be transparent. All you need is to run those commands (if you didn't get it to install before just the last command should be enough) brew uninstall gtkwave brew untap randomplum/gtkwave brew install --HEAD randomplum/gtkwave/gtkwave

Small feedback, works perfectly fine under Sonoma 14.0 with a M1 Pro - Thanks for the quick fix and resolution!

@Khizarkk7
Copy link

GTK wave is not working macbook software: sonoma 14.1
Screenshot 2023-11-03 at 7 47 21 PM
Screenshot 2023-11-03 at 7 45 18 PM
this are the pop kindly resolve this we are facing this problem macbook software: Sonoma 14.1

@Khizarkk7
Copy link

Simply showing a screenshot doesn't convey much information.  What is the version of gtkwave and where did you get it? Is this with respect to the binaries grabbed off the sourceforge site?  If so, sorry, I don't own a Mac.  Those binaries were compiled on a machine running a Snow Leopard (10.6) VM created from back around 2011 or so.  I stopped creating binaries when it looked like compatibility issues would start occurring. Thanks, -Tony Message ID: @.***>

### From here

Screenshot 2023-11-03 at 7 51 52 PM

@andylin2004
Copy link
Author
andylin2004 commented Nov 3, 2023 via email

@rfuest
Copy link
Collaborator
rfuest commented Aug 15, 2024

Are you sure it is 5.34. Because I am unable to install this one. I get this msg.

No I'm not, this was just based on the error message.

Um, I had tried to install through homebrew first but as that doesn't work. I installed the homebrew tap as directed. Nothing else.

I guess that this is your problem. It seems like the original version of GTKWave from the homebrew repo hasn't been removed entirely. Try to remove all versions of GTKWave before you try to reinstall it from randomplum's tap.

@zoe780
Copy link
zoe780 commented Aug 17, 2024

Well, it seems, that was the problem. I uninstalled everything related to gtkwave and reinstalled the tap. It works fine now. BTW, if you want a .app, you can create an automator application.
Thank you so much for your support.

@SebasLopez2005
Copy link

Is there any way to open Gtkwave without opening it from the terminal? Like having a desktop shortcut somehow? Thanks!

@daylanpereira
Copy link

Hay alguna forma de usar GTKwave en mi Mac m2???

@peterballard
Copy link

Another user here suffering after "upgrading" to Sonoma, with an Apple M1...

First I had to delete and reinstall MacPorts before I could run "sudo ports". Then I did what was recommended above for an Apple M1:
sudo port install gtk2 +quartz
sudo port install gtk-osx-application-gtk2
sudo port install gtkwave

But when I ran it, I got:

2024-09-16 13:32:14.420 gtkwave[37627:1423660] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 

GTKWave Analyzer v3.3.117 (w)1999-2023 BSI

GTKWAVE | Use the -h, --help command line flags to display help.

(gtkwave:37627): Gtk-CRITICAL **: 13:32:14.459: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed

I did get a gtkwave window but it was unusable, i.e. clicking on signal names only worked intermittently, and no waveform displayed.

uninstalled (sudo port uninstall gtkwave, sudo port install gtk-osx-application-gtk2) and reinstalled... no change.

So I uninstalled again (sudo port uninstall gtkwave) and tried the homebrew fix instead:

brew uninstall gtkwave
brew untap randomplum/gtkwave
brew install --HEAD randomplum/gtkwave/gtkwave

But again it was unusable. Running gtkwave gave many screenfuls of errors, beginning with this:

GTKWave Analyzer v3.4.0 (w)1999-2022 BSI

GTKWAVE | Use the -h, --help command line flags to display help.

** (gtkwave:444): CRITICAL **: 14:16:27.769: gw_dump_file_get_time_range: assertion 'GW_IS_DUMP_FILE(self)' failed

** (gtkwave:444): CRITICAL **: 14:16:27.770: gw_time_range_get_start: assertion 'GW_IS_TIME_RANGE(self)' failed

** (gtkwave:444): CRITICAL **: 14:16:27.770: gw_time_range_get_end: assertion 'GW_IS_TIME_RANGE(self)' failed

So I'm out of ideas. Any suggestions or help would be appreciated!

@rfuest
Copy link
Collaborator
rfuest commented Sep 16, 2024

But again it was unusable. Running gtkwave gave many screenfuls of errors, beginning with this:

Could you provide some more details in which way GTKWave 3.4 was unusable?

The errors are a know problem in the older GIT version of GTKWave which randomplum's homebrew tap is based on. They should only appear if no file is open and can usually be ignored. I would recommend to run GTKWave from the command line (e.g. gtkwave some_dump_file.fst) which should prevent these assertion failures.

@peterballard
Copy link

But again it was unusable. Running gtkwave gave many screenfuls of errors, beginning with this:

Could you provide some more details in which way GTKWave 3.4 was unusable?

It can't display any VCD file. When I open GTKWave I get the normal empty plot window, with the heading at the top: GTKWave - [no file loaded]. But when I try to load a VCD file (i.e. cIick "Open New Window" and then select a VCD file) I get lots of messages like I described above [the last one is ** (gtkwave:3901): CRITICAL **: 21:52:35.362: gw_dump_file_get_time_range: assertion 'GW_IS_DUMP_FILE(self)' failed], and no new window opens.

The errors are a know problem in the older GIT version of GTKWave which randomplum's homebrew tap is based on. They should only appear if no file is open and can usually be ignored. I would recommend to run GTKWave from the command line (e.g. gtkwave some_dump_file.fst) which should prevent these assertion failures.

Oh wow, that looks like it is working, thank you! It's late here in Australia so I will have a better look tomorrow, but it is looking good!

@peterballard
Copy link

Just confirming my comment at the end of the previous post: @rfuest 's suggestion of specifying the input file from the command line, does work for me. The only thing that does not work is the "Reload waveform" function - instead I need to quit and restart. That is a bit of a pain, but I can live with it.

@rfuest
Copy link
Collaborator
rfuest commented Sep 17, 2024

You could try to modify the brew formula to point to this repo instead of randomplum's by changing this line: https://github.com/randomplum/homebrew-gtkwave/blob/56236955b4531e4d2d529cf04d70b03d5ea38103/gtkwave.rb#L5
I don't have any way of testing this, but the problems with opening a new window and reloading you mentioned should be fixed in the latest revision in this repo.

@peterballard
Copy link

You could try to modify the brew formula to point to this repo instead of randomplum's by changing this line: https://github.com/randomplum/homebrew-gtkwave/blob/56236955b4531e4d2d529cf04d70b03d5ea38103/gtkwave.rb#L5 I don't have any way of testing this, but the problems with opening a new window and reloading you mentioned should be fixed in the latest revision in this repo.

Thanks. I may not try this for a while, because what I have is good enough for now.

@YoSoyBimboBob
Copy link

You could try to modify the brew formula to point to this repo instead of randomplum's by changing this line: https://github.com/randomplum/homebrew-gtkwave/blob/56236955b4531e4d2d529cf04d70b03d5ea38103/gtkwave.rb#L5 I don't have any way of testing this, but the problems with opening a new window and reloading you mentioned should be fixed in the latest revision in this repo.

I tried this by modifying the local version located in /opt/homebrew/Library/Taps/randomplum/homebrew-gtkwave/gtkwave.rb then

brew uninstall gtkwave

which gave me:

Warning: The following may be dbus configuration files and have not been removed!
If desired, remove them manually with `rm -rf`:
  /opt/homebrew/etc/dbus-1

rm -rf /opt/homebrew/etc/dbus-1 // I've done it with this line and without and the results are the same
brew install --HEAD randomplum/gtkwave/gtkwave

and I get this error:

==> Installing randomplum/gtkwave/gtkwave --HEAD
==> meson setup build -Dintrospection=false
Last 15 lines from /Users/jcodd/Library/Logs/Homebrew/gtkwave/01.meson:
C++ compiler for the host machine: clang++ (clang 16.0.0 "Apple clang version 16.0.0 (clang-1600.0.26.3)")
C++ linker for the host machine: clang++ ld64 1115.7.3
Host machine cpu family: aarch64
Host machine cpu: aarch64
Found pkg-config: YES (/opt/homebrew/Library/Homebrew/shims/mac/super/pkg-config) 0.29.2
Run-time dependency glib-2.0 found: YES 2.82.1
Run-time dependency gobject-2.0 found: YES 2.82.1
Run-time dependency gtk+-3.0 found: YES 3.24.43
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency gtk4 found: NO (tried pkgconfig and framework)

meson.build:41:11: ERROR: Dependency "gtk4" not found, tried pkgconfig and framework

A full log can be found at /private/tmp/gtkwave-20240925-61568-s8xa13/build/meson-logs/meson-log.txt

I have cmake installed, but I installed it with brew just for kicks and giggles, did a rehash, because I use zsh, and still got the same error. I didn't track down the gtk4 issue.

@rfuest
Copy link
Collaborator
rfuest commented Sep 28, 2024

CMake isn't necessary to build GTKWave. It is only used by meson as a fallback because it couldn't find GTK 4 via pkgconfig. The development version of GTKWave should build when you add gtk4 as a dependency to the homebrew formula.

@YoSoyBimboBob
Copy link
YoSoyBimboBob commented Oct 2, 2024

CMake isn't necessary to build GTKWave. It is only used by meson as a fallback because it couldn't find GTK 4 via pkgconfig. The development version of GTKWave should build when you add gtk4 as a dependency to the homebrew formula.

I added the dependency and it built:

depends_on "gtk+3"
->
depends_on "gtk+3"
depends_on "gtk4"

I was able to reload the waveform without crashing. I was able to open another vcd file without crashing.

% gtkwave --version
GTKWave Analyzer v3.4.0 (w)1999-2022 BSI

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@ailequal
Copy link

My solution on macOS 15.0.1 is to simply follow the documentation instructions here for compiling from source, but also adding gtk4 as an extra package dependency installed with homebrew:

# update
brew update && brew upgrade

# full command
brew install desktop-file-utils shared-mime-info gobject-introspection gtk-mac-integration meson ninja pkg-config gtk+3 gtk4

# only gtk4
brew install gtk4

# other commands...

Once finished compiling, you will be able to launch gtkwave with:

/opt/bin/gtkwave

@yanjiew1
Copy link
yanjiew1 commented Oct 26, 2024

I've created a homebrew formula that install the latest lts version 3.3.121, with the patch from the pull request #389 applied. It can be installed with the command:

brew install yanjiew1/gtkwave/gtkwave

@ZJU-Andre
Copy link

我创建了一个自制公式,用于安装最新的 lts 版本 3.3.121,并应用了拉取请求 #389 中的补丁。可以使用以下命令安装它:

brew install yanjiew1/gtkwave/gtkwave

A lot of thanks! My env: MacBook Pro 2021(M1 Pro), MacOS 15.0(Sequoia), build success. Notice that install/update XCode Command Line Tools for XCode 16 from Apple Developer.

yanjiew1 added a commit to yanjiew1/homebrew-cask that referenced this issue Oct 29, 2024
The upstream provided prebuilt macOS package is quite old and is not
functional on Sonoma and later.

Please see this upstream issue.
* <gtkwave/gtkwave#250>
matchai pushed a commit to matchai/homebrew-cask that referenced this issue Oct 29, 2024
The upstream provided prebuilt macOS package is quite old and is not
functional on Sonoma and later.

Please see this upstream issue.
* <gtkwave/gtkwave#250>
@AmirHosseinCV
Copy link

I've created a homebrew formula that install the latest lts version 3.3.121, with the patch from the pull request #389 applied. It can be installed with the command:

brew install yanjiew1/gtkwave/gtkwave

Be careful, this command may have side effects on your system. For example, it changes the system python version to 3.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0