Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74020 - dosbox-0.63 doesn't compile with gcc-3.4
Summary: dosbox-0.63 doesn't compile with gcc-3.4
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-10 09:41 UTC by José Mata Fernandes
Modified: 2005-03-13 22:19 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description José Mata Fernandes 2004-12-10 09:41:47 UTC
When I emerge dosbox or dosbox-cvs, it fails with errors. Don't think it is related to outside libs.

This may have something to do with bug 44860.

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

Actual Results:  
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../..  -I../../include
-I/usr/include/SDL -D_REENTRANT  -pipe -c -o core_dyn_x86.o core_dyn_x86.cpp
In file included from core_dyn_x86.cpp:147:
core_dyn_x86/risc_x86.h: In function `BlockReturn gen_runcode(Bit8u*)':
core_dyn_x86/risc_x86.h:128: error: PIC register `%ebx' clobbered in `asm'
make[4]: *** [core_dyn_x86.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/dosbox-0.63/work/dosbox-0.63/src/cpu'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/dosbox-0.63/work/dosbox-0.63/src/cpu'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dosbox-0.63/work/dosbox-0.63/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dosbox-0.63/work/dosbox-0.63'
make: *** [all] Error 2

!!! ERROR: games-emulation/dosbox-0.63 failed.
!!! Function src_compile, Line 40, Exitcode 2
!!! emake failed


Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.9-gentoo-r6 i686)
=================================================================
System uname: 2.6.9-gentoo-r6 i686 Intel(R) Pentium(R) 4 Mobile CPU 1.60GHz
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Nov 11 2004, 21:29:07)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://mirrors1.netvisao.pt/gentoo/
ftp://ftp.rnl.ist.utl.pt/pub/gentoo/ http://darkstar.ist.utl.pt/pub/gentoo/"
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 acpi alsa apache2 avi berkdb cjk crypt cups divx4linux dvd encode esd fam
flac fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal java jpeg junit libg++
lzo mad mmx mmx2 mpeg mppe-mppc msn ncurses network nls nojoystick nvidia
oggvorbis opengl pam pcmcia pdflib php png posix postgres quicktime readline
real rtc sdl slang sockets speex sse svga tcpd theora tiff truetype unicode v4l
v4l2 x86 xanim xprint xv xvid xvmc zlib"
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2004-12-10 11:20:25 UTC
a few things to try:

remerge gcc and glibc and try it again
try it with CFLAGS="-pipe" CXXFLAGS="-pipe"
try it with gcc-3.3
Comment 2 José Mata Fernandes 2004-12-10 14:32:09 UTC
Yep, it builds and merge with gcc-3.3.4.

Is it possible to ensure some dependency on a particular compiler version, in the ebuild? I tried to build dosbox in two different PC, but with similar (gcc, libc, etc) configuration, and it fails...
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2004-12-10 15:48:13 UTC
can you try with gcc-3.4.1-r3.ebuild and gcc-3.4.2-r2.ebuild please?
Comment 4 Travis Tilley (RETIRED) gentoo-dev 2004-12-10 16:32:44 UTC
makes perfect sense, ebx is used for PIC on x86, so that code was not at all PIC-friendly and did not want to be PIC. a bug in the pic/pie patches was making it PIC when it shouldnt have been.

this issue -should- be resolved in gcc 3.4.3-r1... please test this to make sure. i'm not on x86 so i dont regularly bump into the same issues, x86_64 has different freakishness where PIC code is concerned. ;)
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2004-12-11 22:52:09 UTC
go ahead and reopen after trying that out please.
Comment 6 José Mata Fernandes 2004-12-12 06:32:27 UTC
Ok, altought "emerge info" shows for gcc "gcc-3.4.3", im using gcc-3.4.3-r1 (at least is what emerge -pv gcc shows), so i can surelly say that this doesnt build with gcc-3.4.3-r1 (somehow, gcc-config doesnt let me choose explicitly gcc-3.4.3-r1, i dont know if it is ok or some sort of bug)

I will emerge gcc-3.4.1-r3 and gcc-3.4.2-r2 so that i can try it out.
Comment 7 José Mata Fernandes 2004-12-12 09:51:06 UTC
Didn't build either with gcc-3.4.1-r3 or gcc-3.4.2-r2.
Comment 8 Sebastian Bergmann (RETIRED) gentoo-dev 2005-03-13 22:06:41 UTC
Builds fine for me with gcc-3.4.3-r1.
Comment 9 Disenchanted (RETIRED) gentoo-dev 2005-03-13 22:09:34 UTC
builds fine with gcc-3.4.3-r1 here
Comment 10 Jory A. Pratt 2005-03-13 22:15:39 UTC
Jos
Comment 11 Jory A. Pratt 2005-03-13 22:15:39 UTC
José Mata Fernandes fix your system I have compiled it with gcc-3.4.3-r3 and also tested it on another machine using gcc-4.0 all build successfully.
Comment 12 Mr. Bones. (RETIRED) gentoo-dev 2005-03-13 22:19:44 UTC
Several Gentoo developers have confirmed that it builds fine on their systems with all the versions of gcc that you've mentioned.

There's no telling what's happened to your system from the information you've posted.  It seems like you might have some hardened packages or possibly some packages from breakmygentoo but I can't tell for sure.  Since you're running with ~x86 in keywords there's no telling what the state of your packages are.  I suggest doing revdep-rebuild and see if anything turns up.  Also, if you still can't get dosbox to build, it would be worth doing an emerge -ev world and trying then.

Also, I note that you have nojoystick in your use flags which means you're taking responsibility for all bugs libsdl-related yourself per the warning in the ebuild.

Closing WORKSFORME since no one on this end can reproduce and the problem seems to be local in nature.