unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* guile-lzlib fix for the 64bit Hurd / gcc-14
@ 2024-11-15 15:33 janneke
  2024-11-16  7:33 ` Mathieu Othacehe
  0 siblings, 1 reply; 2+ messages in thread
From: janneke @ 2024-11-15 15:33 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

Hi Mathieu,

I'm using the attached patch to build guile-lzlib for the 64bit Hurd.

When configure tries to detect the shared library name, the Hurd's gcc-14 says

--8<---------------cut here---------------start------------->8---
x86_64-pc-gnu-gcc conftest.c -o conftest -llz -Wl,--verbose
foo.c: In function ‘main’:
foo.c:1:22: error: implicit declaration of function ‘LZ_decompress_open’ [-Wimplicit-function-declaration]
    1 | int main () { return LZ_decompress_open(); }
      |                      ^~~~~~~~~~~~~~~~~~
--8<---------------cut here---------------end--------------->8---

The solution could be to compile using -Wno-implicit-function-declaration,
or to just declare the function, which is what this patch does.

Greetings,
Janneke


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-build-Support-the-64bit-Hurd.patch --]
[-- Type: text/x-patch, Size: 1077 bytes --]

From 80dcd31562827f4b6d085affe9d9f22164f7ed34 Mon Sep 17 00:00:00 2001
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 15 Nov 2024 16:18:29 +0100
Subject: [PATCH] build: Support the 64bit Hurd.

* configure.ac: When cross-compiling declare LZ_decompress_open before
using it in conftest.c.
---
 configure.ac | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 50dc5ac..4c56768 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,10 @@ AC_DEFUN([GUILE_LIBLZ_FILE_NAME], [
     [if test "$cross_compiling" = yes; then
        # When cross-compiling, we cannot rely on 'ldd'.  Instead, look
        # the output of 'ld --verbose', assuming we're using GNU ld.
-       echo 'int main () { return LZ_decompress_open(); }' > conftest.c
+       cat > conftest.c <<EOF
+int LZ_decompress_open ();
+int main () { return LZ_decompress_open(); }
+EOF
        guile_cv_liblz_libdir="\
           `$CC conftest.c -o conftest$EXEEXT -llz -Wl,--verbose 2>/dev/null \
           | grep -E '^/.*/liblz\.(a|so)'`"
-- 
2.46.0


[-- Attachment #3: Type: text/plain, Size: 164 bytes --]


-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

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

end of thread, other threads:[~2024-11-16  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-15 15:33 guile-lzlib fix for the 64bit Hurd / gcc-14 janneke
2024-11-16  7:33 ` Mathieu Othacehe

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).