[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cross-compiling libfido2

From: Sébastien Lerique
Subject: Cross-compiling libfido2
Date: Sat, 26 Mar 2022 22:51:03 +0900

Hello Guix!

I'm trying to build a raw image for a rock64 board, from my x86_64
laptop (using Guix on PopOS), and bumping into some
packages seemingly not ready for cross-compilation.

I am adding `(service openssh-service-type ...)` to the base
gnu/system/images/rock64.scm (building the original rock64.scm config
works fine), and my build fails at libfido2.

My config is
and building libfido2 fails at the configure phase with


-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'libcbor'
-- Checking for one of the modules 'libcrypto'
-- Checking for one of the modules 'zlib'
CMake Error at CMakeLists.txt:206 (message):
  could not find zlib


but no amount of moving pkg-config or zlib across inputs and
native-inputs changes anything.

In /tmp/guix-build-libfido2-1.9.0.drv-0/environment-variables, the only
pkg-config included in PATH is
pkg-config-aarch64-linux-gnu-0.29.2/bin/pkg-config, which makes me
suspect that the host pkg-config is needed in this case, and not found.

(Indeed, building manually from the left-over /tmp folder, using my normal
environment, and sourcing environment-variables, finds
/usr/bin/pkg-config, and cmake successfully configures the build; why do
report this and not a manual attempt on a clean environment? I couldn't
manage to ``guix shell`` into a container with cmake-minimal-cross as

Just in case, I played around with pkg-config-for-build which also
doesn't seem to be the solution.

Other packages relying on cmake and pkg-config, and prepared for
cross-compilation, don't seem to do anything different than libfido2
(e.g. cppzmq), so I'm out of things to try :)

Does anybody have an idea of what's going on? I could try to build
libfido2 without pkg-config, but maybe there is something simpler to try

Thank you and happy hacking!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]