diff mbox series

[bug#67861] gnu: cryptsetup: Fix cross-compilation.

Message ID 20231216225957.5259-1-hello@lnikki.la
State New
Headers show
Series [bug#67861] gnu: cryptsetup: Fix cross-compilation. | expand

Commit Message

Leo Nikkilä Dec. 16, 2023, 10:59 p.m. UTC
* gnu/packages/cryptsetup.scm (cryptsetup): Set explicit
`--with-libgcrypt-prefix' for cross-compilation.
---
 gnu/packages/cryptsetup.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Mathieu Othacehe Dec. 23, 2023, 9:29 a.m. UTC | #1
Hello,

> +       (string-append "--with-libgcrypt-prefix="
> +                      (assoc-ref %build-inputs "libgcrypt")))))

When cross-compiling to aarch64-linux-gnu, it allows to go past the
initial configure error, but then I have the following issue when
linking:

--8<---------------cut here---------------start------------->8---
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/vyylh2848g1k9yn3r5avvd1c1xcwh8hg-argon2-20190702/lib/libargon2.so when searching for -largon2
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/vyylh2848g1k9yn3r5avvd1c1xcwh8hg-argon2-20190702/lib/libargon2.a when searching for -largon2
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/vyylh2848g1k9yn3r5avvd1c1xcwh8hg-argon2-20190702/lib/../lib/libargon2.so when searching for -largon2
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/vyylh2848g1k9yn3r5avvd1c1xcwh8hg-argon2-20190702/lib/../lib/libargon2.a when searching for -largon2
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/vyylh2848g1k9yn3r5avvd1c1xcwh8hg-argon2-20190702/lib/libargon2.so when searching for -largon2
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/vyylh2848g1k9yn3r5avvd1c1xcwh8hg-argon2-20190702/lib/libargon2.a when searching for -largon2
aarch64-linux-gnu-ld: cannot find -largon2: No such file or directory
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/vyylh2848g1k9yn3r5avvd1c1xcwh8hg-argon2-20190702/lib/libargon2.so when searching for -largon2
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/vyylh2848g1k9yn3r5avvd1c1xcwh8hg-argon2-20190702/lib/../lib/libargon2.so when searching for -largon2
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/vyylh2848g1k9yn3r5avvd1c1xcwh8hg-argon2-20190702/lib/libargon2.so when searching for -largon2
collect2: error: ld returned 1 exit status
--8<---------------cut here---------------end--------------->8---

Thanks,

Mathieu
Mathieu Othacehe Dec. 23, 2023, 9:31 a.m. UTC | #2
> aarch64-linux-gnu-ld: skipping incompatible /gnu/store/vyylh2848g1k9yn3r5avvd1c1xcwh8hg-argon2-20190702/lib/libargon2.so when searching for -largon2

Oh, that's because I missed your patch on argon2.

Applied both of them,

Thanks,

Mathieu
diff mbox series

Patch

diff --git a/gnu/packages/cryptsetup.scm b/gnu/packages/cryptsetup.scm
index d8a6437259..3bdc68ae5a 100644
--- a/gnu/packages/cryptsetup.scm
+++ b/gnu/packages/cryptsetup.scm
@@ -53,7 +53,11 @@  (define-public cryptsetup
        ;; The default is OpenSSL which provides better PBKDF performance.
        "--with-crypto_backend=gcrypt"
        ;; GRUB 2.06 supports LUKS2, but does it reliably support all set-ups…?
-       "--with-default-luks-format=LUKS1")))
+       "--with-default-luks-format=LUKS1"
+       ;; libgcrypt is not found otherwise when cross-compiling.
+       ;; <https://issues.guix.gnu.org/63864>
+       (string-append "--with-libgcrypt-prefix="
+                      (assoc-ref %build-inputs "libgcrypt")))))
    (native-inputs
     (list pkg-config))
    (inputs