Opened 4 years ago

Closed 4 years ago

#60168 closed defect (fixed)

gtk3 @gtk3-3.24.14_1+quartz.darwin_18: Does not build

Reported by: Bachsau (Bachsau) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: maehne (Torsten Maehne)
Port: gtk3

Description

Seems it's missing at least one file:

:info:build In file included from gdkdnd-quartz.c:24:
:info:build ./gdkquartz-gtk-only.h:26:10: fatal error: 'Appkit/Appkit.h' file not found
:info:build #include <Appkit/Appkit.h>

Attachments (1)

main.log (75.5 KB) - added by maehne (Torsten Maehne) 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by mf2k (Frank Schima)

Cc: dbevans removed
Owner: set to dbevans
Status: newassigned

comment:2 Changed 4 years ago by maehne (Torsten Maehne)

Cc: maehne added

comment:3 Changed 4 years ago by maehne (Torsten Maehne)

I am observing the same error on macOS High Sierra version 10.13.6 (17G11023). I am attaching the build log.

Changed 4 years ago by maehne (Torsten Maehne)

Attachment: main.log added

comment:4 Changed 4 years ago by maehne (Torsten Maehne)

On my machine, AppKit.h is located in two directories:

/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/AppKit.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/AppKit.h

Maybe adding those to CPPFLAGS would help?

comment:5 Changed 4 years ago by maehne (Torsten Maehne)

Tried to add the following to the quartz variant section in the gtk3 Portfile:

    configure.cppflags-append   "-I/System/Library/Frameworks/AppKit.framework/Versions/C/Headers"
    configure.cppflags-append   "-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers"

Of course, it did not work, because AppKit.h is not (anymore) located in a sub-directory called AppKit/. So, it seems patching of gdkquartz-gtk-only.h is necessary.

comment:6 Changed 4 years ago by maehne (Torsten Maehne)

I finally found the real cause: It is a typo in gdkquartz-gtk-only.h! That header includes Appkit/Appkit.h instead of AppKit/AppKit.h. This doesn't matter if macOS / MacPorts is installed on a case-insensitive file system, but causes the failure on the case-sensitive file system. Patching the typo in the header fixes the problem. I will submit a PR.

comment:7 Changed 4 years ago by Bachsau (Bachsau)

And I thought every developer with some common sense would be using case-sensitive filesystems these days…

comment:8 Changed 4 years ago by maehne (Torsten Maehne)

I just reported the issue upstream (#2503).

comment:9 Changed 4 years ago by maehne (Torsten Maehne)

Resolution: fixed
Status: assignedclosed

In 7d8c052d89c1cb7bd6670727df1bce02f777c960/macports-ports (master):

gtk3 +quartz: Fix building on case-sensitive file systems

  • Add patch to fix typo Appkit -> AppKit in header gdk/quartz/gdkquartz-gtk-only.h.

The header gdk/quartz/gdkquartz-gtk-only.h includes in line 26 the
framework AppKit using <Appkit/Appkit.h> instead of
<AppKit/AppKit.h>, which works on case-insensitive file systems, but
not on case-sensitive ones.

References: https://gitlab.gnome.org/GNOME/gtk/issues/2503
Fixes: #60168

Note: See TracTickets for help on using tickets.