bcampbell / evilpixie

Pixel-oriented paint program, modelled on Deluxe Paint
http://evilpixie.scumways.com
GNU General Public License v3.0
42 stars 3 forks source link

Doesn't compile -- libgif API incompatibility #9

Closed 0ion9 closed 7 years ago

0ion9 commented 9 years ago

Following the instructions in the README:

$ qmake evilpixie.pro
$ make
g++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DEVILPIXIE_DATA_DIR=\"/usr/local/share/evilpixie\" -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o anim.o src/anim.cpp
src/anim.cpp: In member function ‘void Anim::LoadGif(const char*)’:
src/anim.cpp:185:49: error: too few arguments to function ‘GifFileType* DGifOpenFileName(const char*, int*)’
     GifFileType* f = DGifOpenFileName( filename );
                                                 ^
In file included from src/anim.cpp:4:0:
/usr/include/gif_lib.h:179:14: note: declared here
 GifFileType *DGifOpenFileName(const char *GifFileName, int *Error);
              ^
src/anim.cpp:187:81: error: ‘GifLastError’ was not declared in this scope
         throw Exception( "couldn't open '%s' (code %d)", filename, GifLastError() );
                                                                                 ^
src/anim.cpp:191:24: error: too few arguments to function ‘int DGifCloseFile(GifFileType*, int*)’
         DGifCloseFile(f);
                        ^
In file included from src/anim.cpp:4:0:
/usr/include/gif_lib.h:183:9: note: declared here
     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
         ^
src/anim.cpp:192:81: error: ‘GifLastError’ was not declared in this scope
         throw Exception( "couldn't load '%s' (code %d)", filename, GifLastError() );
                                                                                 ^
src/anim.cpp:240:20: error: too few arguments to function ‘int DGifCloseFile(GifFileType*, int*)’
     DGifCloseFile(f);
                    ^
In file included from src/anim.cpp:4:0:
/usr/include/gif_lib.h:183:9: note: declared here
     int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
         ^
src/anim.cpp: In member function ‘void Anim::SaveGif(const char*)’:
src/anim.cpp:343:28: error: cannot convert ‘const char*’ to ‘GifFileType*’ for argument ‘1’ to ‘void EGifSetGifVersion(GifFileType*, bool)’
     EGifSetGifVersion("89a");
                            ^
src/anim.cpp:349:41: error: too few arguments to function ‘GifFileType* EGifOpenFileName(const char*, bool, int*)’
         f = EGifOpenFileName(filename, 0);
                                         ^
In file included from src/anim.cpp:4:0:
/usr/include/gif_lib.h:126:14: note: declared here
 GifFileType *EGifOpenFileName(const char *GifFileName,
              ^
src/anim.cpp:352:89: error: ‘GifLastError’ was not declared in this scope
             throw Exception( "couldn't open '%s' (gif code %d)", filename, GifLastError() );
                                                                                         ^
src/anim.cpp:355:74: error: ‘MakeMapObject’ was not declared in this scope
         ColorMapObject* cmap = MakeMapObject( m_Palette.NumColours(), NULL);
                                                                          ^
src/anim.cpp:374:76: error: ‘GifLastError’ was not declared in this scope
             throw Exception( "gif error (code %d)", filename, GifLastError() );
                                                                            ^
src/anim.cpp:382:22: warning: narrowing conversion of ‘(((int)delay) & 255)’ from ‘int’ to ‘unsigned char’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 delay&0xff, delay>>8, /* delay time (little endian) */
                      ^
src/anim.cpp:382:34: warning: narrowing conversion of ‘(((int)delay) >> 8)’ from ‘int’ to ‘unsigned char’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 delay&0xff, delay>>8, /* delay time (little endian) */
                                  ^
src/anim.cpp:383:31: warning: narrowing conversion of ‘Anim::TransparentIdx()’ from ‘int’ to ‘unsigned char’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 TransparentIdx()
                               ^
src/anim.cpp:392:81: error: ‘EGifPutExtensionFirst’ was not declared in this scope
             EGifPutExtensionFirst(f, APPLICATION_EXT_FUNC_CODE, 11, "NETSCAPE2.0");
                                                                                 ^
src/anim.cpp:393:69: error: ‘EGifPutExtensionLast’ was not declared in this scope
             EGifPutExtensionLast(f, APPLICATION_EXT_FUNC_CODE, 3, buf);
                                                                     ^
src/anim.cpp:414:17: error: ‘FALSE’ was not declared in this scope
                 FALSE,
                 ^
src/anim.cpp:417:80: error: ‘GifLastError’ was not declared in this scope
                 throw Exception( "gif error (code %d)", filename, GifLastError() );
                                                                                ^
src/anim.cpp:426:84: error: ‘GifLastError’ was not declared in this scope
                     throw Exception( "gif error (code %d)", filename, GifLastError() );
                                                                                    ^
src/anim.cpp:431:27: error: ‘FreeMapObject’ was not declared in this scope
         FreeMapObject(cmap);
                           ^
src/anim.cpp:432:24: error: too few arguments to function ‘int EGifCloseFile(GifFileType*, int*)’
         EGifCloseFile(f);
                        ^
In file included from src/anim.cpp:4:0:
/usr/include/gif_lib.h:132:5: note: declared here
 int EGifCloseFile(GifFileType *GifFile, int *ErrorCode);
     ^
src/anim.cpp:437:31: error: ‘FreeMapObject’ was not declared in this scope
             FreeMapObject(cmap);
                               ^
src/anim.cpp:439:28: error: too few arguments to function ‘int EGifCloseFile(GifFileType*, int*)’
             EGifCloseFile(f);
                            ^
In file included from src/anim.cpp:4:0:
/usr/include/gif_lib.h:132:5: note: declared here
 int EGifCloseFile(GifFileType *GifFile, int *ErrorCode);
     ^
Makefile:807: recipe for target 'anim.o' failed
make: *** [anim.o] Error 1

Platform: Arch Linux x86_64 libdevil: 1.7.8 libxpm: 3.5.11 libgif: 5.1.1 qt4: 4.8.7

bcampbell commented 9 years ago

Ahh, looks like giflib changed their API. About 3 years ago ;-) giflib 5.x seems like a reasonable requirement, so I'll upgrade it when I get a chance. (Ultimately I'd like to improve the GIF support in libDevil, and remove the direct giflib dependency altogether)

bcampbell commented 7 years ago

Sorted (finally!). Now handled via https://github.com/bcampbell/impy, which requires giflib5