[Xcb] [PATCH xcb] Added more error states and removed global error_connection
Uli Schlachter
psychon at znc.in
Sat Oct 29 00:24:05 PDT 2011
On 29.10.2011 05:42, Arvind Umrao wrote:
> On 10/28/11 23:01, Uli Schlachter wrote:
>> For https://bugs.freedesktop.org/show_bug.cgi?id=42304:
>> Do you know what causes that bug? Why does gcc complain about a static global
>> variable, but a static local one works fine?
>
> I am getting following error without my code changes when I compile code
> with gcc 4.3.3 on Solaris. Even if we forget about compilation error,
> then also we have to remove "error_connection =1". There are
> possibilities of other error states, as I have mentioned above.
>
> gcc -shared -Wl,-h -Wl,libxcb.so.1 -o .libs/libxcb.so.1.1.0
> .libs/xcb_conn.o .libs/xcb_out.o .libs/xcb_in.o .libs/xcb_ext.o
> .libs/xcb_xid.o .libs/xcb_list.o .libs/xcb_util.o .libs/xcb_auth.o
> .libs/xproto.o .libs/bigreq.o .libs/xc_misc.o
> -R/export/work/git/xorg/build/lib -R/export/work/git/xorg/build/lib
> -L/export/work/git/xorg/build/lib
> /export/work/git/xorg/build/lib/libXau.so
> /export/work/git/xorg/build/lib/libXdmcp.so -lsocket -lc
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/xcb_conn.o: symbol
> error_connection: a GOT relative relocation must reference a local symbol
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/xcb_conn.o: symbol
> error_connection: a GOT relative relocation must reference a local symbol
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/xcb_conn.o: symbol
> error_connection: a GOT relative relocation must reference a local symbol
> collect2: ld returned 1 exit status
> *** Error code 1
> make: Fatal error: Command failed for target `libxcb.la'
> Current working directory /export/work/git/xorg/src/xcb/libxcb/src
Google finds lots of references for this problem on solaris with hidden symbol
visibility, e.g.:
https://github.com/trentm/libgit2/commit/34a29926651160568e95c864514b7fc7ccf0546c
GCC's bug tracker says that this was fixed in 4.3, but you are using 4.3.3. Weird.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32462
I have no idea why it would help, but could you test the following patch?
Uli
diff --git a/src/xcbint.h b/src/xcbint.h
index 096576c..738fc64 100644
--- a/src/xcbint.h
+++ b/src/xcbint.h
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#undef GCC_HAS_VISIBILITY
#ifdef GCC_HAS_VISIBILITY
#pragma GCC visibility push(hidden)
#endif
--
- He made himself, me nothing, you nothing out of the dust
- Er machte sich mir nichts, dir nichts aus dem Staub
More information about the Xcb
mailing list