GNU bug report logs - #54595
[PATCH 0/2] Fix cross-compilation for libfido2

Previous Next

Package: guix-patches;

Reported by: Sébastien Lerique <sl <at> eauchat.org>

Date: Sun, 27 Mar 2022 12:29:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 54595 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>,
 Sébastien Lerique <sl <at> eauchat.org>, 54595 <at> debbugs.gnu.org
Subject: Re: [bug#54595] [PATCH 2/2] gnu: libfido2: Fix cross-compilation.
Date: Sun, 27 Mar 2022 18:27:48 +0100
[Message part 1 (text/plain, inline)]
Maxime Devos <maximedevos <at> telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> Pierre Langlois schreef op zo 27-03-2022 om 15:04 [+0100]:
>> I'm also not entirely sure if it's
>> #+pkg-config or #$pkg-config, both seem to work
>
> #+pkg-config, given that it is a thing that needs to be run during
> compilation.  I'm wondering, do you have transparant QEMU emulation
> enabled?  If so, both seeming to work is expected since QEMU will
> emulate the cross-compiled cross-compiling (IIUC a canadian cross, in
> GCC terminology) pkg-config.  If not, I would expect some kind of error
> ...

Ooooh I do have qemu emulation enabled, that must be it, thanks!  I'll
need to be careful about that, seems too easy to make a mistake.

>
> Or, to allow for package transformations:
>
>   #+(file-append (this-package-native-input (pkg-config-for-target))
>                  "/bin/" (pkg-config-for-target))
>
> though maybe package transformations should just transform the G-exp as
> well, dunno.  ('file-append' is not strictly required here.)  Maybe we can
> have a macro (pkg-config-binary) that expands to that thing, and
> use it in other packages?

Yeah, if we have this pattern often it sounds like a good idea.
However, better yet maybe could be to make the cmake build-system handle
it automagically.  I see `PKG_CONFIG_EXECUTABLE' is part of cmake itself
so that might be OK?

https://cmake.org/cmake/help/latest/module/FindPkgConfig.html

>
> Possibly interesting or irrelevant: the following will produce an
> x86_64-linux-gnu-pkg-config that can be run on a aarch64-linux-gnu
> computer to find libraries for x86_64-linux-gnu.
>
> $ guix build -e '(parameterize (((@ (guix utils) %current-target-system) "x86_64-linux-gnu")) (@ (gnu packages pkg-config) pkg-config))' --target=aarch64-linux-gnu

Ha! That's pretty cool :-).

Thanks,
Pierre
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 40 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.