Created attachment 422662 [details] build.log gif.c:182:9: error: too few arguments to function ‘DGifCloseFile’ if (DGifCloseFile(GifFile) == GIF_ERROR) { ^ In file included from gif.c:25:0: /usr/include/gif_lib.h:183:9: note: declared here int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); ^ gif.c: In function ‘QuitGifError’: gif.c:496:26: error: too few arguments to function ‘EGifCloseFile’ if (GifFile != NULL) EGifCloseFile(GifFile); ^ In file included from gif.c:25:0: /usr/include/gif_lib.h:132:5: note: declared here int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); ^ gif.c: In function ‘write_gif’: gif.c:592:9: error: too few arguments to function ‘EGifCloseFile’ if (EGifCloseFile(GifFile) == GIF_ERROR) ^ In file included from gif.c:25:0: /usr/include/gif_lib.h:132:5: note: declared here int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); ^ giflib-5.1 added an error code parameter to these 2 functions: http://sourceforge.net/p/giflib/code/ci/116179a7d4681dda9afcdd43b5fbfb391b44918b/tree/doc/gif_lib.xml?diff=8408b09b69e5ce836d01a29e05c626ffa55cffaa Also: png.c: In function ‘read_png’: png.c:143:13: warning: implicit declaration of function ‘memcpy’ [-Wimplicit-function-declaration] memcpy(ptr, row_pointers[i], 3 * *width); ^ png.c:143:13: warning: incompatible implicit declaration of built-in function ‘memcpy’ png.c:143:13: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
There's this commit in upstream's svn repo: http://sourceforge.net/p/xplanet/code/186/ which is tagged as "update gif code to 5.0.0"
The *GifCloseFile are an additional change in 5.1 (1.3.0-r1 has the patch to support 5.0) FreeBSD patch was update to support 5.1 (with proper #ifdef): http://svnweb.freebsd.org/ports/head/astro/xplanet/files/patch-src_libimage_gif.c?revision=401388 Working fine here with system 5.1 :)
(In reply to Bernard Cafarelli from comment #2) > The *GifCloseFile are an additional change in 5.1 (1.3.0-r1 has the patch to > support 5.0) > > FreeBSD patch was update to support 5.1 (with proper #ifdef): > http://svnweb.freebsd.org/ports/head/astro/xplanet/files/patch- > src_libimage_gif.c?revision=401388 > > Working fine here with system 5.1 :) But it's broken with giflib 4.1.6.
Created attachment 427952 [details, diff] Patch that should support all versions I updated the current Gentoo patch to handle the 5.1 case. It looks quite different (I used unified diff), but the changes are in fact limited to: % diff -Naur /var/tmp/portage/x11-misc/xplanet-1.3.0-r1/work/xplanet-1.3.0/src/libimage/gif.c ~/xplanet-1.3.0/src/libimage/gif.c --- /var/tmp/portage/x11-misc/xplanet-1.3.0-r1/work/xplanet-1.3.0/src/libimage/gif.c 2016-03-11 11:17:28.731270651 +0100 +++ /home/voyageur/xplanet-1.3.0/src/libimage/gif.c 2016-03-11 11:15:30.285427606 +0100 @@ -178,8 +178,11 @@ *BufferP++ = ColorMapEntry->Blue; } } - +#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 + if (DGifCloseFile(GifFile, NULL) == GIF_ERROR) { +#else if (DGifCloseFile(GifFile) == GIF_ERROR) { +#endif return(0); } @@ -493,7 +496,11 @@ static void QuitGifError(GifFileType *GifFile) { fprintf(stderr, "Error writing GIF file\n"); +#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 + if (GifFile != NULL) EGifCloseFile(GifFile, NULL); +#else if (GifFile != NULL) EGifCloseFile(GifFile); +#endif } int @@ -589,7 +596,11 @@ Ptr += width; } +#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 + if (EGifCloseFile(GifFile, NULL) == GIF_ERROR) +#else if (EGifCloseFile(GifFile) == GIF_ERROR) +#endif { QuitGifError(GifFile);
Same problem here, solved by the Bernard Cafarelli's patch. Thank's Bernard. Could you push a new xplanet-1.3.0-r2 version?
Fixed in 1.3.1.