Source: nut
Version: 2.8.3-3
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

nut regressed cross building a while ago. The notable symptom is

| checking for Mozilla NSS version via pkg-config... none found

and that's surprsing given that it correctly detects a triplet-prefixed 
pkg-config and also correctly depends on the host's nss development 
package. A bit of investigation reveals that PKG_CONFIG_LIBDIR ends up 
being set to /dev/null and from there one can locate 
m4/nut_check_pkgconfig.m4 with relative ease as the source of culprit. 
It checks whether the discovered $PKG_CONFIG is prefixed with $host 
(which can be e.g. aarch64-unknown-linux-gnu) while the actualy used one 
is prefixed with $host_alias (which can be e.g. aarch64-linux-gnu). It 
concludes that pkg-config is unsuitable and messes with 
PKG_CONFIG_LIBDIR as a result.

I'm attaching a patch that extends the patterns to cover other sensible 
pkg-config values and that happens to already fix Debian cross buils. 
Would you mind applying it and also forwarding it upstream?

Helmut
--- nut-2.8.4+really.orig/m4/nut_check_pkgconfig.m4
+++ nut-2.8.4+really/m4/nut_check_pkgconfig.m4
@@ -103,6 +103,9 @@
 		 AS_IF([test x"$build" != x"$host"], [
 			AS_CASE(["$PKG_CONFIG"],
 				[*/"$host"-pkg-config], [],
+				[*/"$host"-pkgconf], [],
+				[*/"$host_alias"-pkg-config], [],
+				[*/"$host_alias"-pkgconf], [],
 				[AC_MSG_WARN([Not using native pkg-config when cross-compiling.])
 
 				 dnl pkg.m4 forbids the use of PKG_XXX, so undo it here

Reply via email to