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

Bug 111828

Summary: lgeneral-1.2_beta9 duplicate case value slot.c line 208
Product: Gentoo Linux Reporter: Mike Bonar <mike.bonar>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mike Bonar 2005-11-07 16:42:07 UTC
slot.c: In function `save_unit_lib_entry': 
slot.c:208: error: duplicate case value 
slot.c:208: error: previously used here 
slot.c: In function `save_unit': 
slot.c:288: error: duplicate case value 
slot.c:288: error: previously used here 
make[3]: *** [slot.o] Error 1 
 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Gentoo Base System version 1.12.0_pre9 
Portage 2.0.53_rc7 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r3, 
2.6.14-gentoo x86_64) 
================================================================= 
System uname: 2.6.14-gentoo x86_64 AMD Athlon(tm) 64 Processor 3500+ 
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[disabled] 
dev-lang/python:     2.3.5-r2, 2.4.2 
sys-apps/sandbox:    1.2.13 
sys-devel/autoconf:  2.13, 2.59-r7 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 
sys-devel/binutils:  2.16.1 
sys-devel/libtool:   1.5.20-r1 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="amd64 ~amd64" 
AUTOCLEAN="yes" 
CBUILD="x86_64-pc-linux-gnu" 
CFLAGS="-O2 -march=k8 -pipe" 
CHOST="x86_64-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O2 -march=k8 -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="http://distfiles.gentoo.org 
http://distro.ibiblio.org/pub/linux/distributions/gentoo" 
LANG="en_US.UTF-8" 
LC_ALL="en_US.UTF-8" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="X aalib accessibility alsa amd64 arts avi berkdb bitmap-fonts bonobo 
cdparanoia cdr cpudetection crypt cups curl doc dvd dvdr dvdread eds emboss 
encode esd fam flac foomaticdb fortran gd gdbm gif gimp gimpprint gnome gnutls 
gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal howl imagemagick imlib ipv6 
java jpeg junit kde ldap libedit libwww lzw lzw-tiff mad motif mozilla mp3 mpeg 
msn ncurses nls nptl nptlonly nvidia offensive ogg oggvorbis opengl pam pdflib 
perl php pic png python qt quicktime readline real rtc scanner sdl smime speex 
spell ssl tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb 
userlocales v4l v4l2 vorbis xanim xine xml xml2 xmms xpm xscreensaver xv xvid 
zlib userland_GNU kernel_linux elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS
Comment 1 Mike Bonar 2005-11-08 16:26:00 UTC
latest ebuild gives the following errors now: 
slot.c: In function `save_unit_lib_entry': 
slot.c:208: error: duplicate case value 
slot.c:208: error: previously used here 
slot.c: In function `save_unit': 
slot.c:288: error: duplicate case value 
slot.c:288: error: previously used here 
 
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2005-11-08 16:39:20 UTC
This seems like an amd64-specific issue.  builds fine on x86
Comment 3 SpanKY gentoo-dev 2005-11-08 17:51:07 UTC
it isnt an amd64 bug but rather a 64bit bug

if we force the Unit_Lib_Entry structure to be packed, the compile time test passes

gcc probably pads out the structure on 64bit systems so that the members are
aligned on word boundaries thus increasing the size of the Unit_Lib_Entry struct
Comment 4 SpanKY gentoo-dev 2005-11-08 17:53:06 UTC
proposed patch:
--- src/unit_lib.h
+++ src/unit_lib.h
@@ -145,1 +145,1 @@
-} Unit_Lib_Entry;
+} __attribute__((__packed__)) Unit_Lib_Entry;
Comment 5 Tupone Alfredo gentoo-dev 2006-10-20 14:04:31 UTC
amd64 build fixed.
Thanks for report.
And thank to Spanky for the patch. It works great!