On 2009-03-03 17:59-0600 Thomas Stover wrote:

>
>>> 
>>> The current stumbling block for the cairo drivers is that they use
>>> pkg-config to get the correct paths and libraries to link in. This won't
>>> work on a cross-compiled environment unless you provide suitable 
>>> pkg-config
>>> files from a cross-compiled version of cairo. This should be possible
>>> though.
>> 
>> Yes.  This may already be covered in the CMake cross-build wiki, but 
>> instead
>> of setting PKG_CONFIG_PATH (which always sets the native pkg-config default
>> path in addition to the non-native one you set), you should set
>> PKG_CONFIG_LIBDIR (which sets only the non-native path that you specify and
>> which excludes the native pkg-config path).
>
> I have read that  in places to, and have yet fully understand the distinction 
> between the two. We use PKG_CONFIG_PATH for cross builds all the time and get 
> results. For one thing, how would pkg-config 'know' what is native and 
> non-native?

pkg-config knows exactly what PATHS to check by what you specify to
PKG_CONFIG_LIBDIR.  If a non-native package does not exist, the
PKG_CONFIG_LIBDIR method will do that right thing which is to report it does
not exist while for this case the PKG_CONFIG_PATH method will fall back to
the native path (check the man page for pkg-config) which obviously is the
wrong thing to do for cross-builds. This is why the PKG_CONFIG_PATH method 
is deprecated for cross-build environments.

> I wouldn't want a cross build to ever link to a native lib 
> anyway.

Exactly, which is why you should always use PKG_CONFIG_LIBDIR for cross
builds.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to