Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374371 - media-libs/libgphoto2-2.4.11 - automagic dependency on virtual/jpeg for some "modules"
Summary: media-libs/libgphoto2-2.4.11 - automagic dependency on virtual/jpeg for some ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://sourceforge.net/tracker/?func...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-07 17:24 UTC by Sławomir Nizio
Modified: 2011-07-18 18:52 UTC (History)
1 user (show)

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


Attachments
patch on ibgphoto2-2.4.11.ebuild (libgphoto2-2.4.11.ebuild.patch,476 bytes, patch)
2011-07-07 17:26 UTC, Sławomir Nizio
Details | Diff
libgphoto2-2.4.11-jpeg-automagic.patch (libgphoto2-2.4.11-jpeg-automagic.patch,858 bytes, patch)
2011-07-13 14:24 UTC, Pacho Ramos
Details | Diff
ebuild (patch) I have used with your patch (libgphoto2-2.4.11.ebuild.patch,1.14 KB, text/plain)
2011-07-13 19:47 UTC, Sławomir Nizio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sławomir Nizio 2011-07-07 17:24:52 UTC
/usr/lib/libgphoto2/2.4.11/ax203.so
/usr/lib/libgphoto2/2.4.11/sipix_blink2.so
/usr/lib/libgphoto2/2.4.11/jl2005c.so

those files from media-libs/libgphoto2 link to the jpeg library (provided by virtual/jpeg) *if* it is available. If not, they compile anyway.
The corresponding .la files contain (or not) "-ljpeg" in dependency_libs, accordingly.

The simplest solution is to depend on virtual/jpeg for some use flags - see attached patch (I assume the USE flag "matches" library name).

A note: configure script checks for if "jpeg" is available, but I think a patch on configure.ac is not needed since the compilation goes on anyway.

Reproducible: Always
Comment 1 Sławomir Nizio 2011-07-07 17:26:21 UTC
Created attachment 279347 [details, diff]
patch on ibgphoto2-2.4.11.ebuild

(PS similar issue exist for media-libs/libgphoto2-2.4.10, too.)
Comment 2 Pacho Ramos gentoo-dev 2011-07-07 18:48:28 UTC
Do that libs really need jpeg if you remove their buggy .la files?
Comment 3 Sławomir Nizio 2011-07-07 20:52:08 UTC
Those .la files aren't buggy, IMO, they reflect the dependency on libjpeg correctly: :)
> Do that libs really need jpeg if you remove their buggy .la files?
yes, they do.

The needed library, according to readelf and similar tools is "libjpeg.so.8".
I've scanned the directory /usr/lib/libgphoto2/2.4.11 and only those three .so files (and the 3 .la files) want libjpeg (I think I've checked with all possible cameras_* USE flags).
Comment 4 Pacho Ramos gentoo-dev 2011-07-13 14:24:25 UTC
Created attachment 279993 [details, diff]
libgphoto2-2.4.11-jpeg-automagic.patch

I tried to solve the automagic problem with this but it fails :S, need to think on this in the future then
Comment 5 Sławomir Nizio 2011-07-13 19:47:06 UTC
Created attachment 280007 [details]
ebuild (patch) I have used with your patch

I hope it helps: I've tested your patch (ebuild diff attached, x.patch is your patch) and there was no failure, and the jpeg support is correctly enabled (USE="jpeg") and disabled (USE="-jpeg").
One remark: if jpeg is in USE but no libjpeg available on system (installation forced with --nodeps), there is no error and compilation without jpeg support goes on - maybe not a issue though.
Comment 6 Pacho Ramos gentoo-dev 2011-07-14 09:10:10 UTC
Was jpeg support disabled when building with USE="-jpeg" but jpeg was still present on your system? When I tried it, it was still linking to jpeg :-S
Comment 7 Sławomir Nizio 2011-07-18 17:08:47 UTC
Sorry for the delay.
I can see upstream bug report but let me reply.

> Was jpeg support disabled when building with USE="-jpeg" but jpeg was still
> present on your system?

Yes, I used USE="-jpeg …" and I have media-libs/libjpeg-turbo installed.
Those three libs (ax203.so, sipix_blink2.so, jl2005c.so) don't link to libjpeg and the .la files don't contain -ljpeg anymore.

Only ax203.so link to libjpeg, but indirectly (as seen using lddtree), via libgd.so.2. I think it's fine. Also, if I compile media-libs/gd with USE="-jpeg", there is no such (indirect) dependency.
Comment 8 Pacho Ramos gentoo-dev 2011-07-18 18:52:23 UTC
+*libgphoto2-2.4.11-r1 (18 Jul 2011)
+
+  18 Jul 2011; Pacho Ramos <pacho@gentoo.org> +libgphoto2-2.4.11-r1.ebuild,
+  +files/libgphoto2-2.4.11-fix-automagic.patch:
+  Fix automagic dependencies on jpeg and gd, bug #374371 by Enlik. Thanks also
+  to marcusmeissner.
+