[PATCH] gnu: libcbor: Fix cross-compiling to 32-bit architecture

  • Done
  • quality assurance status badge
Details
2 participants
  • Christoph Buck
  • Ludovic Courtès
Owner
unassigned
Submitted by
Christoph Buck
Severity
normal
C
C
Christoph Buck wrote on 12 Dec 15:04 +0100
(address . guix-patches@gnu.org)(name . Christoph Buck)(address . dev@icepic.de)
62a9e8b6613b09d0a260007aa2c79ad05cf774df.1734012275.git.dev@icepic.de
* 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(+)

Toggle diff (16 lines)
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
L
L
Ludovic Courtès wrote on 15 Dec 23:54 +0100
(name . Christoph Buck)(address . dev@icepic.de)
87bjxch80q.fsf@gnu.org
Christoph Buck <dev@icepic.de> skribis:

Toggle quote (10 lines)
> * 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’.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74830@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74830
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch