patch attached to resolve this.
Created attachment 359698 [details, diff] PrintGifError to GifErrorString patch
*** Bug 486374 has been marked as a duplicate of this bug. ***
*** Bug 488010 has been marked as a duplicate of this bug. ***
(In reply to Aaron Pelton from comment #1) > Created attachment 359698 [details, diff] [details, diff] > PrintGifError to GifErrorString patch I confirm the bug. Thanks for the patch. It is working, but is not applied automatically when put to e.g. /etc/portage/patches/media-libs/imlib-1.9.15/. epatch_user should be added to function src_prepare() of ebuild. Version bump requested.
Does GifErrorString actually print that string, the way PrintGifError does? The docs at http://giflib.sourceforge.net/gif_lib.html#idp139024 only mention a returned string. They also state the return type as int, which doesn't make too much sense. GDAL for example does some more work to actually print that string, see http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/gif/gifdataset.cpp?rev=24608#L491.
(In reply to Martin von Gagern from comment #5) > Does GifErrorString actually print that string, the way PrintGifError does? > The docs at http://giflib.sourceforge.net/gif_lib.html#idp139024 only > mention a returned string. They also state the return type as int, which > doesn't make too much sense. > > GDAL for example does some more work to actually print that string, see > http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/gif/gifdataset. > cpp?rev=24608#L491. I would agree, the documentation is probably in error given the second link. I was working from a different sample patch (https://abf.rosalinux.ru/openmandriva/imlib/commit/b74ec4832c680c1bbe084cc94562f812fb05c7c5) which did what I proposed so I'm sure you're correct the second link work needs to be done. TBH, I didn't originally look very deeply nor at all the implications. I'm willing to make the changes to the patch, but it's basically a one-liner from what I see so anybody could do it in 30 seconds. I confirmed PrintGifError just fprintf(stderr... the error string. Further I see that v5 of giflib will require the error code as an arg. Not sure how soon v5 would be in the pipeline?
Created attachment 368256 [details, diff] adjusted patch added the missing fprintf
ignore adjusted patch...needs more work
Created attachment 368274 [details, diff] improved patch which handles giflib 4/5 based on gdal code
(In reply to Aaron Pelton from comment #9) > Created attachment 368274 [details, diff] [details, diff] > improved patch which handles giflib 4/5 based on gdal code works fine.
Created attachment 368718 [details, diff] imlib-1.9.15-myPrintGifError.patch I seem to have written my own pseudo-reasonable patch for this as well, here it is. Although clearly something should go into gentoo-x86 for this tout-suite, it's poor form to just stick a patch into Gentoo, for a real upstream bug, like this, without at least verifying that upstream trunk has their own solution. Has anyone looked into that?
also see bug 499268
(In reply to Greg Turner from comment #11) > Created attachment 368718 [details, diff] [details, diff] > imlib-1.9.15-myPrintGifError.patch > > Although clearly something should go into gentoo-x86 for this tout-suite, > it's poor form to just stick a patch into Gentoo, for a real upstream bug, > like this, without at least verifying that upstream trunk has their own > solution. Has anyone looked into that? I've poked around a little and don't find it listed (as imlib) in current gnome source (imlib 1.9 directory last updated 2009 and under z_archived) and I only have one package installed that depends on it. So examining Kuickshow (the one) I find https://bugs.kde.org/show_bug.cgi?id=194875 which is a "migrate to qtlibsomething" from 2009 so they seem to be aware imlib was deprecated but continue using it for speed. I don't have an account for the kde bugtracker so I haven't reported it (seems redundant) but I can see an argument for an update. IMO, because the patches are on what appears to be unchanging source, it certainly seems like a "faster" solution to pick one until the imlib dependency goes away which might be a while as the migration may not be trivial in any case.
i think this package should be masked.
(In reply to C.J. Wijtmans from comment #14) > i think this package should be masked. That sounds less than ideal as there appear to be a lot of ebuilds in packages that depend on imlib. (imlib2 doesn't appear to be a dropin replacement)
(In reply to Greg Turner from comment #11) > Created attachment 368718 [details, diff] [details, diff] > imlib-1.9.15-myPrintGifError.patch > > I seem to have written my own pseudo-reasonable patch for this as well, here > it is. i think there's a typo in there: myPrintGitError2 -> myPrintGifError2 and PrintGitError -> GifErrorString
imlib-1.9.15-myPrintGifError.patch > imlib-1.9.15-myPrintGitError.patch
Same problem at the end of the compile phase of kuickshow. The patch imlib-1.9.15-myPrintGifError.patch for imlib solved it. The patch should go to the portage tree, I think.
(In reply to PaX Team from comment #16) > (In reply to Greg Turner from comment #11) > > Created attachment 368718 [details, diff] [details, diff] [details, diff] > > imlib-1.9.15-myPrintGifError.patch > > > > I seem to have written my own pseudo-reasonable patch for this as well, here > > it is. > > i think there's a typo in there: myPrintGitError2 -> myPrintGifError2 and > PrintGitError -> GifErrorString ack, that is indeed a typo.
Created attachment 373312 [details, diff] imlib-1.9.15-myPrintGifError-r2.patch Fix silly typo.
Created attachment 373314 [details, diff] imlib-1.9.15-myPrintGifError-r3.patch bleh... pretty sure there was a thinko in there too, as hinted at above (subtly -- almost missed it). Corrected, I think, but untested. Can someone who has slept more recently than I take a look and confirm my belief that this -r3 patch has one less bug than the -r2 version? -gmt
(In reply to Greg Turner from comment #21) > Can someone who has slept more recently than I take a look and confirm my > belief that this -r3 patch has one less bug than the -r2 version? actually i think -r2 is closer to the truth save for the PrintGifError/GifErrorString rename i also needed.
(In reply to PaX Team from comment #22) > (In reply to Greg Turner from comment #21) > > Can someone who has slept more recently than I take a look and confirm my > > belief that this -r3 patch has one less bug than the -r2 version? > > actually i think -r2 is closer to the truth save for the > PrintGifError/GifErrorString rename i also needed. OK, got some sleep :)(In reply to PaX Team from comment #22) > (In reply to Greg Turner from comment #21) > > Can someone who has slept more recently than I take a look and confirm my > > belief that this -r3 patch has one less bug than the -r2 version? > > actually i think -r2 is closer to the truth save for the > PrintGifError/GifErrorString rename i also needed. I got some sleep finally :) IIRC my original intent with MyPrintGifError/MyPrintGifError2 was to avoid any concerns about namespace conflicts, say, if these two units were linked into the same library. As implemented, that's a non-issue: they're just macros, so they are not going to generate symbols. Whether it's there as vestigial cruft, laziness, or a brainfart, it's not helping, so "MyPrintGifError2" should just be MyPrintGifError, unless I'm missing something. Second, I think I now see what you are getting at (sleep really helps!) wrt PrintGifError/GifErrorString... I'll try again -- this time, with some testing -- and post an -r4 patch here.
Created attachment 373472 [details, diff] imlib-1.9.15-myPrintGifError-r4.patch Another attempt to clean up the mess in my patch. Tested against giflib-4.2.3 and giflib-5.0.5.
Also gave this a try vs. giflib 4.1.6-r2; it compiles against that as well; hopefully all is well with it now.
*** Bug 506178 has been marked as a duplicate of this bug. ***
*** Bug 514524 has been marked as a duplicate of this bug. ***
ping
I can confirm that the problem still occurs and patch from comment 24 fixes it.
*** Bug 544350 has been marked as a duplicate of this bug. ***
*** Bug 538242 has been marked as a duplicate of this bug. ***
Created attachment 425194 [details, diff] Build fixes for giflib5 /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c: In function '_LoadGIF': /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c:478:9: error: too few arguments to function 'DGifOpenFileHandle' gif = DGifOpenFileHandle(fd); ^ In file included from /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/Imlib_private.h:43:0, from /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c:4: /usr/include/gif_lib.h:180:14: note: declared here GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); ^ /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c:505:8: error: too few arguments to function 'DGifCloseFile' DGifCloseFile(gif); ^ In file included from /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/Imlib_private.h:43:0, from /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c:4: /usr/include/gif_lib.h:183:9: note: declared here int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); ^ /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c:511:8: error: too few arguments to function 'DGifCloseFile' DGifCloseFile(gif); ^ In file included from /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/Imlib_private.h:43:0, from /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c:4: /usr/include/gif_lib.h:183:9: note: declared here int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); ^ /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c:522:5: error: too few arguments to function 'DGifCloseFile' DGifCloseFile(gif); ^ In file included from /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/Imlib_private.h:43:0, from /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c:4: /usr/include/gif_lib.h:183:9: note: declared here int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); ^ /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c:611:3: error: too few arguments to function 'DGifCloseFile' DGifCloseFile(gif); ^ In file included from /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/Imlib_private.h:43:0, from /var/tmp/portage/media-libs/imlib-1.9.15-r4/work/imlib-1.9.15/Imlib/load.c:4: /usr/include/gif_lib.h:183:9: note: declared here int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); ^
we will fix it for 5.1 directly *** This bug has been marked as a duplicate of bug 538976 ***