pkg-config files list protos when not required

Peter Hutterer peter.hutterer at who-t.net
Sun Jan 10 14:55:41 PST 2010


On Sat, Jan 09, 2010 at 02:00:12PM -0800, Jeremy Huddleston wrote:
> I thought the entire point of the cleanup that Peter did before the
> Katamari release was to divorce user apps from their reliance on the
> *proto packages... IE install everything needed to build the applications
> in the library package rather than the proto package.  The proto packages
> should just contain what the libraries require to communicate with the
> server.

This isn't quite correct. The proto headers contain two types of headers.
One type is the protocol specific encodings, e.g.  XIproto.h or randrproto.h
These ones are not to be used by the clients.

The other type are the headers defining a set of constants, usually named
after the extension. e.g. XI.h or randr.h. The constants in this header file
include the extension name as well as constants defined in the protocol
specification. An example for these are the Relative and Absolute defines
for the valuator mode.

These defines are needed for the library but also for clients. You _could_
move those into the libraries, but as Dan said you'd have to duplicate.
Also, there's the theoretical case of a protocol encoder that needs the X
proto headers but not the libraries. Not sure if that exists (since xcb
essentially duplicates the headers).

The cleanup had two reasons, one was to remove the ifdefs in the headers so
that the server headers are split from the library headers. The other part
was to remove the library headers from the protocol packages. The previous
state required a new release of the protocol packages each time the library
gained a new symbol even if the protocol itself stayed the same.

Cheers,
  Peter

> So for example it looks like xrender.pc says anyone building against
> libXrender needs to have xrender-proto installed, but I thought that you
> should just need xrender-proto installed to build libXrender.
> 
> The problem I'm trying to "solve" is dependency types within MacPorts.  If
> xrender-proto needs to be on the system when an application is building
> against libXrender, then it needs to be in a different category than if
> xrender-proto can be pruned after installing libXrender.
> 
> 
> On Jan 9, 2010, at 13:48, Julien Cristau wrote:
> 
> > On Sat, Jan  9, 2010 at 13:42:25 -0800, Jeremy Huddleston wrote:
> > 
> >> Why do the pkg-config files still report that the protos are
> >> dependencies of the Xlib libraries?  Shouldn't that have been removed
> >> with the big proto/Xlib cleanup prior to the last Katamari?  Was this
> >> just overlooked or intentional?  I don't see any reason why a userland
> >> application building against libX11 should require xproto.
> >> 
> > I can't see how you could ever build an xlib app without having xproto
> > installed.  For a start, <X11/Xlib.h> needs <X11/Xfuncproto.h> and
> > <X11/Xosdefs.h>.  What problem are you trying to solve?
> > 
> > Cheers,
> > Julien
> 




More information about the xorg-devel mailing list