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!
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!
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
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
|
DetailsDescription:
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
Tuesday, 02 July 2013, 19:20 GMT
Reason for closing: Fixed
Additional comments about closing: giflib 4.2.1-3
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
Isn't it possible to detect the symbol or definition of the QuantizeBuffer function and only use it if it exists?
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.
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.
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)".
How can we help as to get this fixed?
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?