On Fri, Nov 16, 2018 at 09:09:56AM +0100, Valentin Vidic wrote: > > dlm fails to cross build from source, because the upstream Makefile hard > > codes the build architecture pkg-config. The attached patch makes > > pkg-config substitutable. dh_auto_build substitutes it and dlm becomes > > cross buildable. Please consider applying it. > > Sure, can you show me how to cross build by setting PKG_CONFIG?
Please refer to the manual pages of dpkg-buildpackage, sbuild or pbuilder for how to perform a cross build. The relevant flag is either --host-arch or --host. It's not entirely clear whether you're referring to a manual cross build here. If you do, you set up the CC, PKG_CONFIG etc. to point at your cross toolchain. On a Debian system, you can simply prepend the GNU triplet to your tools to obtain a cross toolchain (e.g. "gcc" becomes "x86_64-linux-gnu-gcc" when building for amd64) if you install the relevant packages (sbuild and pbuilder do that for you). When using sbuild, you likely also want to use workarounds for #905345, #905346, and #905347. If that doesn't help, please include more details in your question. Helmut