Bug 29958 - link error due to _X_HIDDEN in libXext-1.1.2
Summary: link error due to _X_HIDDEN in libXext-1.1.2
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xext (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-01 17:35 UTC by Ivan Jager
Modified: 2011-02-25 03:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
add _X_HIDDEN to the definition of xgeExtRegister (406 bytes, patch)
2010-09-01 17:35 UTC, Ivan Jager
no flags Details | Splinter Review

Description Ivan Jager 2010-09-01 17:35:20 UTC
Created attachment 38376 [details] [review]
add _X_HIDDEN to the definition of xgeExtRegister

Compiling libXext in gentoo-prefix, I was getting a link error for xgeExtRegister. The problem is that extutil.c declares it with _X_HIDDEN but Xge.c defines it without. I'm not entirely sure why, but that causes the following error when linking the dynamic library on amd64:

Xge.c:299: warning: no previous prototype for 'xgeExtRegister'
  CCLD   libXext.la
/afs/mrph.org/sys/gentoo/amd64_linux26/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/extutil.o: relocation R_X86_64_PC32 against symbol `xgeExtRegister' can not be used when making a shared object; recompile with -fPIC
/afs/mrph.org/sys/gentoo/amd64_linux26/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libXext.la] Error 1
make[2]: Leaving directory `/var/tmp/portage/x11-libs/libXext-1.1.2/work/libXext-1.1.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-libs/libXext-1.1.2/work/libXext-1.1.2'
make: *** [all] Error 2


I attached a 1-line patch which fixes the problem for me.
Comment 1 Alan Hourihane 2011-02-25 03:11:25 UTC
Oh, just noticed this in bugzilla after I've committed the same fix. Closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.