Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 953503 - media-libs/gegl-0.4.58 bundles a copy of media-libs/libnsgif and does not use the system version (despite saying so)
Summary: media-libs/gegl-0.4.58 bundles a copy of media-libs/libnsgif and does not use...
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sergey Torokhov
URL: https://gitlab.gnome.org/GNOME/gegl/-...
Whiteboard:
Keywords:
Depends on:
Blocks: bundled-libs
  Show dependency tree
 
Reported: 2025-04-09 19:58 UTC by Sebastian Pipping
Modified: 2025-05-01 14:36 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Pipping gentoo-dev 2025-04-09 19:58:28 UTC
Hi, thanks for maintaining GEGL in Gentoo!

By accident (and related to experiments with giflib) if came to my attention that GEGL bundles a copy of media-libs/libnsgif, claims to fall back to the system copy when available (which the ebuild dependency ensures, great) but then pulls in the C code of the bundled copy using the C preprocessor through lines…

  /* since libnsgif is nice and simple we directly embed it in the .so  */
  #include "subprojects/libnsgif/nsgif.h"
  #include "subprojects/libnsgif/gif.c"
  #include "subprojects/libnsgif/lzw.c"

…in file operations/external/gif-load.c . Running lddtree on the resulting gif-load.so confirms that it is not in fact linked against the system copy (/usr/lib64/libnsgif.so*):

  $ lddtree /usr/lib64/gegl-0.4/gif-load.so  # no nsgiflib in here:
  /usr/lib64/gegl-0.4/gif-load.so (interpreter => None)
      libgegl-0.4.so.0 => /usr/lib64/libgegl-0.4.so.0
          libm.so.6 => /lib64/libm.so.6
              ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
          libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0
      libbabl-0.1.so.0 => /usr/lib64/libbabl-0.1.so.0
          liblcms2.so.2 => /usr/lib64/liblcms2.so.2
      libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0
          libz.so.1 => /usr/lib64/libz.so.1
          libmount.so.1 => /usr/lib64/libmount.so.1
              libblkid.so.1 => /usr/lib64/libblkid.so.1
      libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0
          libffi.so.8 => /usr/lib64/libffi.so.8
      libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0
          libpcre2-8.so.0 => /usr/lib64/libpcre2-8.so.0
      libc.so.6 => /lib64/libc.so.6

I'm optimistic that a small change in build system and removal/change of the C includes can fix this issue (i.e. ensure that all security updates to the system copy also effect GEGL instantly).

I'm not fluent in Meson yet but if I can help some other way, please let me know.

Thanks in advance!
Comment 1 Sergey Torokhov 2025-04-13 20:08:10 UTC
Thank you for report!
The currently embedded libnsgif library version is 1.0.0 like the latest of gentoo portage tree.

I reported this issue to upstream. I could force to use system installed headers of certain library version but initially I would like to see the upstream opinion about if it should use only headers or link with library.
Comment 2 Sebastian Pipping gentoo-dev 2025-04-13 20:41:32 UTC
Thank you!