-
Notifications
You must be signed in to change notification settings - Fork 127
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
Comments
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: ***@***.***>
|
I am using version 3.3.107, installed via brew on macOS. |
OK, you're using the most recent version that I built...which was three years ago.
As I said, I don't have a Mac, so unfortunately, I can't build a binary that will work for you. Setting up a build environment on Mac using GTK-OSX is a fairly involved process unless it's been simplified. Another user might be able to help you.
…-Tony
Message ID: ***@***.***>
|
if you're using brew you can try: class Gtkwave < Formula depends_on "desktop-file-utils" => :build # for update-desktop-database def install 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 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. |
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.
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 |
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 |
@rfuestThat was it Lines 700 to 712 in 0fe81d1
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 ? For anyone wanting to run on macos, I've updated my fork. if there is enough people interested I can setup a homebrew tap. |
@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) |
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 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); |
Also for curiosity sake, how did you make a .app binary for gtkwave? |
@rfuest Yes, I agree. Tested and it works correctly. @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. |
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: 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
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.
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. |
@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 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. |
@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. @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've just applied the type change of
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. |
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: |
Hello @randomplum |
@andylin2004 @krishnachaitanya1132 This is the problem when applying patches to an active repo. This is an experimental tap that builds git master branch, issues are expected. @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. |
Can you let me know how to brew install using forked repo. Should I download the forked repo and install it as usual??
|
@krishnachaitanya1132 The forked repo should be transparent. |
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. |
Small feedback, works perfectly fine under Sonoma 14.0 with a M1 Pro - Thanks for the quick fix and resolution! |
Have you attempted to install gtkwave using the brew formula that should be above?On Nov 3, 2023, at 10:50 AM, Khizarkk7 ***@***.***> wrote:
GTK wave is not working macbook software: sonoma 14.1
this are the pop kindly resolve this we are facing this problem macbook software: Sonoma 14.1
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
No I'm not, this was just based on the error message.
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. |
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. |
Is there any way to open Gtkwave without opening it from the terminal? Like having a desktop shortcut somehow? Thanks! |
Hay alguna forma de usar GTKwave en mi Mac m2??? |
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: But when I ran it, I got:
I did get a gtkwave window but it was unusable, i.e. clicking on signal names only worked intermittently, and no waveform displayed. uninstalled ( So I uninstalled again (
But again it was unusable. Running gtkwave gave many screenfuls of errors, beginning with this:
So I'm out of ideas. Any suggestions or help would be appreciated! |
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. |
It can't display any VCD file. When I open GTKWave I get the normal empty plot window, with the heading at the top:
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! |
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. |
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 |
Thanks. I may not try this for a while, because what I have is good enough for now. |
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:
rm -rf /opt/homebrew/etc/dbus-1 // I've done it with this line and without and the results are the same and I get this error:
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. |
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 |
I added the dependency and it built: depends_on "gtk+3" I was able to reload the waveform without crashing. I was able to open another vcd file without crashing. % gtkwave --version This is free software; see the source for copying conditions. There is NO |
My solution on macOS 15.0.1 is to simply follow the documentation instructions here for compiling from source, but also adding # 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 |
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:
|
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. |
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>
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>
Be careful, this command may have side effects on your system. For example, it changes the system python version to 3.13 |
This prompt will show up, and then the app will close out
The text was updated successfully, but these errors were encountered: