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

MacPorts noreply at macports.org
Sun May 25 05:42:14 UTC 2025


#66119: gnucash @4.11_1: gnc-main-window.c:80:10: fatal error:
'gtkmacintegration/gtkosxapplication.h' file not found
----------------------+----------------------
  Reporter:  JDLH     |      Owner:  drkp
      Type:  defect   |     Status:  assigned
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:  2.8.0
Resolution:           |   Keywords:
      Port:  gnucash  |
----------------------+----------------------

Comment (by JDLH):

 In the log excerpt above, the trigger for the failure seems to be this
 compiler flag: `-I/opt/local/include/gtkmacintegration-
 gtk3/gtkmacintegration` . If it were instead `-I/opt/local/include
 /gtkmacintegration-gtk3`, then I suspect the module's statement `#include
 <gtkmacintegration/gtkosxapplication.h>` at gnucash/gnome-utils/gnc-main-
 window.c:80:10 would succeed.

 Where does this compiler flag come from? After some digging, I suspect
 that it is from port **gtk-osx-application-common-gtk3** file `data/gtk-
 mac-integration-gtk3.pc.in`. It contains:
 {{{
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@

 Name: gtk-mac-integration-gtk3
 Description: Mac menu bar and dock integration for GTK+
 Requires: gtk+-3.0
 Version: @VERSION@
 Libs: -L${libdir} -lgtkmacintegration-gtk3
 Cflags: -I${includedir}/gtkmacintegration -DMAC_INTEGRATION
 }}}

 The build process converts this to **gtk-mac-integration-gtk3.pc**, which
 contains the following:
 {{{
 prefix=/opt/local
 exec_prefix=${prefix}
 libdir=/opt/local/lib/gtkmacintegration-gtk3
 includedir=/opt/local/include/gtkmacintegration-gtk3

 Name: gtk-mac-integration-gtk3
 Description: Mac menu bar and dock integration for GTK+
 Requires: gtk+-3.0
 Version: 3.0.2
 Libs: -L${libdir} -lgtkmacintegration-gtk3
 Cflags: -I${includedir}/gtkmacintegration -DMAC_INTEGRATION
 }}}


 I suspect that the `/gtkmacintegration` suffix in the final line is what
 steers the GnuCash compilation wrong.

 It may be that port **gtk-osx-application-common-gtk3** should leave the
 suffix out of this flag. But other ports depend on this port, and I don't
 know how much work it is to be sure none of them need this flag. Instead,
 I suspect that an easier fix is to add a directive to the GnuCash
 portfile, to change the Cflag `-I${prefix}/include/gtkmacintegration-
 gtk3/gtkmacintegration` to `-I${prefix}/include/gtkmacintegration-gtk3`.

-- 
Ticket URL: <https://trac.macports.org/ticket/66119#comment:14>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list