Bug 1933274 - GIMP needs version of dependencies (lcms2} kept in sync
Summary: GIMP needs version of dependencies (lcms2} kept in sync
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gimp
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-26 13:08 UTC by Jan Pokorný [poki]
Modified: 2021-05-15 18:58 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-05-15 18:58:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Pokorný [poki] 2021-02-26 13:08:24 UTC
I am not sure whether two-phased SPEC processing[1] could be of any help
here, but it is really annoying when a piece of SW breaks because of not
having up2date enough dependencies -- that should be a responsibility of
the distro to put respective constraints in place, right?

In particular, apparently gimp.spec needs:

-Requires:       lcms2 >= 2.8
+Requires:       lcms2 >= 2.11

{in fact, LCMS_VERSION is defined to be 2100 with 2.10 already, so
that would be a sufficient minimum, see below)

when built with that version, which was the case for
gimp-2.10.22-2.fc34.3 (i.e. with libcms2-devel-2.11-2.fc33):
https://kojipkgs.fedoraproject.org//packages/gimp/2.10.22/2.fc34.3/data/logs/x86_64/root.log

Otherwise, this GIMP build when run in concert with run-time linked
lcms2-2.9-7.fc32 ends up with a following dialog:

> Liblcms2 version mismatch!
> 
> GIMP was compiled against LittleCMS version 2.0, but the
> LittleCMS version found at runtime is only 2.9.
> 
> Somehow you or your software packager managed
> to install a LittleCMS that is older than what GIMP was
> built against.
> 
> Please make sure that the installed LittleCMS version
> is at least 2.0 and that headers and library match.

This stems from this snippet[2]:

> 394   if (LCMS_VERSION > lcms_version)
> 395     {
> 396       return g_strdup_printf
> 397         ("Liblcms2 version mismatch!\n\n"
> 398          "GIMP was compiled against LittleCMS version %d.%d, but the\n"
> 399          "LittleCMS version found at runtime is only %d.%d.\n\n"
> 400          "Somehow you or your software packager managed\n"
> 401          "to install a LittleCMS that is older than what GIMP was\n"
> 402          "built against.\n\n"
> 403          "Please make sure that the installed LittleCMS version\n"
> 404          "is at least %d.%d and that headers and library match.",
> 405          LCMS_VERSION / 1000, LCMS_VERSION % 100 / 10,
> 406          lcms_version / 1000, lcms_version % 100 / 10,
> 407          LCMS_VERSION / 1000, LCMS_VERSION % 100 / 10);
> 408     }

where runtime evaluated lcms_version equals 2090 and GIMP-build-time
LCMS_VERSION constant equals 2100.

BTW. to make things even more confusing, there is a bug/confusion
around versioning contract on the LittleCMS' side:

https://gitlab.gnome.org/GNOME/gimp/-/issues/6505

* * *

To recap, the bare minimum is to bump the requirement:

-Requires:       lcms2 >= 2.8
+Requires:       lcms2 >= 2.10

Thanks for looking into this.

* * *

[1] https://fedoraproject.org/wiki/Changes/Enable_Spec_File_Preprocessing
[2] https://gitlab.gnome.org/GNOME/gimp/-/blob/GIMP_2_10_22/app/sanity.c#L394-408

Comment 1 Jan Pokorný [poki] 2021-02-26 13:17:32 UTC
> [1] https://fedoraproject.org/wiki/Changes/Enable_Spec_File_Preprocessing

Thought it could provide an analogy to "dynamic build dependencies"
(https://github.com/rpm-software-management/rpm/pull/593), alas likely
not at this time.

Comment 2 Nils Philippsen 2021-05-15 18:58:36 UTC
Sorry for the late reply.

I'd be game if "dynamic runtime requires" (similar to what you linked) were a thing, i.e. if there were a way to compute the minimum version of the package at build time and insert that into the dependencies. However, having to maintain that manually is too much hassle for too little benefit:

* We'd potentially have to maintain different runtime dependency versions in gimp for lcms2 for different Fedora releases.
* It would only prevent the user from Doing The Wrong Thing if they attempted to, e.g. when trying to install gimp from F-34 with lcms2 of F-32 which we never supported. This wouldn't apply when users simply updated their systems to the latest available stable packages in a Fedora release: if we upgraded lcms2 in a stable release to a compatible version (same SONAME), the check you encountered wouldn't cry foul, if we issued an update with a new release of the gimp package on top of it, that wouldn't change.

Closing.


Note You need to log in before you can comment on or make changes to this bug.