Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948869 - media-gfx/darktable: need for sys-devel/gcc[graphite] can be obviated with small amount of patching
Summary: media-gfx/darktable: need for sys-devel/gcc[graphite] can be obviated with sm...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Markus Meier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-26 18:50 UTC by Vincent Reher
Modified: 2025-01-26 20:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Modified ebuild (darktable-4.8.0-r1.ebuild,5.14 KB, text/plain)
2025-01-26 18:50 UTC, Vincent Reher
Details
Patch showing differences from current ebuild (darktable-4.8.0-r1.patch,2.24 KB, patch)
2025-01-26 18:51 UTC, Vincent Reher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Reher 2025-01-26 18:50:30 UTC
Created attachment 917567 [details]
Modified ebuild

While the source code does seem to require graphite-specific loop optimizations via "#pragma GCC optimize ...", the package builds and seems to run fine without them. It doesn't look like GCC is going to incorporate graphite any time soon, so its not reasonable to require it for a package.

The attached ebuild builds darktable with gcc without graphite. It does that by removing the offending graphite-specific optimizations in the source code. The attached patch file shows the differences between the ebuild and the one currently in portage.
Comment 1 Vincent Reher 2025-01-26 18:51:36 UTC
Created attachment 917568 [details, diff]
Patch showing differences from current ebuild
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-26 18:59:47 UTC
(In reply to Vincent Reher from comment #0)
> Created attachment 917567 [details]
> Modified ebuild
> 
> While the source code does seem to require graphite-specific loop
> optimizations via "#pragma GCC optimize ...", the package builds and seems
> to run fine without them. It doesn't look like GCC is going to incorporate
> graphite any time soon, so its not reasonable to require it for a package.
> 

Well, it is incorporated, it's just an optional component, which is why we have it under a USE flag. But yes, it's a pain for people as it's not default-enabled.

(In reply to Vincent Reher from comment #0)
> Created attachment 917567 [details]
> Modified ebuild
> 
> While the source code does seem to require graphite-specific loop
> optimizations via "#pragma GCC optimize ...", the package builds and seems
> to run fine without them. It doesn't look like GCC is going to incorporate
> graphite any time soon, so its not reasonable to require it for a package.
> 

The risk with this is people making upstream performance complaints but it may be fine, especially given graphite-style improvements have made their way into the rest of GCC (not everything but some).
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-26 19:00:40 UTC
I think this is arguably really a dupe of bug 925209 but I guess it's fine to have it separate to discuss the patching angle.
Comment 4 Vincent Reher 2025-01-26 20:17:19 UTC
(In reply to Sam James from comment #2)
 
> The risk with this is people making upstream performance complaints but it
> may be fine, especially given graphite-style improvements have made their
> way into the rest of GCC (not everything but some).


When I first encountered this (Nov 2023), I ran across a seemingly authoritative message somewhere stating that graphite was not likely to ever be incorporated into mainstream gcc code. But honestly, I cannot remember where I saw that.

It is certainly possible that some of what I determined at that time as graphite-specific optimizations may have made their way into GCC.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-26 20:22:48 UTC
graphite itself has been part of GCC for a long time (2008 or so?), but some (not all) of the things it did are now implemented as non-graphite passes as well (I think, though no examples come to mind right now, but I'm also trying to stay awake :)).