Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147037 - xshipwars fails to compile with GCC 4.1.1 on amd64
Summary: xshipwars fails to compile with GCC 4.1.1 on amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 117482
  Show dependency tree
 
Reported: 2006-09-10 03:17 UTC by Kyle Hunter
Modified: 2007-01-31 19:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
adhoc patch: cast via size_t (xshipwars-2.5.5-gcc41.patch,23.68 KB, patch)
2006-12-10 02:50 UTC, OKUMURA N. Shin-ya
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Hunter 2006-09-10 03:17:04 UTC
I'm taken to believe this is caused by GCC 4.1.1.

keymapwin.cpp: In function 'void KeymapWinDrawCB(void*, void*)':
keymapwin.cpp:686: error: cast from 'void*' to 'int' loses precision
make[1]: *** [keymapwin.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/xshipwars-2.5.5/work/xsw-2.5.5/client'
make: *** [all] Error 2

!!! ERROR: games-action/xshipwars-2.5.5 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  xshipwars-2.5.5.ebuild, line 58:   Called die

!!! build client
!!! If you need support, post the topmost build error, and the call stack if relevant.





emerge --info:

Portage 2.1.1 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.18-rc6-mm1 x86_64)
=================================================================
System uname: 2.6.18-rc6-mm1 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.4
Last Sync: Sun, 10 Sep 2006 03:00:05 +0000
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r3
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17.50.0.3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -msse3 -pipe -mfpmath=sse"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O2 -msse3 -pipe -mfpmath=sse"
DISTDIR="/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo http://open-systems.ufl.edu/mirrors/gentoo "
LDFLAGS="-Wl,-z,combreloc -Wl,-O -Wl,--enable-new-dtags -Wl,--sort-common -s"
LINGUAS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/personal /usr/portage/local/layman"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aac aalib alsa avi bash-completion berkdb bitmap-fonts bzip2 cairo cdinstall cdr cli crypt cups dbus dlloader dri dvd eds elibc_glibc emboss emul-linux-x86 encode fam ffmpeg firefox flac fortran ftp gdbm gif glut gpm gstreamer gtk gtk2 hal imagemagick imlib input_devices_keyboard input_devices_mouse isdnlog jpeg kernel_linux ldap libg++ mad mikmod mmap mp3 mpeg msn ncurses nls nptl nptlonly nsplugin offensive ogg oggvorbis openal opengl oscar oss pam pcre pdf pdflib perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl svg symlink tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_nv video_cards_nvidia videos vorbis xml xorg xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 OKUMURA N. Shin-ya 2006-12-10 02:50:33 UTC
Created attachment 103733 [details, diff]
adhoc patch: cast via size_t

This patch is an adhoc fix, that changes 'cast from (void*) to (int)' to 'cast from (void*) via (size_t) to (int)'.
It works under LP64 (long and pointer are 64-bit) environment and *probably* under most ILP32 (int, long and pointer are 32-bit) environment.
This patch would fail, if sizeof(void*) was larger than sizeof(size_t),
but I don't know such an environment (except for 16-bit DOS).
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2007-01-31 19:57:23 UTC
Fixed in CVS