Skip to content

gimp3-devel: update to 3.0.4 #28481

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mascguy
Copy link
Member

@mascguy mascguy commented May 19, 2025

Description

Update to 3.0.4

Supersedes: #28480

@macportsbot

This comment has been minimized.

@macportsbot macportsbot added type: update maintainer by: member Created by a member with commit rights labels May 19, 2025
@mascguy

This comment was marked as outdated.

@mascguy

This comment was marked as outdated.

@mascguy mascguy marked this pull request as draft May 19, 2025 13:51
@mascguy mascguy assigned mascguy and unassigned dbevans May 19, 2025
@mascguy mascguy force-pushed the mascguy-gimp3-devel branch 4 times, most recently from 8f4f330 to fd4e999 Compare May 19, 2025 17:06
@mascguy

This comment was marked as outdated.

@lukaso

This comment was marked as outdated.

@lukaso

This comment was marked as outdated.

@mascguy

This comment was marked as outdated.

@i0ntempest

This comment was marked as outdated.

@mascguy

This comment was marked as outdated.

@i0ntempest

This comment was marked as outdated.

@mascguy mascguy force-pushed the mascguy-gimp3-devel branch from fd4e999 to 5f89d63 Compare May 20, 2025 13:20
@i0ntempest
Copy link
Member

i0ntempest commented May 20, 2025

Looks like a different error originating from the same gimppickbutton-quartz.c:

  [160/2594] /usr/bin/clang -Ilibgimpwidgets/libgimpwidgets-3.0.0.dylib.p -Ilibgimpwidgets -I../gimp-3.0.4/libgimpwidgets -I. -I../gimp-3.0.4 -Igimp-data/icons/Default -Igimp-data/cursors -I/opt/local/include/gegl-0.4 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/json-glib-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/babl-0.1 -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -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 -I/opt/local/include -fdiagnostics-color=always -Wall -Winvalid-pch -O2 -g -Wabsolute-value -Wdeclaration-after-statement -Wenum-conversion -Wliteral-conversion -Wno-strict-prototypes -Wold-style-definition -Wparentheses-equality '-W#pragma-messages' -Wsometimes-uninitialized -Wtautological-unsigned-enum-zero-compare -Wunneeded-internal-declaration -Wunused-function -Wunused-value -Werror=implicit-function-declaration -fdiagnostics-show-option -fno-common -Wformat -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-format-attribute -Wpointer-arith -Wreturn-type -Wtype-limits -DHAVE_CONFIG_H -ObjC -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk '-DG_LOG_DOMAIN="LibGimpWidgets"' -DGIMP_WIDGETS_COMPILATION -MD -MQ libgimpwidgets/libgimpwidgets-3.0.0.dylib.p/gimppickbutton-quartz.c.o -MF libgimpwidgets/libgimpwidgets-3.0.0.dylib.p/gimppickbutton-quartz.c.o.d -o libgimpwidgets/libgimpwidgets-3.0.0.dylib.p/gimppickbutton-quartz.c.o -c ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c
  FAILED: libgimpwidgets/libgimpwidgets-3.0.0.dylib.p/gimppickbutton-quartz.c.o 
  /usr/bin/clang -Ilibgimpwidgets/libgimpwidgets-3.0.0.dylib.p -Ilibgimpwidgets -I../gimp-3.0.4/libgimpwidgets -I. -I../gimp-3.0.4 -Igimp-data/icons/Default -Igimp-data/cursors -I/opt/local/include/gegl-0.4 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/json-glib-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/babl-0.1 -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -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 -I/opt/local/include -fdiagnostics-color=always -Wall -Winvalid-pch -O2 -g -Wabsolute-value -Wdeclaration-after-statement -Wenum-conversion -Wliteral-conversion -Wno-strict-prototypes -Wold-style-definition -Wparentheses-equality '-W#pragma-messages' -Wsometimes-uninitialized -Wtautological-unsigned-enum-zero-compare -Wunneeded-internal-declaration -Wunused-function -Wunused-value -Werror=implicit-function-declaration -fdiagnostics-show-option -fno-common -Wformat -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-format-attribute -Wpointer-arith -Wreturn-type -Wtype-limits -DHAVE_CONFIG_H -ObjC -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk '-DG_LOG_DOMAIN="LibGimpWidgets"' -DGIMP_WIDGETS_COMPILATION -MD -MQ libgimpwidgets/libgimpwidgets-3.0.0.dylib.p/gimppickbutton-quartz.c.o -MF libgimpwidgets/libgimpwidgets-3.0.0.dylib.p/gimppickbutton-quartz.c.o.d -o libgimpwidgets/libgimpwidgets-3.0.0.dylib.p/gimppickbutton-quartz.c.o -c ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:36:39: error: cannot find interface declaration for 'NSObject', superclass of 'GimpPickWindowController'
     36 | @interface GimpPickWindowController : NSObject
        | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:39:3: error: unknown type name 'NSMutableArray'
     39 |   NSMutableArray *windows;
        |   ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:46:31: error: unknown type name 'BOOL'
     46 | @property (nonatomic, assign) BOOL firstBecameKey;
        |                               ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:47:30: error: unknown type name 'NSCursor'
     47 | @property (readonly, retain) NSCursor *cursor;
        |                              ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:47:1: error: property with 'retain (or strong)' attribute must be of object type
     47 | @property (readonly, retain) NSCursor *cursor;
        | ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:54:27: error: cannot find interface declaration for 'NSView', superclass of 'GimpPickView'
     54 | @interface GimpPickView : NSView
        | ~~~~~~~~~~~~~~~~~~~~~~~   ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:63:29: error: unknown type name 'NSTrackingArea'
     63 | @property (readonly,assign) NSTrackingArea *area;
        |                             ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:116:23: error: expected a type
    116 | - (void)mouseEntered:(NSEvent *)event
        |                       ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:125:22: error: expected a type
    125 | - (void)mouseExited:(NSEvent *)event
        |                      ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:133:21: error: expected a type
    133 | - (void)mouseMoved:(NSEvent *)event
        |                     ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:138:18: error: expected a type
    138 | - (void)mouseUp:(NSEvent *)event
        |                  ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:145:23: error: expected a type
    145 | - (void)rightMouseUp:(NSEvent *)event
        |                       ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:150:23: error: expected a type
    150 | - (void)otherMouseUp:(NSEvent *)event
        |                       ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:155:18: error: expected a type
    155 | - (void)keyDown:(NSEvent *)event
        |                  ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:161:20: error: expected a type
    161 | - (void)pickColor:(NSEvent *)event
        |                    ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:74:11: error: 'GimpPickView' cannot use 'super' because it is a root class
     74 |   self = [super init];
        |           ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:87:9: warning: instance method '-removeTrackingArea:' not found (return type defaults to 'id') [-Wobjc-method-access]
     87 |   [self removeTrackingArea:self.area];
        |         ^~~~~~~~~~~~~~~~~~
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:54:12: note: receiver is instance of class declared here
     54 | @interface GimpPickView : NSView
        |            ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:89:4: error: 'GimpPickView' cannot use 'super' because it is a root class
     89 |   [super dealloc];
        |    ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:94:3: error: use of undeclared identifier 'NSTrackingAreaOptions'
     94 |   NSTrackingAreaOptions options;
        |   ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:96:4: error: 'GimpPickView' cannot use 'super' because it is a root class
     96 |   [super viewDidMoveToWindow];
        |    ^
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:98:13: warning: instance method '-window' not found (return type defaults to 'id') [-Wobjc-method-access]
     98 |   if ([self window] == nil)
        |             ^~~~~~
  ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:54:12: note: receiver is instance of class declared here
     54 | @interface GimpPickView : NSView
        |            ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  2 warnings and 20 errors generated.

And for whatever reason this doesn't occur on my system.

@mascguy

This comment was marked as outdated.

@lukaso
Copy link
Contributor

lukaso commented May 21, 2025

GIMP itself should work fine with any OS version. So if all the dependencies are building under 10.12, there's nothing in GIMP that should cause problems.

I ask, as the build is failing on the following:

../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c:180:20: error: 'CGWindowListCreateImage' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead.
  180 |   root_image_ref = CGWindowListCreateImage (rect,
      |                    ^

Presumably this succeeds when forcing the deployment target to 11.x, with the matching SDK?

OK, I wasn't aware of that problem. But yes, forcing the SDK (or patching, in which case we have the opposite problem) are the only solutions. Would happily accept a patch, but it sounds like something a bit more involved than that and we'd probably want it to work in both 15 and < 15 SDKs.

@lukaso
Copy link
Contributor

lukaso commented May 21, 2025

Looks like a different error originating from the same gimppickbutton-quartz.c:
And for whatever reason this doesn't occur on my system.

Chatgpt says the following:

The error you're encountering is due to missing macOS Cocoa framework imports in the Objective-C file gimppickbutton-quartz.c. Specifically, types like NSObject, NSView, NSCursor, NSMutableArray, BOOL, and NSEvent are all defined in Foundation and AppKit, but they are not being imported. This leads the compiler to not recognize any of them, causing cascading errors.

How to Fix It

To resolve this, add the necessary Objective-C framework imports at the top of gimppickbutton-quartz.c

Yeah, this error looks like something wrong with the build system. Could be it's not being built as objective-c. But that would be a very long standing issue if it was in the GIMP build system, so very odd.

@mascguy

This comment was marked as outdated.

@mascguy
Copy link
Member Author

mascguy commented May 22, 2025

Yeah, this error looks like something wrong with the build system. Could be it's not being built as objective-c. But that would be a very long standing issue if it was in the GIMP build system, so very odd.

When I can find a few minutes, I'll compare against the GIMP 2.x build.

Okay, here's how gimp2 compiles gimppickbutton-quartz.c:

:info:build /bin/sh ../libtool --tag=CC --mode=compile ccache /usr/bin/clang
-DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"LibGimpWidgets\" -DGIMP_WIDGETS_COMPILATION
-I.. -I/opt/local/include/gegl-0.4 -I/opt/local/include/gio-unix-2.0
-I/opt/local/include/json-glib-1.0 -I/opt/local/include/glib-2.0
-I/opt/local/lib/glib-2.0/include -I/opt/local/include/babl-0.1
-I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include 
-I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz 
-I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi 
-I/opt/local/include/harfbuzz -I/opt/local/include/cairo 
-I/opt/local/include/atk-1.0 -I/opt/local/include/cairo 
-I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 
-I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 
-I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include
-I/opt/local/include "-xobjective-c"
-I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk 
-DGIMP_DISABLE_DEPRECATED -DBABL_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGDK_DISABLE_DEPRECATED 
-DGTK_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE "-xobjective-c" 
-pipe -Os -Wno-deprecated-declarations -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk 
-arch arm64 -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-prototypes 
-Wstrict-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition 
-Wmissing-format-attribute -Wformat-security  -Wtype-limits -fno-common
-fdiagnostics-show-option -Wreturn-type   -MT gimppickbutton-quartz.lo -MD -MP -MF
.deps/gimppickbutton-quartz.Tpo -c -o gimppickbutton-quartz.lo gimppickbutton-quartz.c

Compared to gimp3:

[160/2592] /usr/bin/clang -Ilibgimpwidgets/libgimpwidgets-3.0.0.dylib.p -Ilibgimpwidgets 
-I../gimp-3.0.4/libgimpwidgets -I. -I../gimp-3.0.4 -Igimp-data/icons/Default 
-Igimp-data/cursors -I/opt/local/include/gegl-0.4 -I/opt/local/include/gio-unix-2.0 
-I/opt/local/include/json-glib-1.0 -I/opt/local/include/glib-2.0 
-I/opt/local/lib/glib-2.0/include -I/opt/local/include/babl-0.1 -I/opt/local/include/gtk-3.0 
-I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 
-I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -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 -I/opt/local/include 
-fdiagnostics-color=always -Wall -Winvalid-pch -O2 -g -Wabsolute-value 
-Wdeclaration-after-statement -Wenum-conversion -Wliteral-conversion -Wno-strict-prototypes 
-Wold-style-definition -Wparentheses-equality '-W#pragma-messages' -Wsometimes-uninitialized 
-Wtautological-unsigned-enum-zero-compare -Wunneeded-internal-declaration -Wunused-function 
-Wunused-value -Werror=implicit-function-declaration -fdiagnostics-show-option -fno-common 
-Wformat -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-format-attribute 
-Wpointer-arith -Wreturn-type -Wtype-limits -DHAVE_CONFIG_H -ObjC -pipe -Os 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk 
'-DG_LOG_DOMAIN="LibGimpWidgets"' -DGIMP_WIDGETS_COMPILATION -MD -MQ 
libgimpwidgets/libgimpwidgets-3.0.0.dylib.p/gimppickbutton-quartz.c.o -MF 
libgimpwidgets/libgimpwidgets-3.0.0.dylib.p/gimppickbutton-quartz.c.o.d 
-o libgimpwidgets/libgimpwidgets-3.0.0.dylib.p/gimppickbutton-quartz.c.o 
-c ../gimp-3.0.4/libgimpwidgets/gimppickbutton-quartz.c

I haven't compared the two that closely yet, will do so later.

But if you folks see something immediately-obvious... let me know...

@tobypeterson
Copy link
Contributor

-xobjective-c is the key difference there. I'd guess MacPorts is overriding it somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
by: member Created by a member with commit rights maintainer type: update
Development

Successfully merging this pull request may close these issues.

6 participants