Opened 2 years ago

Last modified 2 years ago

#66119 assigned defect

gnucash @4.11_1: gnc-main-window.c:80:10: fatal error: 'gtkmacintegration/gtkosxapplication.h' file not found

Reported by: JDLH (Jim DeLaHunt) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: Cc: fondacio
Port: gnucash

Description (last modified by JDLH (Jim DeLaHunt))

When I try to port install gnucash, the building phase consistently fails when building gnc-main-window.c with the message, "fatal error: 'gtkmacintegration/gtkosxapplication.h' file not found". The indicated line reads, #include <gtkmacintegration/gtkosxapplication.h>. But that include file seems to exist. Another file, binreloc.c, has the same #include line, but builds without a problem.

I have attached the main.log file for the failing build. The relevant failure part is (line breaks added for clarity):

:info:build [ 34%] Building C object gnucash/gnome-utils/CMakeFiles/gnc-gnome-utils.dir/gnc-main-window.c.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
  _gnome_gnucash/gnucash/work/build/gnucash/gnome-utils 
&& /usr/bin/clang 
  -DG_LOG_DOMAIN=\"gnc.gui\" -DHAVE_CONFIG_H -DHAVE_GUILE22 -DMAC_INTEGRATION -D_GNU_SOURCE -Dgnc_gnome_utils_EXPORTS 
  -I/opt/local/libexec/boost/1.71/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org
    _macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-4.11/gnucash/gnome-utils 
  -I/opt/local/include/gtkmacintegration-gtk3/gtkmacintegration 
  -I/opt/local/include/libsecret-1 
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/build/gnucash/gnome-utils 
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11/libgnucash/app-utils 
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11/libgnucash/engine 
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/build/common 
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11/common
  -I/opt/local/include
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11/borrowed/libc
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/build/libgnucash/core-utils
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11/libgnucash/core-utils
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11/libgnucash/tax
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11/bindings/guile
  -I/opt/local/include/guile/2.2 -I/opt/local/include/libxml2
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11/libgnucash/backend/xml 
  -isystem /opt/local/include/gtk-3.0 -isystem /opt/local/include/gio-unix-2.0 -isystem /opt/local/include/cairo
  -isystem /opt/local/include/pango-1.0 -isystem /opt/local/include/harfbuzz -isystem /opt/local/include/fribidi
  -isystem /opt/local/include/atk-1.0 -isystem /opt/local/include/pixman-1 -isystem /opt/local/include/freetype2
  -isystem /opt/local/include/gdk-pixbuf-2.0 -isystem /opt/local/include/libpng16 -isystem /opt/local/include/glib-2.0
  -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs
    _ports_gnome_gnucash/gnucash/work/glib-2.0/include
  -Wno-error=deprecated-declarations -Wno-error=parentheses  -Wdeclaration-after-statement -Wno-pointer-sign -Wall
  -Wmissing-prototypes -Wmissing-declarations -Wno-unused -pipe -Os -DNDEBUG
  -I/opt/local/libexec/boost/1.71/include -isystem/opt/local/include
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11
  -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch arm64
  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -mmacosx-version-min=12.0 -fPIC
  -Wno-deprecated-declarations -xobjective-c -std=gnu11 -MD
  -MT gnucash/gnome-utils/CMakeFiles/gnc-gnome-utils.dir/gnc-main-window.c.o
  -MF CMakeFiles/gnc-gnome-utils.dir/gnc-main-window.c.o.d -o CMakeFiles/gnc-gnome-utils.dir/gnc-main-window.c.o
  -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11/gnucash/gnome-utils/gnc-main-window.c
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs
    _ports_gnome_gnucash/gnucash/work/gnucash-4.11/gnucash/gnome-utils/gnc-main-window.c:80:10: 
    fatal error: 'gtkmacintegration/gtkosxapplication.h' file not found
:info:build #include <gtkmacintegration/gtkosxapplication.h>
:info:build          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build 1 error generated.

Earlier, the following module builds successfully. It also includes the same header file (line breaks added for clarity):

:info:build [  5%] Building C object libgnucash/core-utils/CMakeFiles/gnc-core-utils.dir/binreloc.c.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
  _gnome_gnucash/gnucash/work/build/libgnucash/core-utils 
&& /usr/bin/clang 
  -DG_LOG_DOMAIN=\"gnc.core-utils\" -DHAVE_CONFIG_H -DHAVE_GUILE22 -DMAC_INTEGRATION -D_GNU_SOURCE -Dgnc_core_utils_EXPORTS 
  -I/opt/local/libexec/boost/1.71/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org
    _macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-4.11/common 
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/build/common 
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/build/libgnucash/core-utils 
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11/libgnucash/core-utils -I/opt/local/include/glib-2.0 
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/glib-2.0/include 
  -I/opt/local/include/gtkmacintegration-gtk3/gtkmacintegration 
  -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 
  -I/opt/local/include/harfbuzz -I/opt/local/include/fribidi -I/opt/local/include/atk-1.0 -I/opt/local/include/pixman-1 
  -I/opt/local/include/freetype2 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 
  -Wno-error=deprecated-declarations -Wno-error=parentheses  -Wdeclaration-after-statement -Wno-pointer-sign -Wall 
  -Wmissing-prototypes -Wmissing-declarations -Wno-unused -pipe -Os -DNDEBUG -I/opt/local/libexec/boost/1.71/include 
  -isystem/opt/local/include 
  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports
    _gnome_gnucash/gnucash/work/gnucash-4.11 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch arm64 
  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -mmacosx-version-min=12.0 -fPIC -xobjective-c 
  -std=gnu11 -MD -MT libgnucash/core-utils/CMakeFiles/gnc-core-utils.dir/binreloc.c.o 
  -MF CMakeFiles/gnc-core-utils.dir/binreloc.c.o.d -o CMakeFiles/gnc-core-utils.dir/binreloc.c.o 
  -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_
    gnome_gnucash/gnucash/work/gnucash-4.11/libgnucash/core-utils/binreloc.c

I believe that there are only three modules which include this header file. One is compiled successfully, one triggers the above error, and one is not yet attempted. (Line breaks inserted in paths for legibility.)

 % grep -Frn "gtkmacintegration/gtkosxapplication.h" $(port work gnucash) | head -5 
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org
  _macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-4.11/
  libgnucash/core-utils/binreloc.c:48:#include <gtkmacintegration/gtkosxapplication.h>
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org
  _macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-4.11/
  gnucash/gnome/window-reconcile.c:62:#include <gtkmacintegration/gtkosxapplication.h>
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org
  _macports_release_tarballs_ports_gnome_gnucash/gnucash/work/gnucash-4.11/
  gnucash/gnome-utils/gnc-main-window.c:80:#include <gtkmacintegration/gtkosxapplication.h>

It sure looks to me like I have this header installed:

% ls -l /opt/local/include/gtkmacintegration-gtk3/gtkmacintegration/gtkosxapplication.h
-rw-r--r--  1 root  wheel  6498 26 Jul 08:50 /opt/local/include/gtkmacintegration-gtk3/gtkmacintegration/gtkosxapplication.h

Expected behaviour: port install gnucash completes without error, and gnucash is installed.

Attachments (1)

main_default-build 2022-10-29T1612.log (1.9 MB) - added by JDLH (Jim DeLaHunt) 2 years ago.
main.log showing "file not found" error

Download all attachments as: .zip

Change History (12)

Changed 2 years ago by JDLH (Jim DeLaHunt)

main.log showing "file not found" error

comment:1 Changed 2 years ago by JDLH (Jim DeLaHunt)

Description: modified (diff)

comment:2 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

binreloc.c only includes gtkmacintegration/gtkosxapplication.h if ENABLE_BINRELOC is defined. I don't see it defined on the command line. It might be defined in an include file, I'm not sure, but if not, that would explain why this file can compile even though gtkmacintegration/gtkosxapplication.h is not found.

gnc-main-window.c fails to compile for the reason stated: it can't find gtkmacintegration/gtkosxapplication.h. For it to be found, the directory containing it would need to be specified as an include path via a -I or -isystem flag. The only flag I see is -I/opt/local/include/gtkmacintegration-gtk3/gtkmacintegration. As you said, the file is actually located at /opt/local/include/gtkmacintegration-gtk3/gtkmacintegration/gtkosxapplication.h so that include path is incorrect. The correct include path would be -I/opt/local/include/gtkmacintegration-gtk3.

comment:3 Changed 2 years ago by JDLH (Jim DeLaHunt)

Thank you, Ryan.

It appears that port gtk-osx-application-common-gtk3 supplies that header file:

% port contents gtk-osx-application-common-gtk3  | grep "include.*gtkmacintegration" 
  /opt/local/include/gtkmacintegration-gtk3/gtkmacintegration/gtkosxapplication.h

And it seems that gnucash does not depend on gtk-osx-application-common-gtk3:

% port rdeps gnucash | grep gtk-osx-application-common-gtk3
%

And the buildbots appears to be able to build gnucash: https://ports.macports.org/port/gnucash/details/ . So perhaps they do not have gtk-osx-application-common-gtk3 present when they build gnucash.

My next step is to deactivate port gtk-osx-application-common-gtk3 and try again.

comment:4 Changed 2 years ago by JDLH (Jim DeLaHunt)

Some other ports which I had installed turned out to depend on port gtk-osx-application-common-gtk3, so I ended up deactivating them all:

% sudo port deactivate gtk-osx-application-common-gtk3 gtk-osx-application-gtk3 goffice gspell darktable inkscape inkscape-app

With that, port gnucash happily built.

So, it appears that port gtk-osx-application-common-gtk3 appears to trigger a bug in port gnucash. How to proceed? I can think of a few ways:

  1. In the gnucash Portfile, mark gtk-osx-application-common-gtk3 as a conflicting port.
  2. Figure out the nature of the interaction, and make gnucash can ignore gtk-osx-application-common-gtk3's presence.
  3. Figure out that gnucash is better off with gtk-osx-application-common-gtk3, figure out how to make the include path be -I/opt/local/include/gtkmacintegration-gtk3 so that #include <gtkmacintegration/gtkosxapplication.h> works, and add gtk-osx-application-common-gtk3 as a dependency.
  4. Maybe something else which I have not thought of.

Diagnosing this may require help from upstream. I am on the mailing list already, so I'm willing to try.

comment:5 Changed 2 years ago by JDLH (Jim DeLaHunt)

Unfortunately, "built" is not the same thing as "runs correctly". I ran the gnucash built by MacPorts. The new book wizard appeared. I cancelled out of the wizard, and gnucash immediately crashed.

Here is part of the macOS crash log:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               gnucash [6689]
Path:                  /opt/local/bin/gnucash
Identifier:            gnucash
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2022-11-03 00:50:40.3062 -0700
OS Version:            macOS 12.6.1 (21G217)
Report Version:        12
Anonymous UUID:        24504914-FB8A-2238-F0C6-2F8B05578BC0

Sleep/Wake UUID:       C22A1264-AA9B-4DB2-8EC1-88A33EA68F2A

Time Awake Since Boot: 260000 seconds
Time Since Wake:       6028 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGBUS)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x000000019138e794
Exception Codes:       0x0000000000000002, 0x000000019138e794
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process:   exc handler [6689]

VM Region Info: 0x19138e794 is in 0x19137e000-0x19155a000;  bytes after start: 67476  bytes before end: 1882219
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      __TEXT                      1910da000-19137e000    [ 2704K] r-x/r-x SM=COW  ...ioToolboxCore
--->  __TEXT                      19137e000-19155a000    [ 1904K] r-x/r-x SM=COW  ...ns/A/CoreText
      __TEXT                      19155a000-191c7e000    [ 7312K] r-x/r-x SM=COW  ...s/A/CoreAudio

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib               	       0x18fa0b788 dataSegmentsContain(objc_class*) + 128
1   libobjc.A.dylib               	       0x18fa0b72c dataSegmentsContain(objc_class*) + 36
2   libobjc.A.dylib               	       0x18fa02ec8 lookUpImpOrForward + 764
3   libobjc.A.dylib               	       0x18fa028e4 _objc_msgSend_uncached + 68
4   libgdk-3.0.dylib              	       0x10117cefc _gdk_quartz_window_did_become_main + 100
5   CoreFoundation                	       0x18fc3d468 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
6   CoreFoundation                	       0x18fce1bb8 ___CFXRegistrationPost_block_invoke + 52
7   CoreFoundation                	       0x18fce1b24 _CFXRegistrationPost + 456
8   CoreFoundation                	       0x18fc0c0f8 _CFXNotificationPost + 732
9   Foundation                    	       0x190ad1c28 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96
10  AppKit                        	       0x1928e34f8 -[NSWindow _changeKeyAndMainLimitedOK:] + 1100
11  AppKit                        	       0x1928e2ed0 -[NSWindow _makeKeyRegardlessOfVisibility] + 88
12  AppKit                        	       0x1928d8b88 -[NSWindow makeKeyAndOrderFront:] + 48
13  libgdk-3.0.dylib              	       0x10117cfcc _gdk_quartz_window_did_resign_main + 140
14  libgdk-3.0.dylib              	       0x10117d99c gdk_window_quartz_hide + 224
15  libgdk-3.0.dylib              	       0x10116394c gdk_window_hide + 392
16  libgdk-3.0.dylib              	       0x10116819c gdk_window_withdraw + 112
17  libgtk-3.0.dylib              	       0x101bb2c7c gtk_window_unmap + 120
18  libgobject-2.0.0.dylib        	       0x101248898 g_closure_invoke + 212
19  libgobject-2.0.0.dylib        	       0x10125d498 signal_emit_unlocked_R + 876
20  libgobject-2.0.0.dylib        	       0x10125e20c g_signal_emit_valist + 1604
21  libgobject-2.0.0.dylib        	       0x10125e778 g_signal_emit + 28
22  libgtk-3.0.dylib              	       0x101b9386c gtk_widget_unmap + 184
23  libgtk-3.0.dylib              	       0x101bb2958 gtk_window_hide + 80
24  libgobject-2.0.0.dylib        	       0x101248898 g_closure_invoke + 212
25  libgobject-2.0.0.dylib        	       0x10125d498 signal_emit_unlocked_R + 876
26  libgobject-2.0.0.dylib        	       0x10125e20c g_signal_emit_valist + 1604
27  libgobject-2.0.0.dylib        	       0x10125e778 g_signal_emit + 28
28  libgtk-3.0.dylib              	       0x101b940d4 gtk_widget_hide + 248
29  libgtk-3.0.dylib              	       0x101ba2a24 gtk_widget_dispose + 60
30  libgtk-3.0.dylib              	       0x101bb1f10 gtk_window_dispose + 88
31  libgobject-2.0.0.dylib        	       0x10124d608 g_object_run_dispose + 68
32  libgnc-gnome.dylib            	       0x100f28e98 on_cancel + 44
33  libgobject-2.0.0.dylib        	       0x101248aa4 _g_closure_invoke_va + 224
34  libgobject-2.0.0.dylib        	       0x10125df20 g_signal_emit_valist + 856
35  libgobject-2.0.0.dylib        	       0x10125e778 g_signal_emit + 28
36  libgtk-3.0.dylib              	       0x1019609d4 on_assistant_cancel + 36
37  libgobject-2.0.0.dylib        	       0x101248aa4 _g_closure_invoke_va + 224
38  libgobject-2.0.0.dylib        	       0x10125df20 g_signal_emit_valist + 856
39  libgobject-2.0.0.dylib        	       0x10125e778 g_signal_emit + 28
40  libgtk-3.0.dylib              	       0x101975b54 gtk_button_do_release + 68
41  libgtk-3.0.dylib              	       0x1019756cc gtk_real_button_released + 208
42  libgobject-2.0.0.dylib        	       0x101248aa4 _g_closure_invoke_va + 224
43  libgobject-2.0.0.dylib        	       0x10125df20 g_signal_emit_valist + 856
44  libgobject-2.0.0.dylib        	       0x10125e778 g_signal_emit + 28
45  libgtk-3.0.dylib              	       0x101975c24 multipress_released_cb + 48
46  libgtk-3.0.dylib              	       0x101bdc190 _gtk_marshal_VOID__INT_DOUBLE_DOUBLEv + 80
47  libgobject-2.0.0.dylib        	       0x101248aa4 _g_closure_invoke_va + 224
48  libgobject-2.0.0.dylib        	       0x10125df20 g_signal_emit_valist + 856
49  libgobject-2.0.0.dylib        	       0x10125e778 g_signal_emit + 28
50  libgtk-3.0.dylib              	       0x101a2a3ac gtk_gesture_multi_press_end + 128
51  libgobject-2.0.0.dylib        	       0x10124bb74 g_cclosure_marshal_VOID__BOXEDv + 124
52  libgobject-2.0.0.dylib        	       0x101248aa4 _g_closure_invoke_va + 224
53  libgobject-2.0.0.dylib        	       0x10125df20 g_signal_emit_valist + 856
54  libgobject-2.0.0.dylib        	       0x10125e778 g_signal_emit + 28
55  libgtk-3.0.dylib              	       0x101a28ef0 _gtk_gesture_set_recognized + 92
56  libgtk-3.0.dylib              	       0x101a26e1c _gtk_gesture_check_recognized + 68
57  libgtk-3.0.dylib              	       0x101a28764 gtk_gesture_handle_event + 268
58  libgtk-3.0.dylib              	       0x101a2bc64 gtk_gesture_single_handle_event + 364
59  libgtk-3.0.dylib              	       0x1019f66fc gtk_event_controller_handle_event + 124
60  libgtk-3.0.dylib              	       0x101b97db0 _gtk_widget_run_controllers + 124
61  libgtk-3.0.dylib              	       0x101bd786c _gtk_marshal_BOOLEAN__BOXEDv + 124
62  libgobject-2.0.0.dylib        	       0x101248aa4 _g_closure_invoke_va + 224
63  libgobject-2.0.0.dylib        	       0x10125df20 g_signal_emit_valist + 856
64  libgobject-2.0.0.dylib        	       0x10125e778 g_signal_emit + 28
65  libgtk-3.0.dylib              	       0x101b979e0 gtk_widget_event_internal + 300
66  libgtk-3.0.dylib              	       0x101a6e0e0 propagate_event + 388
67  libgtk-3.0.dylib              	       0x101a6d530 gtk_main_do_event + 1132
68  libgdk-3.0.dylib              	       0x1011541cc _gdk_event_emit + 64
69  libgdk-3.0.dylib              	       0x10117961c gdk_event_dispatch + 52
70  libglib-2.0.0.dylib           	       0x100b2dfe0 g_main_context_dispatch + 240
71  libglib-2.0.0.dylib           	       0x100b2e2fc g_main_context_iterate + 432
72  libglib-2.0.0.dylib           	       0x100b2e5f4 g_main_loop_run + 288
73  libgtk-3.0.dylib              	       0x101a6cf60 gtk_main + 92
74  libgnc-gnome-utils.dylib      	       0x10107adac gnc_ui_start_event_loop + 88
75  gnucash                       	       0x1002f6138 scm_run_gnucash(void*, int, char**) + 736
76  libguile-2.2.1.dylib          	       0x1008ba38c invoke_main_func + 44
77  libguile-2.2.1.dylib          	       0x10089d1d4 c_body + 24
78  libguile-2.2.1.dylib          	       0x1009102ac vm_regular_engine + 1376
79  libguile-2.2.1.dylib          	       0x10090ee54 scm_call_n + 428
80  libguile-2.2.1.dylib          	       0x10090c274 catch + 504
81  libguile-2.2.1.dylib          	       0x10089d14c scm_i_with_continuation_barrier + 136
82  libguile-2.2.1.dylib          	       0x10089d1ac scm_c_with_continuation_barrier + 60
83  libguile-2.2.1.dylib          	       0x10090bde4 with_guile + 76
84  libgc.1.dylib                 	       0x1005fa840 GC_call_with_stack_base + 36
85  libguile-2.2.1.dylib          	       0x100909fc0 scm_with_guile + 44
86  libguile-2.2.1.dylib          	       0x1008ba34c scm_boot_guile + 80
87  gnucash                       	       0x1002f5df4 Gnucash::Gnucash::start(int, char**) + 448
88  gnucash                       	       0x1002f6364 main + 100
89  dyld                          	       0x10053d08c start + 520
...[rest of crash report elided]...

comment:6 Changed 2 years ago by kencu (Ken)

Jim, it looks like upstream offers gnucash 4.12, but only for Intel, as a prebuilt binary.

https://www.gnucash.org/download.phtml

I might suggest to try that, and see if it crashes too. Probably it doesn't, or there would be noise about it upstream.

If it works, and the one in macports crashes, then it's either an arm64 thing, the fact that macports' version is slightly out-of-date, or something in the extensive set of gnome supporting ports that is out of date, patched wrong, not working right with arm64 macs yet, etc, etc, etc, etc, etc

comment:7 Changed 2 years ago by JDLH (Jim DeLaHunt)

Thank you, Ken. I have gnucash 4.11 from upstream, as a prebuilt binary. It does not crash.

There is evidence that upstream expects gnucash to compile on arm64.

  1. Their build instructions say, "Apple Silicon is first supported in macOS 11. We have never successfully cross-compiled the Gtk stack so you'll probably need an Apple Silicon Mac to build an Apple Silicon native GnuCash. Note that as of October 2022 WebKitGtk isn't able to find its loadable modules so that reports don't render in GnuCash." That would be a curious thing to say if they had never got GnuCash working at all when compiling on Apple Silicon.
  1. I am attempting to build gnucash from source, following their instructions. One of their developers is helping me in an email thread "Various failures while building MacOS/Quartz from source". I have not yet got the push-back, "don't try to build on arm64, we know it doesn't work".

It looks like I will need to take up both this crash, and the issue of port gtk-osx-application-common-gtk3 preventing port gnucash from building, with the friendly folks at Gnucash-devel. I think I will wait a bit to see if I can resolve my current thread of building from source first, so that I don't make their list, um, too multi-threaded.

Last edited 2 years ago by JDLH (Jim DeLaHunt) (previous) (diff)

comment:8 Changed 2 years ago by JDLH (Jim DeLaHunt)

Clues about this bug, from a post "Re: [GNC-dev) Various failures while building MacOS/Quartz from source" to the GnuCash developers list by a knowledgeable developer John Ralls, on Sun, 6 Nov 2022 16:17:23 -0800:

gtkosxapplication is what puts the menus on the menu bar instead of on the window. If you want to build without it you need to hide $PREFIX/lib/pkgconfig/gtk-mac-integration-gtk3.pc.

But that crash hasn't anything to do with gtkosxapplication. I think it's

Try applying https://gitlab.gnome.org/GNOME/gtk-osx/-/blob/master/patches/gtk-3.24.33-quartz-window-transient-for.patch to your gtk3-24.34 build.

The fix in gtk itself is https://gitlab.gnome.org/GNOME/gtk/-/commit/a2c54c739ed08eac6d360cd3a6ae140e1fab556d but that does a bunch of other stuff too. I committed it after Mattias released 3.23.34.

comment:9 Changed 2 years ago by kencu (Ken)

comment:10 Changed 2 years ago by JDLH (Jim DeLaHunt)

I certainly want to try that patch. I can't promise it will be soon, because I have other projects I am juggling.

Basically, I am making notes in this ticket for future reference.

comment:11 Changed 2 years ago by fondacio

Cc: fondacio added
Note: See TracTickets for help on using tickets.