Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#35362 - [giflib] quantize

Attached to Project: Arch Linux
Opened by Michael Schubert (mschu) - Sunday, 19 May 2013, 13:59 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Tuesday, 02 July 2013, 19:20 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

In giflib 4.2, the devs removed quantize without accounting for backwards compatibility. They re-added it in 5.0, but now the 4.2 package is left without support for it.

Additional info:
https://github.com/PhantomX/slackbuilds/blob/master/giflib/patches/giflib-4.2.1-quantize.patch
http://web.archiveorange.com/archive/v/lGf5fZc7Mi7k4QGRJOeh


Steps to reproduce:
packages affected should be gdal (untested), ncbi-toolkit (I maintain this in AUR), and possibly others.
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Tuesday, 02 July 2013, 19:20 GMT
Reason for closing:  Fixed
Additional comments about closing:  giflib 4.2.1-3
Comment by Laurent El Shafey (laurentes) - Wednesday, 12 June 2013, 09:21 GMT
Hello,

When you patch a specific release of a library, may you please consider to add a flag (i.e. #define), that allows to identify that this is a 'patched' release. This is particularly important when dealing with software maintenance on multiple platforms. For this specific example, if I want my gif codec to work on both arch and ubuntu (that both uses giflib 4.2.1), I have on one side one platform that does not define QuantizeBuffer() (ubuntu) and another that does define it (arch), but absolutely no easy way to distinguish them (The #define flags return the exact same version in both cases), which is annoying for a function that already exists on specific versions of giflib.

Thanks for your consideration and cheers,
Laurent
Comment by Jan de Groot (JGC) - Wednesday, 12 June 2013, 10:32 GMT
Adding some random string to the version string doesn't really solve this problem, as you would have to make sure every package maintainer for every distribution solves this in the same way.

Isn't it possible to detect the symbol or definition of the QuantizeBuffer function and only use it if it exists?
Comment by Laurent El Shafey (laurentes) - Thursday, 13 June 2013, 10:13 GMT
Hello,

Thank you for your answer. Detection of the symbol or definition at compilation time is possible but a bit tricky. Here is how this can be done for a cmake project:
https://github.com/idiap/bob/commit/ed28f9c9e00b37c78a4e255ce8aa30d59354b926

However, the current Arch package of giflib seems to be buggy for me: the patch was likely not applied *before* generating the library, which means that there is a mismatch between the header and the library.
Here is the *proof*:

This compiles and links against libgif smoothly:
[arch-12:07] bob >> echo -e '#include <gif_lib.h>\nint main() { EGifOpenFileName(0, 0); }' > test.cc
[arch-12:07] bob >> g++ -lgif test.cc

This does not link properly:
[arch-12:07] bob >> echo -e '#include <gif_lib.h>\nint main() { QuantizeBuffer(0,0,0,0,0,0,0,0); }' > test.cc
[arch-12:07] bob >> g++ -lgif test.cc
/tmp/cc1GuPSz.o: In function `main':
tt.cc:(.text+0x3a): undefined reference to `QuantizeBuffer'
collect2: error: ld returned 1 exit status
[arch-12:07] bob >>

QuantizeBuffer() is declared in the header, but does not seem to be integrated into the library.

Thanks in advance for your help.
Comment by Bartłomiej Piotrowski (Barthalion) - Thursday, 13 June 2013, 11:52 GMT
And that's exactly why I reopened the bug which has nothing to the detection of symbol. =)
Comment by Laurent El Shafey (laurentes) - Wednesday, 26 June 2013, 08:23 GMT
Hello,

I don't know what is the policy of Arch. Is there a plan to repackage this library correctly?
Either, by removing the patch (which was only applied to the header file AFAIK), or by applying the patch *before* the generation of the library files (.so).

Thanks in advance for your answer.
Comment by Bartłomiej Piotrowski (Barthalion) - Wednesday, 26 June 2013, 10:03 GMT
No, there is no such plan, that's why the task is still open.
Of course I'm going to fix the issue, which is not as easy as "applying the patch *before* the generation of the library files (.so)".
Comment by André Anjos (anjos) - Friday, 28 June 2013, 07:27 GMT
This bug is is blocking any possible use of our software on ArchLinux.

How can we help as to get this fixed?
Comment by Bartłomiej Piotrowski (Barthalion) - Monday, 01 July 2013, 19:06 GMT
Sorry, I removed my stupid question, I required a coffee to get my brain to work.
I'm going to push giflib-4.2.1-3 in a moment, could you test if it works with more complicated code than Laurent posted?
Comment by Laurent El Shafey (laurentes) - Tuesday, 02 July 2013, 11:16 GMT
Thanks, this is working properly now (for both the simple test given above, and a codec that makes use of QuantizeBuffer()).

Loading...