Description of problem: The mass rebuild version of SDL no longer works properly. When linking it I see an error of: /usr/lib/gcc/i686-redhat-linux/4.7.0/../../../libSDL.so: undefined reference to `_XGetRequest' I get this when trying to rebuild sear and lordsawar. I have a scratch build of sear that dumps config.log and the buildlog for this is at: http://koji.fedoraproject.org/koji/getfile?taskID=3707311&name=build.log After seeing this I tried to reproduce it at home and did. SDL-1.2.14-13.fc17 worked, but SDL-1.2.14-14.fc17 did not. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
It looks like the SDL-1.2.10-GrabNotViewable.patch patch got added in git recently but wasn't included in any official build before the mass rebuild build.
I tried commenting out that patch and it didn't prevent the problem. So something outside of SDL probably changed since last August in a way that causes a problem for SDL.
The SDL-1.2.10-GrabNotViewable.patch has been added in SDL-1.2.14-13.fc17 which is before F17 mass rebuild. Actually it was added and built in all Fedoras. My quick tip is the configure test uses an X11 symbol but does not link to X11 library explicitly. SDL pkg-config does not do this because SDL is aimed to shield application from X11. I think linker has changed in between to cut off unneeded run-time linking dependencies. I will investigate it more deeply soon.
BTW, you depends on SDL-devel nowhere despite the configure test links to libSDL.so. You should not rely in pulling SDL-devel indirectly through SDL_mixer-devel or similar.
This does not exhibit on x86_64. Actually I got similar report for pcre on i686 F14. I scanned sources of SDL and of sear and I could not find the symbol anywhere. I have no i686 virtual machine. What does say "nm -D /usr/lib/libSDL.so | grep _XGetRequest" on your machine?
Created attachment 555718 [details] test from configure configure compiles it as: $ gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wl,-z,relro conftest.c -lSDL -lpthread Could you try it? Can you reproduce the bug with this isolated test?
(In reply to comment #5) > I scanned sources of SDL and of sear and I could not find the symbol anywhere. > I have no i686 virtual machine. What does say "nm -D /usr/lib/libSDL.so | grep > _XGetRequest" on your machine? It's there as undefined dynamic symbol. It's because of libX11-devel.i686 declares: /usr/include/X11/Xlibint.h:434:extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len); The symbol exists only in i686 libX11. And is defined in i686 /usr/lib/libX11.so.
So the problem is X11 adds new symbol. SDL does not link to X11. SDL dlopens() it. Because X11 declares the symbols as extern in header file, the X11 symbols must be resolved at run-time linker. SDL redefines all X11 symbols to hide them from global symbol table and to make linker happy without X11 library. Solution is to add _XGetRequest into SDL:src/video/x11/SDL_x11sym.h. But before that I'd like to hear from X11 guys why the symbol (_XGetRequest) exists on i686 only.
My fault. Latest SDL-1.2.14-14.fc17 compiled against libX11-1.4.99.1 declares and defines the symbol on i686 as well as on x86_64. My rawhide does not include SDL-1.2.14-14.fc17 because mirrors are to slow.
gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wl,-z,relro conftest.c -lSDL -lpthread /usr/lib/gcc/i686-redhat-linux/4.7.0/../../../libSDL.so: undefined reference to `_XGetRequest' collect2: error: ld returned 1 exit status
Created attachment 555785 [details] Proposed fix Simple test case: ldd -r -d /usr/lib64/libSDL.so
I believe I fixed it in SDL-1.2.14-15.fc17.
sear and lordsawar both built successfully once SDL-1.2.14-15.fc17 was in the build root. Thanks for fixing this so quickly.
Created attachment 556251 [details] Patch from upstream
Rebuilt with upstream patch as SDL-1.2.14-16.fc17.
Guys, I have this same error on my RHEL 6 machine, Here's my lsb_release -a: LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 6.5 (Santiago) Release: 6.5 Codename: Santiago I installed SDL and SDL-devel from yum, then install pygame. from pygame.base import * produced this: ImportError: /usr/lib64/libSDL-1.2.so.0: undefined symbol: _XGetRequest
(In reply to sagnik from comment #16) > Guys, I have this same error on my RHEL 6 machine, Here's my lsb_release -a: > > LSB Version: > :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0- > amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch > Distributor ID: RedHatEnterpriseServer > Description: Red Hat Enterprise Linux Server release 6.5 (Santiago) > Release: 6.5 > Codename: Santiago > > I installed SDL and SDL-devel from yum, then install pygame. from > pygame.base import * produced this: > > ImportError: /usr/lib64/libSDL-1.2.so.0: undefined symbol: _XGetRequest Then contact Red Hat support to escalate your request properly. RHEL is not Fedora.
*** This bug has been marked as a duplicate of bug 1277636 ***
This bug report was about Fedora. Not Red Hat Enterprise Linux.