Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77300 - sdl apps are bombing on amd64 with asm errors (xchg / %)
Summary: sdl apps are bombing on amd64 with asm errors (xchg / %)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
: 76218 76395 77675 77785 95972 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-09 17:28 UTC by SpanKY
Modified: 2005-06-13 08:43 UTC (History)
12 users (show)

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


Attachments
SDL_endian-patch.h (SDL_endian-patch.h,4.53 KB, patch)
2005-01-09 18:28 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2005-01-09 17:28:38 UTC
core issue here seems to be with libsdl ... here's some example error messages:
{standard input}:32495: Error: suffix or operands invalid for `xchg'
{standard input}:32525: Error: suffix or operands invalid for `xchg'

{standard input}:2190: Error: bad register name `%'
{standard input}:2213: Error: suffix or operands invalid for `xchg'
{standard input}:2228: Error: suffix or operands invalid for `xchg'

all appear to be with byteswapping functions, usually in network related functions ... currently known to be broken:
sdl-net
sdl-perl
sdl-mixer
Comment 1 SpanKY gentoo-dev 2005-01-09 17:28:49 UTC
*** Bug 76218 has been marked as a duplicate of this bug. ***
Comment 2 SpanKY gentoo-dev 2005-01-09 17:32:59 UTC
err forgot to note, this is happening with 1.2.8 but not with 1.2.8
Comment 3 SpanKY gentoo-dev 2005-01-09 17:33:15 UTC
*** Bug 76395 has been marked as a duplicate of this bug. ***
Comment 4 SpanKY gentoo-dev 2005-01-09 17:33:19 UTC
*** Bug 77291 has been marked as a duplicate of this bug. ***
Comment 5 SpanKY gentoo-dev 2005-01-09 17:50:03 UTC
blah, i mean this is a problem when using libsdl-1.2.8, but not libsdl-1.2.7
Comment 6 SpanKY gentoo-dev 2005-01-09 18:18:28 UTC
for sanity's sake, i verified this happens with gcc-3.3.5-r1 as well as gcc-3.4.3-r1 ... i'll e-mail upstream
Comment 7 SpanKY gentoo-dev 2005-01-09 18:28:03 UTC
Created attachment 48076 [details, diff]
SDL_endian-patch.h

any package that uses the SDL_Swap* funcs seem to be bombing

this is the cvs diff between 1.2.7 and 1.2.8 ... if some gcc guru's could track
down why these chunks of inline asm code fail under high optimizations, that'd
be cool :P
Comment 8 SpanKY gentoo-dev 2005-01-11 07:07:49 UTC
*** Bug 77513 has been marked as a duplicate of this bug. ***
Comment 9 SpanKY gentoo-dev 2005-01-11 18:41:20 UTC
seems to be a binutils issue, and the following tested broken :/
x86_64-pc-linux-gnu-2.15.90.0.1.1
x86_64-pc-linux-gnu-2.15.92.0.2
x86_64-pc-linux-gnu-2.15.94.0.2
Comment 10 SpanKY gentoo-dev 2005-01-12 06:34:33 UTC
*** Bug 77675 has been marked as a duplicate of this bug. ***
Comment 11 Jose Ildefonso Camargo Tolosa 2005-01-12 15:36:43 UTC
I posted a bug on this (#77675), I got it working right by using -O0 compiler flag.  So, I guess this have something to do with the optimizer.
Comment 12 SpanKY gentoo-dev 2005-01-13 15:20:16 UTC
*** Bug 77785 has been marked as a duplicate of this bug. ***
Comment 13 SpanKY gentoo-dev 2005-01-13 15:37:16 UTC
ok, they just merged a fix upstream in libsdl to fix this ... i'll post libsdl-1.2.8-r1 shortly
Comment 14 SpanKY gentoo-dev 2005-01-13 16:59:11 UTC
try out 1.2.8-r1, that fixed it for me in a quick test of emerging sdl-mixer
Comment 15 Gerald Normandin (RETIRED) 2005-01-13 18:03:04 UTC
* Failed Patch: 1.2.8-direct-8bit-color.patch!
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/libsdl-1.2.8-r1/temp/1.2.8-direct-8bit-color.patch-2934.out


Contents: 
***** 1.2.8-direct-8bit-color.patch *****

=========================================

PATCH COMMAND:  patch -p0 -g0 < /usr/portage/media-libs/libsdl/files/1.2.8-direct-8bit-color.patch

=========================================
patching file src/video/SDL_pixels.c
Hunk #1 FAILED at 22.
1 out of 3 hunks FAILED -- saving rejects to file src/video/SDL_pixels.c.rej
=========================================

PATCH COMMAND:  patch -p1 -g0 < /usr/portage/media-libs/libsdl/files/1.2.8-direct-8bit-color.patch

=========================================
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: src/video/SDL_pixels.c
|===================================================================
|RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/SDL_pixels.c,v
|retrieving revision 1.12
|retrieving revision 1.13
|diff -u -r1.12 -r1.13
|--- src/video/SDL_pixels.c     30 Nov 2004 14:28:20 -0000      1.12
|+++ src/video/SDL_pixels.c     12 Jan 2005 19:38:24 -0000      1.13
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
=========================================

PATCH COMMAND:  patch -p2 -g0 < /usr/portage/media-libs/libsdl/files/1.2.8-direct-8bit-color.patch

=========================================
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: src/video/SDL_pixels.c
|===================================================================
|RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/SDL_pixels.c,v
|retrieving revision 1.12
|retrieving revision 1.13
|diff -u -r1.12 -r1.13
|--- src/video/SDL_pixels.c     30 Nov 2004 14:28:20 -0000      1.12
|+++ src/video/SDL_pixels.c     12 Jan 2005 19:38:24 -0000      1.13
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
=========================================

PATCH COMMAND:  patch -p3 -g0 < /usr/portage/media-libs/libsdl/files/1.2.8-direct-8bit-color.patch

=========================================
missing header for unified diff at line 9 of patch
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
--------------------------
|Index: src/video/SDL_pixels.c
|===================================================================
|RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/SDL_pixels.c,v
|retrieving revision 1.12
|retrieving revision 1.13
|diff -u -r1.12 -r1.13
|--- src/video/SDL_pixels.c     30 Nov 2004 14:28:20 -0000      1.12
|+++ src/video/SDL_pixels.c     12 Jan 2005 19:38:24 -0000      1.13
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
=========================================

PATCH COMMAND:  patch -p4 -g0 < /usr/portage/media-libs/libsdl/files/1.2.8-direct-8bit-color.patch

=========================================
missing header for unified diff at line 9 of patch
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: src/video/SDL_pixels.c
|===================================================================
|RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/SDL_pixels.c,v
|retrieving revision 1.12
|retrieving revision 1.13
|diff -u -r1.12 -r1.13
|--- src/video/SDL_pixels.c     30 Nov 2004 14:28:20 -0000      1.12
|+++ src/video/SDL_pixels.c     12 Jan 2005 19:38:24 -0000      1.13
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
Comment 16 Gerald Normandin (RETIRED) 2005-01-13 18:08:56 UTC
From IRC:
<SpanKY> [21:07] <CIA-4> vapier * gentoo-x86/media-libs/libsdl/files/ (1.2.8-amd64-endian.patch 1.2.8-direct-8bit-color.patch): remove cvs headers
<SpanKY> it's fixed you wanker
Comment 17 SpanKY gentoo-dev 2005-01-13 18:46:37 UTC
*** Bug 77922 has been marked as a duplicate of this bug. ***
Comment 18 SpanKY gentoo-dev 2005-06-13 08:43:00 UTC
*** Bug 95972 has been marked as a duplicate of this bug. ***