all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Sébastien Lerique" <sl@eauchat.org>
To: help-guix <help-guix@gnu.org>
Subject: Cross-compiling libfido2
Date: Sat, 26 Mar 2022 22:51:03 +0900	[thread overview]
Message-ID: <87leww94jv.fsf@eauchat.org> (raw)

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
https://gitlab.com/wehlutyk/matrixbox/-/blob/eacc326b8a7d41f3113e3768302c59687402a536/config.scm
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
cmake.)

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
out?

Thank you and happy hacking!
Sébastien


             reply	other threads:[~2022-03-26 14:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-26 13:51 Sébastien Lerique [this message]
2022-03-26 14:38 ` Cross-compiling libfido2 Pierre Langlois
2022-03-27 12:31   ` Sébastien Lerique

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87leww94jv.fsf@eauchat.org \
    --to=sl@eauchat.org \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.