Bug 1249970 - undefined reference to _XGetRequest
undefined reference to _XGetRequest
Status: CLOSED DUPLICATE of bug 1277636
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: SDL (Show other bugs)
6.7
All Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Wim Taymans
Desktop QE
: Regression
Depends On:
Blocks: 1272325 1249935
  Show dependency treegraph
 
Reported: 2015-08-04 05:23 EDT by Dan Horák
Modified: 2015-11-17 11:15 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-17 11:14:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Horák 2015-08-04 05:23:32 EDT
Description of problem:
When rebuilding a package that depends on SDL in EPEL (means it builds against RHEL 6.7, not CentOS or other clone), I'm getting "undefined reference to `_XGetRequest'" error. Seems bug 1205603 wasn't properly fixed.

from build.log (http://koji.fedoraproject.org/koji/taskinfo?taskID=10598569)
...
Making check in test
make[1]: Entering directory `/builddir/build/BUILD/libdmtx-0.7.2/test'
Making check in multi_test
make[2]: Entering directory `/builddir/build/BUILD/libdmtx-0.7.2/test/multi_test'
make  multi_test
make[3]: Entering directory `/builddir/build/BUILD/libdmtx-0.7.2/test/multi_test'
gcc -DHAVE_CONFIG_H -I. -I../..  -Wshadow -Wall -pedantic -ansi   -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -MT multi_test.o -MD -MP -MF .deps/multi_test.Tpo -c -o multi_test.o multi_test.c
mv -f .deps/multi_test.Tpo .deps/multi_test.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -Wshadow -Wall -pedantic -ansi   -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -MT dmtx.o -MD -MP -MF .deps/dmtx.Tpo -c -o dmtx.o dmtx.c
In file included from ../../dmtx.c:77,
                 from dmtx.c:9:
../../dmtxdecode.c: In function 'dmtxDecodeCreateDiagnostic':
../../dmtxdecode.c:481: warning: implicit declaration of function 'snprintf'
dmtx.c: At top level:
../../dmtxfec.c:160: warning: 'encode_rs_char' defined but not used
mv -f .deps/dmtx.Tpo .deps/dmtx.Po
/bin/sh ../../libtool --tag=CC   --mode=link gcc  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -lm -lSDL -lSDL_image -lpthread  -o multi_test multi_test.o dmtx.o  -lm 
libtool: link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o multi_test multi_test.o dmtx.o  -lSDL -lSDL_image -lpthread -lm
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libSDL.so: undefined reference to `_XGetRequest'
collect2: ld returned 1 exit status
make[3]: *** [multi_test] Error 1
make[3]: Leaving directory `/builddir/build/BUILD/libdmtx-0.7.2/test/multi_test'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/builddir/build/BUILD/libdmtx-0.7.2/test/multi_test'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/libdmtx-0.7.2/test'
make: *** [check-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.ecVt0X (%check)

running readelf on the library returns
[dan@eagle tmp]$ readelf -s libSDL-1.2.so.0.11.3 | grep XGetRequest                                                                                                   
    93: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _XGetRequest


Version-Release number of selected component (if applicable):
SDL.x86_64 0:1.2.14-6.el6
libX11.x86_64 0:1.6.0-6.el6

for full buildroot please see https://kojipkgs.fedoraproject.org//work/tasks/8569/10598569/root.log


How reproducible:
100%

Steps to Reproduce:
1. fedpkg co libdmtx
2. git checkout el6
3. fedpkg build
Comment 2 Tuomo Soini 2015-08-05 06:08:36 EDT
Correct fix for SDL is in bug #782251
Comment 3 Dan Astoorian 2015-09-04 10:35:53 EDT
This problem also affects applications which have already been built if they are linked against libSDL but not libX11; e.g., running "gegl" reports:

** Message: Module '/usr/lib64/gegl-0.1/display.so' load error: /usr/lib64/libSDL-1.2.so.0: undefined symbol: _XGetRequest

** (gegl:4594): WARNING **: Failed to set operation type gegl:display, using a passthrough op instead

and fails to display.

The problem appeared between SDL-1.2.14-3 and SDL-1.2.14-5, and was not fixed in SDL-1.2.14-6; downgrading to SDL-1.2.14-3 fixes the symptoms.

In case this is helpful for some customers, setting 
    LD_PRELOAD=/usr/lib64/libX11.so
in the environment (for 64-bit executables) appears to work around the problem for at least some applications.
Comment 4 Wim Taymans 2015-11-17 11:14:14 EST

*** This bug has been marked as a duplicate of bug 1277636 ***
Comment 5 Wim Taymans 2015-11-17 11:15:19 EST
A fix for this is now been released in in 6.7 Z-stream and will automatically be pulled into 6.8.

Note You need to log in before you can comment on or make changes to this bug.