Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77513 - compiling media-libs/sdl-mixer-1.2.6 media-libs/sdl-ttf-2.0.7 media-libs/sdl-image-1.2.4
Summary: compiling media-libs/sdl-mixer-1.2.6 media-libs/sdl-ttf-2.0.7 media-libs/sdl-...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Games
Depends on:
Reported: 2005-01-11 05:47 UTC by Christian Aistleitner
Modified: 2005-05-19 09:07 UTC (History)
0 users

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

the addon "/etc/portage/bashrc" (bashrc,5.06 KB, application/octet-stream)
2005-01-11 05:55 UTC, Christian Aistleitner
the cflags to override -O3 "/etc/portage/package.cflags" (package.cflags,73 bytes, application/octet-stream)
2005-01-11 05:56 UTC, Christian Aistleitner

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Aistleitner 2005-01-11 05:47:10 UTC
With CFLAGS="-O3 -pipe -fomit-frame-pointer" none of the above mentioned packages cannot be built on amd64. E.g.: emerge media-libs/sdl-mixer gives

effect_position.c: In function `_Eff_position_u16msb':
effect_position.c:878: error: extended registers have no high halves
{standard input}: Assembler messages:
{standard input}:2110: Error: bad register name `%'
{standard input}:2133: Error: suffix or operands invalid for `xchg'
{standard input}:2154: Error: suffix or operands invalid for `xchg'
make[1]: *** [effect_position.lo] Fehler 1
make[1]: *** Warte auf noch nicht beendete Prozesse...
 x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_mixer\" -DVERSION=\"1.2.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -O3 -pipe -fomit-frame-pointer -I/usr/include/SDL -D_REENTRANT -DUSE_RWOPS -DCMD_MUSIC -DWAV_MUSIC -DLIBMIKMOD_MUSIC -pthread -D_REENTRANT -DMID_MUSIC -DUSE_TIMIDITY_MIDI -I./timidity -DOGG_MUSIC -DMP3_MUSIC -I/usr/include/smpeg -I/usr/include/SDL -D_REENTRANT -c effect_stereoreverse.c -o effect_stereoreverse.o >/dev/null 2>&1
make[1]: Leaving directory `/var/tmp/portage/sdl-mixer-1.2.6/work/SDL_mixer-1.2.6'
make: *** [all-recursive] Fehler 1

The other two ebuilds also complain about 
Error: bad register name `%'
Comment 1 Christian Aistleitner 2005-01-11 05:54:46 UTC
Dropping -O3 from the CFLAGS solves the problem.

The problem is to set the CFLAGS right. Since I want all the other ebuilds to be built with -O3, I used an addon to portage that allows to append flags to the CFLAGS defined in /etc/make.conf (or the cmdline). This addon can be found under
(But be sure to replace the " <at> " with the at sign. Furthermore I had to alter line 136 from
if [[ ${target%%#*} && ${target%% *} =~ "^(${CATEGORY}|${CATEGORY}/${PN})\>" ]]; then
if [[  ${target%% *}   =~ "^(${CATEGORY}|${CATEGORY}/${PN})\>" ]]; then

I attached my version of this addon and my settings of the per package added cflags.
Comment 2 Christian Aistleitner 2005-01-11 05:55:40 UTC
Created attachment 48197 [details]
the addon "/etc/portage/bashrc"
Comment 3 Christian Aistleitner 2005-01-11 05:56:42 UTC
Created attachment 48198 [details]
the cflags to override -O3 "/etc/portage/package.cflags"
Comment 4 SpanKY gentoo-dev 2005-01-11 07:07:49 UTC

*** This bug has been marked as a duplicate of 77300 ***
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2005-05-19 09:07:00 UTC
Closing to clean up after bugzilla upgrade.  reopen if closed in error.  Thanks.