[Top][All Lists]

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

cross-compilation and proprietary pkg-config replacements (pcre-config,

From: John Spencer
Subject: cross-compilation and proprietary pkg-config replacements (pcre-config, pcap-config, etc)
Date: Fri, 15 Aug 2014 23:49:29 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8


I'm currently in the process of adding cross-compilation support to a linux distribution, but I'm running into a lot of nasty issues.

The #1 offender are proprietary pkg-config replacements, and there are many.
They break cross-compilation by returning non-sysrooted include and library directories from the host, like -I/usr/include or -L/lib.

I'm glad to say that autoconf itself is one of the few components that properly handle cross-compilation.

It seems it's "en vogue" for libs to ship their own broken replacement rather than supplying a portable pkgconfig file...
the list is big, but these here are the most often used ones:
pcap-config, pcre-config, freetype-config, apr-1-config, glib-config, gtk-config, ncursesw5-config, libmikmod-config, etc.

(in a proper setup those are not even needed, unless they installed headers into a custom subdir in the standard include path. otherwise just returning -lmylib is the only thing that's needed.)

since it's unlikely to get any of those fixed in the next decade (or even convinced to ship .pc files instead of their NIH'd pkg-config replacement), my idea was to add support for them into autoconf itself:

Offer a m4 macro for each of them (or a generic "external config" macro), which then calls these config tools and prefixes the returned include and library paths with the sysroot path (passed to configure via --with-sysroot=).
so packagers depending on these libraries would use the provided macros
rather than hardcoding their own test.

Does this sound viable and acceptable for inclusion ?
Or is there another workaround that i missed ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]