GNU bug report logs - #74830
[PATCH] gnu: libcbor: Fix cross-compiling to 32-bit architecture

Previous Next

Package: guix-patches;

Reported by: Christoph Buck <dev <at> icepic.de>

Date: Thu, 12 Dec 2024 14:06:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74830 in the body.
You can then email your comments to 74830 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to , guix-patches <at> gnu.org:
bug#74830; Package guix-patches. (Thu, 12 Dec 2024 14:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christoph Buck <dev <at> icepic.de>:
New bug report received and forwarded. Copy sent to , guix-patches <at> gnu.org. (Thu, 12 Dec 2024 14:06:02 GMT) Full text and rfc822 format available.

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

From: Christoph Buck <dev <at> icepic.de>
To: guix-patches <at> gnu.org
Cc: Christoph Buck <dev <at> icepic.de>
Subject: [PATCH] gnu: libcbor: Fix cross-compiling to 32-bit architecture
Date: Thu, 12 Dec 2024 14:04:35 +0000
* gnu/packages/compression.scm (libcbor)[arguments]: Disable examples because
they don't build during cross-compilation. The callback definition
`find_string` in examples/streaming_parser.c uses `size_t` as type for
argument `len` which is 4 bytes on a 32bit platform. However, the callback
handler of type `cbor_callbacks.string` to which `find_string` is assigned
expects an `uint64_t`. Since the examples are not required this patch will
disable them from the build.

Change-Id: I596a62a9d0ab936179c8344e91ecc2cb0419316f
---
 gnu/packages/compression.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 99ea090091..eb3968cbce 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -2919,6 +2919,7 @@ (define-public libcbor
           "-DCMAKE_BUILD_TYPE=Release"
           "-DBUILD_SHARED_LIBS=ON"
           "-DCBOR_CUSTOM_ALLOC=ON"
+          "-DWITH_EXAMPLES=OFF"
           (string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
           (string-append "-DCMAKE_INSTALL_RPATH=" lib)))))
     (synopsis "The C library for parsing and generating CBOR")

base-commit: d916d3b1568a2def0dfb9089d61f2202db35beb7
-- 
2.46.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 15 Dec 2024 22:55:02 GMT) Full text and rfc822 format available.

Notification sent to Christoph Buck <dev <at> icepic.de>:
bug acknowledged by developer. (Sun, 15 Dec 2024 22:55:04 GMT) Full text and rfc822 format available.

Message #10 received at 74830-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christoph Buck <dev <at> icepic.de>
Cc: Simon Tournier <zimon.toutoune <at> gmail.com>, paren <at> disroot.org,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, jgart <jgart <at> dismail.de>,
 Mathieu Othacehe <othacehe <at> gnu.org>, Christopher Baines <guix <at> cbaines.net>,
 74830-done <at> debbugs.gnu.org
Subject: Re: [bug#74830] [PATCH] gnu: libcbor: Fix cross-compiling to 32-bit
 architecture
Date: Sun, 15 Dec 2024 23:54:29 +0100
Christoph Buck <dev <at> icepic.de> skribis:

> * gnu/packages/compression.scm (libcbor)[arguments]: Disable examples because
> they don't build during cross-compilation. The callback definition
> `find_string` in examples/streaming_parser.c uses `size_t` as type for
> argument `len` which is 4 bytes on a 32bit platform. However, the callback
> handler of type `cbor_callbacks.string` to which `find_string` is assigned
> expects an `uint64_t`. Since the examples are not required this patch will
> disable them from the build.
>
> Change-Id: I596a62a9d0ab936179c8344e91ecc2cb0419316f

Applied, thanks.  I took the liberty to add some of the explanation as a
comment, to make it easier to find.

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 13 Jan 2025 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 151 days ago.

Previous Next


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