Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 852614

Summary: media-gfx/gimp-2.10.32 modify libunwind dependency
Product: Gentoo Linux Reporter: Andrea Postiglione <andrea.postiglione>
Component: Current packagesAssignee: Sergey Torokhov <torokhov-s-a>
Status: UNCONFIRMED ---    
Severity: normal CC: proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Andrea Postiglione 2022-06-16 18:03:47 UTC
--- /var/db/repos/gentoo/media-gfx/gimp/gimp-2.10.32.ebuild     2022-06-15 23:10:24.000000000 +0200
+++ /var/db/repos/local/media-gfx/gimp-2.10.32.ebuild 2022-06-16 10:09:21.046292955 +0200
@@ -55,7 +55,7 @@
        openexr? ( >=media-libs/openexr-1.6.1:= )
        postscript? ( app-text/ghostscript-gpl )
        udev? ( dev-libs/libgudev:= )
-       unwind? ( >=sys-libs/libunwind-1.1.0:= )
+       unwind? ( || ( >=sys-libs/libunwind-1.1.0 >=sys-libs/llvm-libunwind-12.0.0 ) )
        webp? ( >=media-libs/libwebp-0.6.0:= )
        wmf? ( >=media-libs/libwmf-0.2.8 )
        xpm? ( x11-libs/libXpm )
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-16 19:52:22 UTC
In terms of the || () dep, that's wrong because of https://bugs.gentoo.org/791349#c16.

But indeed we can add a USE=llvm-unwind or something.
Comment 2 Sergey Torokhov 2022-06-21 10:47:09 UTC
The addition of REQUIRED_USE="unwind?( !llvm-unwind )" results in src_configure problem where "$(use_with unwind libunwind)" will always overwrite the above "$(use_with llvm-unwind libunwind)".

But even if forced to drop this conflict then llvm-libunwind couldn't be easily used because of absence of /usr/lib{,64}/pkgconfig/libunwind.pc and other *.pc files that didn't provided by llvm-libunwind. It just can't be found by gimp build script.
Comment 3 Andrea Postiglione 2022-06-21 12:33:31 UTC
(In reply to Sergey Torokhov from comment #2)
> The addition of REQUIRED_USE="unwind?( !llvm-unwind )" results in
> src_configure problem where "$(use_with unwind libunwind)" will always
> overwrite the above "$(use_with llvm-unwind libunwind)".
> 
> But even if forced to drop this conflict then llvm-libunwind couldn't be
> easily used because of absence of /usr/lib{,64}/pkgconfig/libunwind.pc and
> other *.pc files that didn't provided by llvm-libunwind. It just can't be
> found by gimp build script.

i've built gimp with current llvm-libunwind
Comment 4 Sergey Torokhov 2022-06-21 13:48:10 UTC
I checked for llvm-libunwind-13.0.1.
I will try to recheck with 14.0.4. But anyway gimp build script uses pkgconfig to find libunwind(.pc) and some backtrace implementation that were not provided by llvm-libunwind-13.0.1. The libunwind provides ptrace and others "tools".

Are you sure that gimp really found unwind imlementation and didn't disable this feature on checking?

You could check the configure phase log for LIBUNWIND status while build Gimp with installed llvm-libunwind.

Imho, additional (maybe conditional) patching of configure.ac is required to force using this library without use of pkgconfig. Although this can't guarantee the success due to possible differences between libraries.