Opened 3 years ago

Closed 3 years ago

#64319 closed enhancement (fixed)

gtk3 3.24.30 +quartz: macOS 12 patch perhaps shouldn't be restricted to os.major >= 21

Reported by: dqh-au Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: gtk3

Description (last modified by dqh-au)

The patch-gdk_quartz-12_compat.diff patch is required to ensure that gtk3 UI elements render (at all) on macOS 12. The patch is currently included against the 3.24.30 source in the event that the build is performed on macOS 12 or newer.

However - if a gtk3 build is performed on macOS 11, and then bundled up in a binary distribution (such as we make for VICE), that binary distribution will not contain the patch and will not render UI elements when running on macOS 12.

Since I currently use macOS 11 + MacPorts to produce the official VICE x86 binary distributions, my current workaround is to comment out the requirement for os.major >= 21 when building gtk3 against macOS 10.10 sdk. Although it's a niche use-case, I thought that I'd suggest that this os.major requirement be dropped altogether. Either that, or that the port be updated to the new v3.24.31 release which presumably includes this change anyway.

BTW I used homebrew for the ARM release of VICE 3.6.0 just because I hadn't figured out this problem when creating the ARM build environment.

Change History (7)

comment:1 Changed 3 years ago by dqh-au

Description: modified (diff)

comment:2 Changed 3 years ago by mascguy (Christopher Nielsen)

Great news: this port was updated to 3.24.31, two days ago. Resync your ports, and update.

Give it a try, and let me know if all is well!

comment:3 Changed 3 years ago by dqh-au

Whoops! Sorry.

However - on ARM macOS 11 & 12, I now can't get GTK3 to work at all, not even with a hello world GTK. Crashes on startup:

0   libsystem_c.dylib             	       0x19c12cb6c __chk_fail_overflow + 24
1   libsystem_c.dylib             	       0x19c0bbb30 __memmove_chk + 40
2   libgtk-3.0.dylib              	       0x101b530ac _gtk_marshal_VOID__STRING_STRINGv + 56
3   libgobject-2.0.0.dylib        	       0x1014ccec0 _g_closure_invoke_va + 224
4   libgobject-2.0.0.dylib        	       0x1014e2158 g_signal_emit_valist + 852
5   libgobject-2.0.0.dylib        	       0x1014e29a4 g_signal_emit + 28
6   libgtk-3.0.dylib              	       0x1018b607c gtk_action_muxer_primary_accel_changed + 128
7   libgtk-3.0.dylib              	       0x1018cc664 gtk_application_set_accels_for_action + 132
8   libgtk-3.0.dylib              	       0x101b442a4 gtk_application_impl_quartz_startup + 212
9   libgtk-3.0.dylib              	       0x1018cdc9c gtk_application_startup + 124
10  libgobject-2.0.0.dylib        	       0x1014ccec0 _g_closure_invoke_va + 224
11  libgobject-2.0.0.dylib        	       0x1014e2158 g_signal_emit_valist + 852
12  libgobject-2.0.0.dylib        	       0x1014e29a4 g_signal_emit + 28
13  libgio-2.0.0.dylib            	       0x102068170 g_application_register + 244
14  libgio-2.0.0.dylib            	       0x10206a4f0 g_application_real_local_command_line + 1088
15  libgio-2.0.0.dylib            	       0x1020687d4 g_application_run + 332
16  a.out                         	       0x100e27e80 main + 124
17  dyld                          	       0x100f110f4 start + 520

comment:4 Changed 3 years ago by dqh-au

Those tests were with +quartz, but I've now verified the same problem with x11 on macOS 12. All tests with a complete uninstall of all ports followed by an install of gtk3.

% cat main.c 
#include <gtk/gtk.h>

int main(int argc, char *argv[])
{
    GtkWidget *window;

    gtk_init (&argc, &argv);

    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title (GTK_WINDOW (window), "Window");

    g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);

    gtk_widget_show (window);

    gtk_main ();

    return 0;
}

% gcc $(pkg-config --cflags --libs gtk+-3.0) main.c
% ./a.out
zsh: trace trap  ./a.out
%

comment:5 Changed 3 years ago by evanmiller (Evan Miller)

@dqh-au The run-time issue that you ran into looks like a manifestation of #64377

comment:6 in reply to:  5 Changed 3 years ago by mascguy (Christopher Nielsen)

Replying to evanmiller:

@dqh-au The run-time issue that you ran into looks like a manifestation of #64377

@dqh-au, are you still seeing the issue on macOS 12?

comment:7 Changed 3 years ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: assignedclosed

AFAIK, this issue should be resolved, thanks to various updates. (Including those for gtk3, glib2, etc.)

Let us know if this is still an issue!

Note: See TracTickets for help on using tickets.