With gcc 4.1 on Alpha Linux, I get: gcc -o Xorg [...] os/libos.a(transport.o)(.text+0x3c3c): In function `_XSERVTransSocketINETCreateListener': : undefined reference to `local_in6addr_any' ../../lib/font/libXfont.a(transport.o)(.text+0x634c): In function `_FontTransSocketINETCreateListener': : undefined reference to `local_in6addr_any' collect2: ld returned 1 exit status make[3]: *** [Xorg] Error 1 Apparently, gcc thinks it can optimize out the "unused" static variable. This patch fixes it. Most likely it is not the real solution, I don't fully understand this symbol trickery. --- lib/xtrans/Xtranssock.c~ 2005-06-28 15:28:26.000000000 +0200 +++ lib/xtrans/Xtranssock.c 2005-06-28 20:59:33.000000000 +0200 @@ -282,7 +282,7 @@ * that don't have IPv6 support. */ #if defined(IPv6) && defined(AF_INET6) -static const struct in6_addr local_in6addr_any = IN6ADDR_ANY_INIT; +static const struct in6_addr local_in6addr_any __attribute__((used)) = IN6ADDR_ANY_INIT; #pragma weak in6addr_any = local_in6addr_any #ifndef __USLC__ #pragma weak getaddrinfo
except __attribute__ isn't a valid token for non-gcc. probably need to add that to Xfuncproto.h.
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Closing. Unable to reproduce. Last touched more than 3 years ago. Reopen if still a bug.
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.