[Top][All Lists]

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

Re: Cross compiling with pkg.m4

From: Brian Dessent
Subject: Re: Cross compiling with pkg.m4
Date: Sun, 20 Apr 2008 03:12:01 -0700

John Darrington wrote:

> pkg.m4 doesn't behave in a very rational way, when configured with
> --host=xyzzy
> All the PKG_CHECK_MODULES macros continue to find the local modules,
> not the ones for target xyzzy.    Consequently, the build fails when
> the compiler/linker can't find the header/library for the necessary
> packages.

These macros are not part of automake, they're maintained by the
pkg-config project, whose mailing list is pkg-config at  You might be confused because automake does
provide aclocal which is a general purpose tool for bundling macros into
aclocal.m4, but that doesn't mean automake or aclocal has anything to do
with their content.

> Of course, one can get around this by setting the PKG_CONFIG_LIBDIR
> environment variable prior to running ./configure but I think that
> most people won't know that it's necessary, and it seems redundant to
> me, because of the --host flag.

According to the pkg-config README, the way this is supposed to work
when cross compiling is to name the pkg-config script in the sysroot as
$host-pkg-config to differentiate it from the pkg-config of the build
machine and it should figure out the rest automatically.  Maybe you need
to upgrade to a later version of pkg-config.


reply via email to

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