<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>49261</bug_id>
          
          <creation_ts>2004-04-28 01:23 0000</creation_ts>
          <short_desc>xmame 0.81.1 won&apos;t compile (link) on PPC</short_desc>
          <delta_ts>2004-08-15 03:41:50 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Games</component>
          <version>unspecified</version>
          <rep_platform>PPC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mat@esi.com.pl</reporter>
          <assigned_to>ppc@gentoo.org</assigned_to>
          <cc>games@gentoo.org</cc>
    
    <cc>groepaz@gmx.net</cc>
    
    <cc>tcpdevil@linuxlover.org</cc>

      

      
          <long_desc isprivate="0">
            <who>mat@esi.com.pl</who>
            <bug_when>2004-04-28 01:23:43 0000</bug_when>
            <thetext>I&apos;ve just tried to emerge the new version of xmame on my Pegasos
and received the following error after the compilation seemd to work fine:

Archiving ../../xmame.obj/unix.x11/osdepend.a ...
make[2]: Leaving directory `/var/tmp/portage/xmame-0.81.1/work/xmame-0.81.1/src/unix&apos;
make[1]: Leaving directory `/var/tmp/portage/xmame-0.81.1/work/xmame-0.81.1/src/unix&apos;
Linking xmame.x11 ...
/usr/lib/gcc-lib/powerpc-unknown-linux-gnu/3.2.3/../../../crt1.o(.text+0x20): In function `_start&apos;:
: relocation truncated to fit: R_PPC_REL24 __libc_start_main@@GLIBC_2.0
/usr/lib/gcc-lib/powerpc-unknown-linux-gnu/3.2.3/../../../crti.o(.text+0x10): In function `call_gmon_start&apos;:
/var/tmp/portage/glibc-2.3.2-r9/work/glibc-2.3.2/buildhere/csu/crti.S:16: relocation truncated to fit: R_PPC_LOCAL24PC _GLOBAL_OFFSET_TABLE_+fffffffffffffffc
xmame.obj/mame.o(.text+0xb8): In function `run_game&apos;:
: relocation truncated to fit: R_PPC_REL24 strlen@@GLIBC_2.0
xmame.obj/mame.o(.text+0x124): In function `run_game&apos;:
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x15c): In function `run_game&apos;:
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x190): In function `run_game&apos;:
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x408): In function `run_machine&apos;:
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x45c): In function `run_machine&apos;:
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x4a4): In function `run_machine&apos;:
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x4d4): In function `run_machine&apos;:
: relocation truncated to fit: R_PPC_REL24 rand@@GLIBC_2.0
xmame.obj/mame.o(.text+0x4fc): In function `run_machine&apos;:
: additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
make: *** [xmame.x11] Error 1

!!! ERROR: games-emulation/xmame-0.81.1 failed.
!!! Function src_compile, Line 176, Exitcode 2
!!! emake failed (x11)

In fact fist it crashed linking xmame.SDL and as I don&apos;t use it
I tried to switch SDL off, but there is the same error with x11
version and it seems to me that it might not really be xmame 
problem but for a moment I don&apos;t have the idea what to do about it.

M.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-04-28 01:27:31 0000</bug_when>
            <thetext>seems like a gcc bug to me

i dont know what version of gcc you&apos;re using though since you neglected to provide `emerge info`</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mat@esi.com.pl</who>
            <bug_when>2004-04-28 01:36:17 0000</bug_when>
            <thetext>Ups. Sorry for the lack of info. I use the standard stable gcc version
(gcc (GCC) 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r4, propolice)) for a 
moment. And the result of emerge info is here:

Portage 2.0.50-r6 (default-ppc-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.24-ppc-dev-r2)
=================================================================
System uname: 2.4.24-ppc-dev-r2 ppc 0
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS=&quot;ppc&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec&quot;
CHOST=&quot;powerpc-unknown-linux-gnu&quot;
COMPILER=&quot;gcc3&quot;
CONFIG_PROTECT=&quot;/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;ccache&quot;
GENTOO_MIRRORS=&quot;http://src.gentoo.pl/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp.easynet.nl/mirror/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://gentoo.inode.at/ http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync2.pl.gentoo.org/gentoo-portage&quot;
USE=&quot;X aalib alsa altivec arts berkdb cdr cups dvd dvdr encode esd fbcon foomaticdb gdbm gif gnome-libs gtk gtk2 imlib jpeg kde libwww matroska mitshm motif mozilla nls oggvorbis opengl oss pam perl png postgres ppc python qt readline sdk sdl slang ssl tcltk tcpd tetex truetype video_cards_radeon xv&quot;
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tcpdevil@linuxlover.org</who>
            <bug_when>2004-06-08 13:01:26 0000</bug_when>
            <thetext>Same results here.xmame-0.82.1 fails aswell.



Emerge info:

Portage 2.0.50-r8 (default-ppc-2004.1, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.5-gentoo-r1)
=================================================================
System uname: 2.6.5-gentoo-r1 ppc 7455, altivec supported
Gentoo Base System version 1.4.16
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5
ACCEPT_KEYWORDS=&quot;ppc ~ppc&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec&quot;
CHOST=&quot;powerpc-unknown-linux-gnu&quot;
COMPILER=&quot;gcc3&quot;
CONFIG_PROTECT=&quot;/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;ccache fixpackages&quot;
GENTOO_MIRRORS=&quot;http://ftp.caliu.info/pub/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://192.168.232.1/portage&quot;
USE=&quot;X aalib alsa altivec arts berkdb cdr crypt cscope cups dga dvd encode fbcon flash foomaticdb gd gdbm gif gphoto2 gpm gtk gtk2 imagemagick imap imlib innodb ipv6 java javascript joystick jpeg kde lame lcms libwww linguas_es mad maildir mitshm motif mpeg ncurses net nls oggvorbis opengl oss pam perl png ppc python qt qtmt radeon readline ruby samba sdl slang socks5 spell ssl tcpd tetex tiff truetype usb vim-with-x xml xml2 xv xvid zlib&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lu_zero@gentoo.org</who>
            <bug_when>2004-06-08 13:39:51 0000</bug_when>
            <thetext>possibilities:

gcc

binutils

glibc

xmame

If is gcc the problems should appear in other places
If is binutils it could be a lucky corner case but again it should appear in other places
same for the glibc...
Now I&apos;m downloading xmame to see if there is a problematic linker script or something like that...

You could try to rebuild sdl and glibc and see if that works again (make sure you have a static tar and backups for glibc just in case)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pvdabeel@gentoo.org</who>
            <bug_when>2004-06-13 09:21:17 0000</bug_when>
            <thetext>Note: There is no -fno-strict-aliasing in the CFLAGS.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tcpdevil@linuxlover.org</who>
            <bug_when>2004-06-17 09:14:16 0000</bug_when>
            <thetext>0.83.1 fails as well</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tercel@gentoo.org</who>
            <bug_when>2004-07-25 15:25:53 0000</bug_when>
            <thetext>fails on my system as well

Portage 2.0.50-r9 (default-ppc-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7-gentoo-r8)
=================================================================
System uname: 2.6.7-gentoo-r8 ppc 750FX
Gentoo Base System version 1.4.16
ccache version 2.2 [enabled]
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
CFLAGS=&quot;-O3  -mcpu=750 -fsigned-char -pipe -fforce-addr -fprefetch-loop-arrays -fomit-frame-pointer -fno-gcse -ftracer -fweb&quot;
CHOST=&quot;powerpc-unknown-linux-gnu&quot;
FEATURES=&quot;ccache&quot;
USE=&quot;X aalib aim alsa berkdb cdr crypt curl directfb dvd esd fbcon foomaticdb gdbm gif gnome-libs gpm gtk gtk2 icq imap imlib jikes jpeg libwww mitshm motif mozilla ncurses nls nptl offensive oggvorbis oscar oss pam pda perl png ppc python qt readline sdl slang slp spell ssl tcltk truetype trusted unicode usb xmms xv&quot;


if it matters, advancemame fails as well.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>groepaz@gmx.net</who>
            <bug_when>2004-08-11 20:46:58 0000</bug_when>
            <thetext>i confirm this bug, happens on my powerbook (running gentoo) and it also happens when crosscompiling advancemame on a suse box for debian-ppc. this pretty much is a gcc bug to me.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dustin@firein.net</who>
            <bug_when>2004-08-14 18:56:07 0000</bug_when>
            <thetext>Created an attachment (id=37449)
A patch to the xmame Makefile to fix linking on PPC
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dustin@firein.net</who>
            <bug_when>2004-08-14 18:59:32 0000</bug_when>
            <thetext>Created an attachment (id=37452)
A patch to the xmame-0.83.1 ebuild to utilize the xmame patch I just created
(Bug: 49261 Attachment: 37449)
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dustin@firein.net</who>
            <bug_when>2004-08-14 19:08:46 0000</bug_when>
            <thetext>As described by Christian Groessler in this post: http://www.mail-archive.com/xmame@toybox.twisted.org.uk/msg07077.html the problem seems to be that the xmame binary has grown to the point that its branch instructions require more than a 24 bit offset.  -mlongcall in CFLAGS and -Wl,--relax in the LDFLAGS were the original purposed solution however Eric Deveaud points out that the linker flags are sufficient.

I have attached two patches: 37449 and 37452 that do fix the problem on my TiBook.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2004-08-15 03:41:50 0000</bug_when>
            <thetext>Thank you for supplying the patch. It is in the CVS now and on the mirrors in a few hours.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>37449</attachid>
            <date>2004-08-14 18:56 0000</date>
            <desc>A patch to the xmame Makefile to fix linking on PPC</desc>
            <filename>0.83.1-ppc-ld-fix.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIE1ha2VmaWxlLm9yaWcJMjAwNC0wOC0xNCAxODozNTowMC42MzYxMDM1MjggLTA3MDAKKysr
IE1ha2VmaWxlCTIwMDQtMDgtMTQgMTg6MzU6MDguODM0ODU3MTI4IC0wNzAwCkBAIC0zNzIsNyAr
MzcyLDcgQEAKICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwogCiAjIE5vcm1hbCBsaW5raW5nLgotTEQJPSAk
KENDKSAtV2wsLXMKK0xECT0gJChDQykgLVdsLC1zIC1XbCwtLXJlbGF4CiAKICMgRm9yIHRoZSBJ
bnRlbCBDKysgQ29tcGlsZXIgLS0gZXhwZWN0IGxhcmdlIGxpbmsgdGltZSBkdWUgdG8gLWlwbyAK
ICMgb3B0aW1pemF0aW9uLgo=
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>37452</attachid>
            <date>2004-08-14 18:59 0000</date>
            <desc>A patch to the xmame-0.83.1 ebuild to utilize the xmame patch I just created (Bug: 49261 Attachment: 37449)</desc>
            <filename>xmame-0.83.1.ebuild-ppc.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3IvcG9ydGFnZS9nYW1lcy1lbXVsYXRpb24veG1hbWUveG1hbWUtMC44My4xLmVidWls
ZAkyMDA0LTA2LTI0IDE2OjA2OjMwLjAwMDAwMDAwMCAtMDcwMAorKysgeG1hbWUtMC44My4xLXIx
LmVidWlsZAkyMDA0LTA4LTE0IDE4OjE0OjIxLjk5NjQwNTM4NCAtMDcwMApAQCAtNzMsMTAgKzcz
LDE4IEBACiAJCQkJfHwgZGllICJzZWQgTWFrZWZpbGUgKGpveXN0aWNrKSBmYWlsZWQiCiAJCWZp
CiAJCTs7Ci0JcHBjfHNwYXJjfGhwcGEpCisJcHBjKQogCQlzZWQgLWkgXAogCQkJLWUgJy9eTVlf
Q1BVL3M6aTM4NjpyaXNjOicgTWFrZWZpbGUgXAotCQkJfHwgZGllICJzZWQgTWFrZWZpbGUgKHBw
Y3xzcGFyY3xocHBhKSBmYWlsZWQiCisJCQl8fCBkaWUgInNlZCBNYWtlZmlsZSAocHBjKSBmYWls
ZWQiCisJCXNlZCAtaSBcCisJCQktZSAnL15MRFx0PSAkKENDKSAtV2wsLXMvczokOiAtV2wsLS1y
ZWxheDonIE1ha2VmaWxlIFwKKwkJCXx8IGRpZSAic2VkIE1ha2VmaWxlIChwcGMpIGZhaWxlZCIK
KwkJOzsKKwlzcGFyY3xocHBhKQorCQlzZWQgLWkgXAorCQkJLWUgJy9eTVlfQ1BVL3M6aTM4Njpy
aXNjOicgTWFrZWZpbGUgXAorCQkJfHwgZGllICJzZWQgTWFrZWZpbGUgKHNwYXJjfGhwcGEpIGZh
aWxlZCIKIAkJOzsKIAlhbHBoYSkKIAkJc2VkIC1pIFwK
</data>        

          </attachment>
    </bug>

</bugzilla>