Red Hat Bugzilla – Full Text Bug Listing
|Summary:||Undefined reference to `_XGetRequest' since libX11-220.127.116.11|
|Product:||[Fedora] Fedora||Reporter:||Bruno Wolff III <bruno>|
|Component:||SDL||Assignee:||Petr Pisar <ppisar>|
|Status:||CLOSED RAWHIDE||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||rawhide||CC:||bruno, ppisar, sagnik1987, wtaymans|
|Fixed In Version:||SDL-1.2.14-16.fc17||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2012-01-17 09:19:40 EST||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Bruno Wolff III 2012-01-16 18:12:56 EST
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:
Comment 1 Bruno Wolff III 2012-01-17 00:49:14 EST
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.
Comment 2 Bruno Wolff III 2012-01-17 01:18:41 EST
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.
Comment 3 Petr Pisar 2012-01-17 04:26:15 EST
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.
Comment 4 Petr Pisar 2012-01-17 04:40:21 EST
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.
Comment 5 Petr Pisar 2012-01-17 05:11:19 EST
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?
Comment 6 Petr Pisar 2012-01-17 05:16:37 EST
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?
Comment 7 Petr Pisar 2012-01-17 05:44:21 EST
(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.
Comment 8 Petr Pisar 2012-01-17 07:11:42 EST
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.
Comment 9 Petr Pisar 2012-01-17 07:51:59 EST
My fault. Latest SDL-1.2.14-14.fc17 compiled against libX11-18.104.22.168 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.
Comment 10 Bruno Wolff III 2012-01-17 08:55:11 EST
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
Comment 11 Petr Pisar 2012-01-17 09:00:26 EST
Created attachment 555785 [details] Proposed fix Simple test case: ldd -r -d /usr/lib64/libSDL.so
Comment 12 Petr Pisar 2012-01-17 09:19:40 EST
I believe I fixed it in SDL-1.2.14-15.fc17.
Comment 13 Bruno Wolff III 2012-01-17 11:48:26 EST
sear and lordsawar both built successfully once SDL-1.2.14-15.fc17 was in the build root. Thanks for fixing this so quickly.
Comment 14 Petr Pisar 2012-01-19 05:59:13 EST
Created attachment 556251 [details] Patch from upstream
Comment 15 Petr Pisar 2012-01-19 06:16:44 EST
Rebuilt with upstream patch as SDL-1.2.14-16.fc17.
Comment 16 sagnik 2015-09-14 17:45:05 EDT
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
Comment 17 Petr Pisar 2015-09-15 03:51:15 EDT
(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.
Comment 18 Wim Taymans 2015-11-26 10:31:16 EST
*** This bug has been marked as a duplicate of bug 1277636 ***
Comment 19 Petr Pisar 2015-11-26 11:49:20 EST
This bug report was about Fedora. Not Red Hat Enterprise Linux.