On Mon, Aug 23, 2010, Dechesne, Nicolas wrote:
I am still trying to setup a functional cross compilation environment for our packages. I want to be able to build without xdeb, using debuild command (this is mainly because we use other tools such as git-buildpackage).
(You might be able to arrange for git-buildpackage to call a builder which calls xdeb; but cross-building directly is fine too)
When I build a package which has dependency on another .so file, my ./configure script fails, pkg-config complains that it cannot find my package config file (which is available in /usr/arm-linux-gnueabi/lib/pkgconfig.
If I set PKG_CONFIG_LIBDIR to /usr/arm-linux-gnueabi/lib/pkgconfig, then my build is fine, e.g. debuild -ePKG_CONFIG_LIBDIR=/usr/arm-linux-gnueabi/lib/pkgconfig -b -aarmel -us -uc.
Is that expected? I was looking around in xdeb, and I don't find where this is being done, and I am sure it would be needed too since it ends up calling debuild...
I think we need that now too; would you mind filing a xdeb bug about that?
See Debian bug #551118 for why it's a recent in xdeb in maverick; doing it in dpkg-buildpackage was a kludge, but I don't think pkg-config has the relevant tests just yet (I don't have a triplet-pkg-config here, and I didn't see any tests for one in pkg.m4 from upstream git).
xdeb should test for whether triplet-pkg-config is available and set PKG_CONFIG_LIBDIR if not.
In this process I noticed that xdeb is
also passing /etc/dpkg-cross/cross-config.armel to debuild. Should I do this to?
This is the autoconf caching mechanism; it's a very nice trick: software using autoconf can test for stuff by trying to run some code during configure; this gets disabled automatically during cross-compilation for obvious reasons; the cool trick with cache is that you can provide the cached results and configure will trust the cache blindly.