#65283 closed defect (fixed)

rawtherapee: build currently broken, due to recent segregation of gtk-osx-application-gtk3

Reported by: mascguy (Christopher Nielsen) Owned by: jasonliu-- (Jason Liu)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc:
Port: rawtherapee

Description

Due to recent changes needed to segregate the various gtk-osx-application-xx subports, rawtherapee is currently broken.

In short, while most of the Gnome-related components are searched for via pkgconfig - which is arguably the right approach - upstream isn't doing so for the gtkmacintegration components. As such, if they aren't in the expected location, they aren't found.

I took an initial stab at fixing, with the following additional configure arguments:

    -DMACINTEGRATION_INCLUDE_DIR=${prefix}/include/gtkmacintegration-gtk3/gtkmacintegration
    -DMACINTEGRATION_LIBRARY=${prefix}/lib/gtkmacintegration-gtk3

And while that fixes both configure and compilation, linking still fails: It appears that, despite CMake finding the components, the lib isn't being added to the link-time arguments.

So I'm clearly missing something, but it isn't immediately obvious as to what.

p.s. We should bring this to upstream's attention, as the current approach is a bit brittle. And given that a pkgconfig is provided for gtk-mac-integration-gtk3, there's no reason not to use it. (And it would eliminate this issue entirely, ensuring everything is found properly... without having to specify paths.)

Change History (9)

comment:1 in reply to:  description ; Changed 23 months ago by jasonliu-- (Jason Liu)

Replying to mascguy:

p.s. We should bring this to upstream's attention, as the current approach is a bit brittle. And given that a pkgconfig is provided for gtk-mac-integration-gtk3, there's no reason not to use it. (And it would eliminate this issue entirely, ensuring everything is found properly... without having to specify paths.)

We can certainly report it upstream, but it's very unlikely that they would accept any changes for version 5.8. If you read through the thread in Issue #5590, particularly where I insert myself into the conversation, it seems that all of upstream's efforts are focused on incorporating any improvements into what will eventually become version 5.9.

So we'll probably have to implement any fix for version 5.8 ourselves, and then ask upstream to use pkgconfig for 5.9.

comment:2 in reply to:  1 Changed 23 months ago by mascguy (Christopher Nielsen)

Replying to jasonliu--:

So we'll probably have to implement any fix for version 5.8 ourselves, and then ask upstream to use pkgconfig for 5.9.

No worries regardless, it's a minor issue.

But any thoughts as to fixing the current build?

comment:3 Changed 23 months ago by jasonliu-- (Jason Liu)

I'm trying to figure out why CMake seems to be able to use the components when compiling, but then isn't linking the lib. If I'm not able to determine why, then maybe I might pivot and take a stab at seeing whether I can get CMake to use pkgconfig to find and use gtk-mac-integration-gtk3.

comment:4 Changed 23 months ago by jasonliu-- (Jason Liu)

Ok, I think I've got it. I wasn't able to figure out why CMake was compiling but not linking the lib, so I instead went ahead and made it so that CMake is able to utilize pkgconfig to locate gtk-mac-integration-gtk3.

comment:5 Changed 23 months ago by jasonliu-- (Jason Liu)

Hmm, I might have spoken too soon. The entire MacPorts build runs to completion, but the app is now crashing immediately upon launch. I'm looking into what the problem might be.

comment:6 Changed 23 months ago by jasonliu-- (Jason Liu)

I can't figure out what's causing the crash on launch. I'm going to go ahead and submit the PR, because it does resolve this current ticket's problem with not being to use gtk-mac-integration-gtk3. The crashing issue will probably need to be resolved in a different PR or Trac ticket.

comment:7 Changed 23 months ago by jasonliu-- (Jason Liu)

comment:8 Changed 23 months ago by jasonliu-- (Jason Liu)

The CI build just failed, due to failing to install dependencies for rawtherapee. Specifically, it's failing to install gtk-osx-application-common-gtk3. Looking at the port health page, it looks like gtk-osx-application-common-gtk3 isn't building on the servers (due to requiring gtk3 +quartz, which is a non-default variant), so that would cause the rawtherapee port to also fail to build.

https://github.com/macports/macports-ports/runs/6822822247?check_suite_focus=true

comment:9 Changed 23 months ago by Jason Liu <jasonliu--@…>

Resolution: fixed
Status: assignedclosed

In ec8e8d3f0fac00932f6711b9f4002913aa6d812e/macports-ports (master):

rawtherapee: fix broken port due to source code unable to find GtkMacIntegration lib files

This commit fixes the rawtherapee port, which became broken due to recent changes in MacPorts that were needed to segregate the various subports of gtk-osx-application-xx.

The fix is implemented as a CMake find module, which will, in turn, utilize PkgConfig to locate the GtkMacIntegration library. Since this was basically a complete rewrite of the ${worksrcpath}/cmake/modules/FindMacIntegration.cmake file, I instead created a new file with the name 'FindGtkMacIntegration.cmake' (which I believe to be the more proper name for the file anyway). At some point, this file should be submitted to upstream so that it gets incorporated into the RawTherapee code base.

Closes: #65283

Note: See TracTickets for help on using tickets.