Installing proto pc files in /usr/share/pkgconfig?
Yaakov (Cygwin/X)
yselkowitz at users.sourceforge.net
Thu Sep 27 10:24:17 PDT 2012
On Tue, 2012-09-25 at 06:00 -0700, Dan Nicholson wrote:
> 1. As you demonstrated (and speaking as a pkg-config maintainer),
> pkg-config does not treat /usr/share/pkgconfig the way you want it to.
> It's mean to be for a multiarch system sharing the same root, not for
> a cross-compile scenario where you're trying to minimize pollution
> from the host root. pkg-config has no code that guarantee's things in
> /usr/share/pkgconfig are cross-compile safe.
xorg-util-macros, xorg-sgml-doctools, and xcb-proto are relevant
examples of .pc files in /usr/share/pkgconfig which can be safely used
for cross-compiling. Other similar examples are gtk-doc and mm-common.
There are also a few cross-platform header-only packages, either protos
(e.g. spice-protocol) or C++ template "libraries" (e.g. Eigen). But in
these cases, the headers are in dedicated subdirectories
(-I/usr/include/spice-1, -I/usr/include/eigen3) and therefore won't pull
in the native build system headers. Unfortunately, I don't think we
could go that route with our protos, as it wouldn't be compatible with
non-pkg-config uses of X, of which there are still plenty.
> 3. I think making this change doesn't actually affect your situation.
> Either way you need to build and install the package supplying the .pc
> file to your cross-root. Suppose the proto packages stay in
> /usr/lib/pkgconfig and you avoid them for your setup. You still need
> to build those packages with your cross-root paths. If these proto
> packages start showing up in /usr/share/pkgconfig, you still need to
> build the packages for your new root so the .pc files are found
> earlier in the path than /usr/share/pkgconfig. I imagine you're
> building all the proto packages now for your cross setup, right? How
> does change anything?
You are correct that I have to build the protos for each cross-toolchain
(which is why I was in favour of a unified xproto package when last
proposed). Putting the .pc files in /usr/share/pkgconfig may lead
someone to try cross-compiling with them though, and then complain when
it doesn't work. Besides, having files
in /usr/$host/sys-root/$prefix/share/pkgconfig just doesn't look right
to me.
Yaakov
Cygwin/X
More information about the xorg-devel
mailing list