Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86481 - libsdl-1.2.8-r1 undefined references with gcc-2.95
Summary: libsdl-1.2.8-r1 undefined references with gcc-2.95
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-24 00:45 UTC by Matt Taylor
Modified: 2005-03-31 16:39 UTC (History)
0 users

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


Attachments
1.2.8-gcc2-asm.patch (1.2.8-gcc2-asm2.patch,14.66 KB, patch)
2005-03-24 00:46 UTC, Matt Taylor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Taylor 2005-03-24 00:45:55 UTC
trying to link agains libsdl gives this:

/usr/lib/libSDL.so: undefined reference to `_MMX_UbluRGB'
/usr/lib/libSDL.so: undefined reference to `_MMX_Vred5x5'
/usr/lib/libSDL.so: undefined reference to `_MMX_VgrnRGB'
/usr/lib/libSDL.so: undefined reference to `_MMX_grn565'
/usr/lib/libSDL.so: undefined reference to `_MMX_VredRGB'
/usr/lib/libSDL.so: undefined reference to `_MMX_Vgrn565'
/usr/lib/libSDL.so: undefined reference to `_MMX_FF00w'
/usr/lib/libSDL.so: undefined reference to `_MMX_Ugrn565'
/usr/lib/libSDL.so: undefined reference to `_MMX_Ycoeff'
/usr/lib/libSDL.so: undefined reference to `_MMX_UgrnRGB'
/usr/lib/libSDL.so: undefined reference to `_MMX_00FFw'
/usr/lib/libSDL.so: undefined reference to `_MMX_red565'
/usr/lib/libSDL.so: undefined reference to `_MMX_0080w'
/usr/lib/libSDL.so: undefined reference to `_MMX_Ublu5x5'

This is because of the patch from bug 75392.  Better patch that works for both gcc2 and gcc3 follows.
Comment 1 Matt Taylor 2005-03-24 00:46:55 UTC
Created attachment 54317 [details, diff]
1.2.8-gcc2-asm.patch

from http://www.devolution.com/pipermail/sdl-cvs/2005-February/000767.html
Comment 2 SpanKY gentoo-dev 2005-03-24 15:40:38 UTC
added to portage, thanks :)
Comment 3 Matt Taylor 2005-03-25 00:32:54 UTC
the logic to apply the old 1.2.8-gcc2-asm.patch only on gcc2 in the ebuild should be removed as its no longer needed and it is broken if they are both applied.

 * Applying libsdl-1.2.8-gcc2.patch.bz2 ...                               [ ok ]
 * Applying 1.2.8-keyrepeat.patch ...                                     [ ok ]
 * Applying 1.2.8-linux26.patch ...                                       [ ok ]
 * Applying 1.2.8-amd64-endian.patch ...                                  [ ok ]
 * Applying 1.2.8-gcc2-asm.patch ...

 * Failed Patch: 1.2.8-gcc2-asm.patch !
 *  ( /mnt/portage/portage/media-libs/libsdl/files/1.2.8-gcc2-asm.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /mnt/portage/tmp/portage/libsdl-1.2.8-r1/temp/1.2.8-gcc2-asm.patch-31520.out


!!! ERROR: media-libs/libsdl-1.2.8-r1 failed.
!!! Function epatch, Line 402, Exitcode 0
!!! Failed Patch: 1.2.8-gcc2-asm.patch!
Comment 4 SpanKY gentoo-dev 2005-03-25 05:38:51 UTC
whoops, i didnt notice because i have gcc-2 :)

fixed in cvs, sorry about that
Comment 5 Jon 2005-03-31 08:16:43 UTC
This patch causes the compile of libsdl-1.2.8-r1 to fail when compiling with GCC 3.4.3. See this bug report:
http://bugs.gentoo.org/show_bug.cgi?id=87077

There is a fix that involves disabling a compile flag, but that is a hack for a bad patch. This patch is flawed and needs fixing. I suggest disabling it for gcc versions greater than 3.4.
Comment 6 Matt Taylor 2005-03-31 16:39:18 UTC
Remove the volatiles added in the top section of the patch and it compiles with -fforce-addr on gcc-3.4.3 (bug 87077) and still works with gcc2.

This patch is from upstream, and I don't know if they had a reason for adding volatile or not, or if they support using -fforce-addr.