Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 49261 - xmame 0.81.1 won't compile (link) on PPC
Summary: xmame 0.81.1 won't compile (link) on PPC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: PPC All
: High normal (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-28 01:23 UTC by Maciej J. Woloszyk
Modified: 2004-08-15 03:41 UTC (History)
3 users (show)

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


Attachments
A patch to the xmame Makefile to fix linking on PPC (0.83.1-ppc-ld-fix.patch,359 bytes, patch)
2004-08-14 18:56 UTC, Dustin Byford
Details | Diff
A patch to the xmame-0.83.1 ebuild to utilize the xmame patch I just created (Bug: 49261 Attachment: 37449) (xmame-0.83.1.ebuild-ppc.patch,660 bytes, patch)
2004-08-14 18:59 UTC, Dustin Byford
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej J. Woloszyk 2004-04-28 01:23:43 UTC
I'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'
make[1]: Leaving directory `/var/tmp/portage/xmame-0.81.1/work/xmame-0.81.1/src/unix'
Linking xmame.x11 ...
/usr/lib/gcc-lib/powerpc-unknown-linux-gnu/3.2.3/../../../crt1.o(.text+0x20): In function `_start':
: 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':
/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':
: relocation truncated to fit: R_PPC_REL24 strlen@@GLIBC_2.0
xmame.obj/mame.o(.text+0x124): In function `run_game':
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x15c): In function `run_game':
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x190): In function `run_game':
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x408): In function `run_machine':
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x45c): In function `run_machine':
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x4a4): In function `run_machine':
: relocation truncated to fit: R_PPC_REL24 puts@@GLIBC_2.0
xmame.obj/mame.o(.text+0x4d4): In function `run_machine':
: relocation truncated to fit: R_PPC_REL24 rand@@GLIBC_2.0
xmame.obj/mame.o(.text+0x4fc): In function `run_machine':
: 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'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't have the idea what to do about it.

M.
Comment 1 SpanKY gentoo-dev 2004-04-28 01:27:31 UTC
seems like a gcc bug to me

i dont know what version of gcc you're using though since you neglected to provide `emerge info`
Comment 2 Maciej J. Woloszyk 2004-04-28 01:36:17 UTC
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="ppc"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec"
CHOST="powerpc-unknown-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/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"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache"
GENTOO_MIRRORS="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/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync2.pl.gentoo.org/gentoo-portage"
USE="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"
Comment 3 Alberto Garcia Hierro (Skyhusker) 2004-06-08 13:01:26 UTC
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="ppc ~ppc"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec"
CHOST="powerpc-unknown-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/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"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache fixpackages"
GENTOO_MIRRORS="http://ftp.caliu.info/pub/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://192.168.232.1/portage"
USE="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"
Comment 4 Luca Barbato gentoo-dev 2004-06-08 13:39:51 UTC
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'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)
Comment 5 Pieter Van den Abeele (RETIRED) gentoo-dev 2004-06-13 09:21:17 UTC
Note: There is no -fno-strict-aliasing in the CFLAGS.
Comment 6 Alberto Garcia Hierro (Skyhusker) 2004-06-17 09:14:16 UTC
0.83.1 fails as well
Comment 7 Colin Kingsley (RETIRED) gentoo-dev 2004-07-25 15:25:53 UTC
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="-O3  -mcpu=750 -fsigned-char -pipe -fforce-addr -fprefetch-loop-arrays -fomit-frame-pointer -fno-gcse -ftracer -fweb"
CHOST="powerpc-unknown-linux-gnu"
FEATURES="ccache"
USE="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"


if it matters, advancemame fails as well.
Comment 8 groepaz 2004-08-11 20:46:58 UTC
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.
Comment 9 Dustin Byford 2004-08-14 18:56:07 UTC
Created attachment 37449 [details, diff]
A patch to the xmame Makefile to fix linking on PPC
Comment 10 Dustin Byford 2004-08-14 18:59:32 UTC
Created attachment 37452 [details, diff]
A patch to the xmame-0.83.1 ebuild to utilize the xmame patch I just created (Bug: 49261 Attachment: 37449)
Comment 11 Dustin Byford 2004-08-14 19:08:46 UTC
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.
Comment 12 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2004-08-15 03:41:50 UTC
Thank you for supplying the patch. It is in the CVS now and on the mirrors in a few hours.