Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 406471

Summary: games-emulation/fceux-2.1.5 - src/file.cpp:318:19: error: 'void*' is not a pointer-to-object type
Product: Gentoo Linux Reporter: Markus Rathgeb <maggu2810>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal CC: rakiner
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fix compilation error

Description Markus Rathgeb 2012-03-01 19:32:15 UTC
Created attachment 303857 [details, diff]
Fix compilation error

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

The datatype of the gzfile "object" must be changed from "void*" to "gzFile".



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.
Comment 1 James L. Hammons 2012-03-05 19:35:27 UTC
Can confirm this problem on my ~amd64 system. Also, patch works as advertised. :-)

Can post emerge --info if needed. ;-)
Comment 2 Kelly Doran 2012-03-09 02:09:54 UTC
Just wanted to add that I got this same error recently, and made an identical patch that fixes the compile myself.

Portage 2.3.2-r2 (default/linux/amd64/2008.0, gcc-4.6.2, glibc-2.13-r4, 3.2.9 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.9-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.1.8
Timestamp of tree: Thu, 08 Mar 2012 19:00:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.1-r3, 3.2.2
dev-util/cmake:           2.8.7-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1.8-r3
sys-apps/openrc:          0.8.3-r5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.5
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo rak_overlay
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="git://github.com/funtoo/ports-2012.git"
SYNC_USER="root"
USE="X aac acl alac alsa amd64 apng ass avx berkdb bluetooth bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dvd dvdr dvdread encode flac fortran g3dvl gdbm gdu gif gnome gpm gtk gtk3 iconv ipv6 jpeg lame mad mmx modules mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre perl png policykit pppd python readline session sse sse2 sse4_1 ssl ssse3 sysfs tcpd tiff truetype unicode vdpau vorbis vpx wavpack x264 xml xorg xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC_UMASK
Comment 3 Agostino Sarubbo gentoo-dev 2012-03-09 06:51:12 UTC
don't CC arches on your own
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2012-03-12 19:13:13 UTC
in portage.  thanks for the bug report and patch.