#477 Building fceux 2.1.5 failed

closed
nobody
None
5
2012-06-08
2012-03-01
Markus Rathgeb
No

If I try building fceux v2.1.5 on an amd64 platform with recent gcc and glibc versions, the compilation of file.cpp failed.

x86_64-pc-linux-gnu-g++ -o src/fds.o -c -Wall -Wno-write-strings -Wno-sign-compare -Isrc/lua/src -march=native -O2 -pipe -pthread -D_GTK -DLUA_USE_LINUX -DHAVE_ASPRINTF -DOPENGL -DHAVE_GD -DPUBLIC_RELEASE -DQT_SHARED -D_GTK2 -D_S9XLUA_H -DPSS_STYLE=1 -D_GNU_SOURCE=1 -D_REENTRANT -DLSB_FIRST -DFRAMESKIP -DCREATE_AVI -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/libdrm -I/usr/include/qt4/QtCore -I/usr/include/SDL src/fds.cpp
x86_64-pc-linux-gnu-g++ -o src/file.o -c -Wall -Wno-write-strings -Wno-sign-compare -Isrc/lua/src -march=native -O2 -pipe -pthread -D_GTK -DLUA_USE_LINUX -DHAVE_ASPRINTF -DOPENGL -DHAVE_GD -DPUBLIC_RELEASE -DQT_SHARED -D_GTK2 -D_S9XLUA_H -DPSS_STYLE=1 -D_GNU_SOURCE=1 -D_REENTRANT -DLSB_FIRST -DFRAMESKIP -DCREATE_AVI -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/libdrm -I/usr/include/qt4/QtCore -I/usr/include/SDL src/file.cpp
src/fceu.cpp: In constructor 'FCEUGI::FCEUGI()':
src/fceu.cpp:90:22: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'const uint8'
src/fceu.cpp: In function 'void FCEUXGameInterface(GI)':
src/fceu.cpp:1115:8: warning: enumeration value 'GI_RESETM2' not handled in switch
src/fceu.cpp:1115:8: warning: enumeration value 'GI_CLOSE' not handled in switch
src/fceu.cpp:1115:8: warning: enumeration value 'GI_RESETSAVE' not handled in switch
src/fds.cpp: In function 'void FDSGI(GI)':
src/fds.cpp:92:8: warning: enumeration value 'GI_RESETM2' not handled in switch
src/fds.cpp:92:8: warning: enumeration value 'GI_RESETSAVE' not handled in switch
src/file.cpp: In function 'FCEUFILE
FCEU_fopen(const char, const char, char, char, int, const char)':
src/file.cpp:318:19: error: 'void' is not a pointer-to-object type
src/file.cpp:318:19: error: 'void
' is not a pointer-to-object type
src/file.cpp:318:19: error: 'void' is not a pointer-to-object type
src/file.cpp:318:19: error: 'void
' is not a pointer-to-object type
src/file.cpp:318:19: error: invalid conversion from 'void' to 'gzFile_s'
src/file.cpp:318:19: error: initializing argument 1 of 'int gzgetc_(gzFile_s)'
src/file.cpp:320:31: error: invalid conversion from 'void
' to 'gzFile_s'
src/file.cpp:320:31: error: initializing argument 1 of 'off_t gzseek(gzFile_s
, off_t, int)'
src/file.cpp:321:35: error: invalid conversion from 'void' to 'gzFile_s'
src/file.cpp:321:35: error: initializing argument 1 of 'int gzread(gzFile_s, void, unsigned int)'
src/file.cpp:322:21: error: invalid conversion from 'void' to 'gzFile_s'
src/file.cpp:322:21: error: initializing argument 1 of 'int gzclose(gzFile_s)'
src/file.cpp: In function 'void ApplyIPS(FILE
, FCEUFILE)':
src/file.cpp:134:32: warning: ignoring return value of 'size_t fread(void
, size_t, size_t, FILE*)', declared with attribute warn_unused_result
scons:
* [src/file.o] Error 1
src/drivers/sdl/sdl.h: At global scope:
src/drivers/sdl/sdl.h:9:13: warning: 'void DoFun(int)' declared 'static' but never defined
src/drivers/sdl/sdl.h:10:12: warning: 'isloaded' defined but not used
scons: building terminated because of errors.

The datatype must be changed from "void*" to "gzFile".
I attached a patch.

Discussion

  • zeromus
    zeromus
    2012-03-01

    already fixed in svn