Subject: [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors

From: Maxime Devos <[email-masked]>
Date: Thu, 23 Sep 2021 12:38:49 +0200

Ludovic Courtès schreef op wo 22-09-2021 om 21:10 [+0200]:
> 
> >      (native-search-paths
> > -     (list (search-path-specification
> > -            (variable "PKG_CONFIG_PATH_FOR_BUILD")
> > -            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))
> > +     (map (lambda (original)
> > +            (search-path-specification
> > +             (inherit original)
> > +             (variable "PKG_CONFIG_FOR_BUILD")))
> > +          (package-native-search-paths %pkg-config)))))
> 
> Isn’t that a typo, “PKG_CONFIG_FOR_BUILD” instead of
> “PKG_CONFIG_PATH_FOR_BUILD” or (string-append name "_FOR_BUILD")?
> 
> The original spec above looked more appropriate to me.

Yes, it's a typo.  The attached patch should fix it (now running
./pre-inst-env guix build --target=... ...).  I wonder how I could have
missed this.

Greetings,
Maxime.
From d365cf26069984d2a10ea6f9cb1aafea023d30e6 Mon Sep 17 00:00:00 2001
From: Maxime Devos <[email-masked]>
Date: Thu, 23 Sep 2021 12:33:01 +0200
Subject: [PATCH core-updates-frozen] gnu: pkg-config: Fix typo in search
 paths.

* gnu/packages/pkg-config.scm
  (pkg-config-for-build)[native-search-paths]: Use "PKG_CONFIG_PATH_FOR_BUILD"
  instead of "PKG_CONFIG_PATH".
---
 gnu/packages/pkg-config.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm
index 2b4173a7db..dd0d18ae36 100644
--- a/gnu/packages/pkg-config.scm
+++ b/gnu/packages/pkg-config.scm
@@ -166,5 +166,5 @@ exec ~a \"$@\""
      (map (lambda (original)
             (search-path-specification
              (inherit original)
-             (variable "PKG_CONFIG_FOR_BUILD")))
+             (variable "PKG_CONFIG_PATH_FOR_BUILD")))
           (package-native-search-paths %pkg-config)))))
-- 
2.33.0