[PATCH] XDM: Fix FTBFS with gold or recent gcc releases.

Alan Coopersmith alan.coopersmith at oracle.com
Sat Feb 19 10:47:26 PST 2011


On 02/19/11 10:28 AM, Mark Kettenis wrote:
>> Date: Sat, 19 Feb 2011 18:03:04 +0000
>> From: Fernando Lemos <fernandotcl at gmail.com>
>>
>> /usr/bin/ld: session.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
>> /usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO
>> /lib64/libdl.so.2 so try adding it to the linker command line
>> /lib64/libdl.so.2: could not read symbols: Invalid operation
>> collect2: ld returned 1 exit status
>> make[2]: *** [xdm] Error 1
>>
>> Adding AC_SEARCH_LIBS([dlopen], [dl]) solves it, not sure there isn't
>> a better way to do it?
> 
> Looks like AC_LIBTOOL_DLOPEN does the check for dlopen/-ldl, but
> doesn't automatically add it.  You'll need to add @LIBADD_DL@ and/or
> $(LIBADD_DL) in the appropriate places.  That's probably a better way
> to fix this issue.

Unfortunately, it looks like that worked with libtool 1.x but I don't
see it in libtool 2.2.10.   I'm not seeing any obvious way to get the
results of libtools check into a variable we can use.

(xdm does have bad library hygiene already, due to use of AC_SEARCH_LIBS
 for many things to set $LIBS globally instead of just for the binaries
 that actually need them, but that's an existing issue that this patch
 doesn't need to solve.)

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list