Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148186 - media-libs/libsdl-1.2.11: BlitRGBtoRGBPixelAlphaMMX3DNOW symbol not found
Summary: media-libs/libsdl-1.2.11: BlitRGBtoRGBPixelAlphaMMX3DNOW symbol not found
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
: 144828 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-19 05:54 UTC by Rabinath
Modified: 2010-01-06 05:30 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 Rabinath 2006-09-19 05:54:03 UTC
Since libSDL-1.2.11 all programs using SDL fail to compile complaining about an unresolved refetence to 'BlitRGBtoRGBPixelAlphaMMX3DNOW'. In file src/video/SDL_blit_A.c lines 2817 - 2829 there's an autodetection for my CPU's capabilities:
                {
                        if(SDL_Has3DNow())
                                return BlitRGBtoRGBPixelAlphaMMX3DNOW;
                        if(SDL_HasMMX())
                                return BlitRGBtoRGBPixelAlphaMMX;
                }
where 'if(SDL_Has3DNow())' seems to return true, which is clearly wrong: cat /proc/cpuinfo | grep ^flags returns 'fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni monitor vmx est tm2 xtpr'
Hacking the code to always return the non-3dnow function BlitRGBtoRGBPixelAlphaMMX solved my errors.
There's also some other guy having the same problem: http://forums.gentoo.org/viewtopic-p-3588281.html
Comment 1 SpanKY gentoo-dev 2006-09-19 13:33:18 UTC
*** Bug 144828 has been marked as a duplicate of this bug. ***
Comment 2 SpanKY gentoo-dev 2006-09-19 14:34:51 UTC
i'm pretty sure the bug here is that BlitRGBtoRGBPixelAlphaMMX3DNOW is declared as inline ... it has nothing to do with misdetection of CPU as the failure you're seeing is at *linktime* and that code is not executed until *runtime*

so try editing src/video/SDL_blit_A.c, go to the definition of BlitRGBtoRGBPixelAlphaMMX3DNOW(), and remove the 'inline' keyword
Comment 3 Rabinath 2006-09-19 22:56:08 UTC
Removing the inline keyword did the job, both sdl-image and quake2-icculus do emerge now without errors.
Comment 4 SpanKY gentoo-dev 2006-09-20 21:00:58 UTC
that doesnt really satisfy my curiosity as to why you are seeing this problem

that function is declared static so the symbol should not be exported thus linking against it shouldnt be a problem ...

can you post: `emerge -pv libsdl`
Comment 5 Rabinath 2006-09-21 03:39:22 UTC
[ebuild   R   ] media-libs/libsdl-1.2.11  USE="X aalib alsa esd fbcon libcaca opengl oss xinerama xv -arts -dga -directfb -ggi -nas -noaudio -noflagstrip -nojoystick -novideo -svga" 0 kB 

CFLAGS="-O2 -fomit-frame-pointer -march=prescott -pipe"
CXXFLAGS="-O2 -fomit-frame-pointer -march=prescott -pipe -fvisibility-inlines-hidden"

gcc (GCC) 4.1.1 (Gentoo 4.1.1-r1)

I reemerged it without changes to find out more about it.

# objdump -T libSDL-1.2.so.0.11.0 | fuzzygrep -l3 3DNOW
00011497 g    DF .text  000001ad  Base        SDL_iconv_string
00005fe3 g    DF .text  00000029  Base        SDL_ClearError
00000000      D  *UND*  00000000              BlitRGBtoRGBPixelAlphaMMX3DNOW
0001034c g    DF .text  0000003c  Base        SDL_ReadBE16
00000000      DF *UND*  000001ba  GLIBC_2.1   fclose
Comment 6 SpanKY gentoo-dev 2007-03-20 02:39:38 UTC
oh well, we'll just call it a day ... no time to investigate this further ;(