Bug 1203

Summary: multiple definitions of XdmcpWrap
Product: xorg Reporter: Alexander Gottwald <ago>
Component: Lib/XlibAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: high CC: eich, kem
Version: git   
Hardware: x86 (IA32)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 351    
Attachments:
Description Flags
remove Wrap.c, Wrap.h and WrapHelp.c from libX11
none
do not export XdmcpWrap
none
do not export Xdmcp functions in libX11 none

Description Alexander Gottwald 2004-08-27 07:10:25 UTC
in make Xnest and XWin (both include libX11 and libXdmcp)

../../exports/lib/libXdmcp.a(Wrap.o)(.text+0x0): In function `XdmcpWrap':
/mnt/d/ago/xorg-head/xc/.build/lib/Xdmcp/Wrap.c:56: multiple definition of
`_XdmcpWrap'
../../exports/lib/libX11.a(d000548.o)(.text+0x0): first defined here
collect2: ld returned 1 exit status

I don't know how to solve this without removing Wrap.c from libX11 and linking
it to libXdmcp
Comment 1 Egbert Eich 2004-08-27 09:34:02 UTC
Alexander, this may be Cygwin specific as noone else seems to see it.
Could you please look into this?
Comment 2 Alexander Gottwald 2004-08-29 08:16:45 UTC
Created attachment 762 [details] [review]
remove Wrap.c, Wrap.h and WrapHelp.c from libX11

removes Wrap.c, Wrap.h and WrapHelp.c from libX11. It links to libXdmcp
instead.
The change has effect on cygwin only but should work for other platforms too.
Comment 3 Kevin E. Martin 2004-08-29 12:20:06 UTC
The Wrap*.[ch] code is self contained, so I would rather it remain in both X11
and Xdmcp instead of creating another external dependency.

It seems that cygwin cannot deal with multiple references gracefully, so I don't
see a problem with making cygwin a special case as Alexander proposed in his fix.

Egbert, what do you think?
Comment 4 Keith Packard 2004-08-29 21:31:00 UTC
I'd rather not have libX11 depend on libXdmcp -- that causes binary
compatibility problems on any system which doesn't have dependency information
in shared libraries (vis the Xaw/Xp issues).

A simple solution would have libX11 #define the names around so that it didn't
conflict with libXdmcp.
Comment 5 Alexander Gottwald 2004-08-30 00:55:31 UTC
Should libX11 export XdmcpWrap? 

A simple solution is --exclude-symbols=XdmcpWrap for cygwin 

Comment 6 Alexander Gottwald 2004-08-30 00:57:51 UTC
Created attachment 776 [details] [review]
do not export XdmcpWrap
Comment 7 Alexander Gottwald 2004-08-30 01:11:24 UTC
Created attachment 777 [details] [review]
do not export Xdmcp functions in libX11

excludes XdmcpWrap and _XdmcpWrapperToOddParity from automatic export
Comment 8 Kevin E. Martin 2004-08-30 17:56:09 UTC
I think this is a good solution for cygwin.
If no one has any objections, I will go ahead and check it in tomorrow.
Comment 9 Kevin E. Martin 2004-08-31 18:04:40 UTC
No objections, so I checked in the patch.
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.