unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#74830] [PATCH] gnu: libcbor: Fix cross-compiling to 32-bit architecture
@ 2024-12-12 14:04 Christoph Buck
  2024-12-15 22:54 ` bug#74830: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Buck @ 2024-12-12 14:04 UTC (permalink / raw)
  To: 74830
  Cc: Christoph Buck,
	 ( <paren@disroot.org>, Christopher Baines <guix@cbaines.net>, Ludovic Court?s <ludo@gnu.org>, Mathieu Othacehe <othacehe@gnu.org>, Simon Tournier <zimon.toutoune@gmail.com>, Tobias Geerinckx-Rice <me@tobias.gr>, jgart <jgart@dismail.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(+)

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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-15 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 14:04 [bug#74830] [PATCH] gnu: libcbor: Fix cross-compiling to 32-bit architecture Christoph Buck
2024-12-15 22:54 ` bug#74830: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).