[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: *-config programs and multi-arch

On Wed, Sep 14, 2011 at 03:01:06PM -0500, Peter Samuelson wrote:

> [Alastair McKinstry]
> > What is the preferred solution for handling these in the multi-arch
> > debian world?  Currently I am working on providing pkg-config .pc
> > files as a replacement (and requesting that upstream deprecate the
> > *-config scripts); I could rewrite the adios_config and dap-config
> > scripts to read the pkg-config file information

> That's what I suggest.  Ship a .pc file in /usr/lib/{arch}/pkgconfig,
> ship your foo-config in /usr/bin, and rewrite foo-config to call
> pkg-config.  Since your rewritten foo-config is now arch-independent,
> your -dev can ship it in /usr/bin and stil be Multi-arch: same.

This is definitely a good first step and gives you a foo-config that works
for native builds in a multiarch-clean manner.

> I don't know how pkg-config handles multiarch either, but however
> it detects the desired host arch (is it just the PKG_CONFIG_PATH
> variable?), your /usr/bin/foo-config shouldn't have to care.

It doesn't detect the desired host arch; you can override with
PKG_CONFIG_PATH, and /usr/share/pkg-config-crosswrapper will assist with
this when invoked as ${target}-pkg-config.  There is definitely no good way
to get cross-build support out of a /usr/bin/foo-config wrapper by this
method, however, so the ideal is to provide /usr/bin/foo-config only for
backwards compatibility and encourage the library consumers to use pkgconfig
directly via pkg.m4 (or cross-build-aware equivalent).

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Reply to: