[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] new leafnode 2 snapshot avaiable



Leopold Toetsch <lt@xxxxxxxxxx> writes:

> liblnutil.a(nntputil.o): In function `tcp_connect':
> /home/lt/src/leafnode-2.0-snapshot-20020715a/nntputil.c:243: undefined
> reference
>   to `gai_strerror'
> collect2: ld returned 1 exit status
>
> I think best would be to do a configure test for gai_strerror and in
> case of failure #define  gai_strerror(x) "unknown err".
>
> Above err is on a SuSE 6.0 system:
> $ /lib/libc.so.6
> GNU C Library production release version 2.0.7, by Roland McGrath et al.

Thanks for reporting this.

Looks like GLIBC 2.0.7 had enough IPv6 to let autoconf think your
computer supports IPv6, but not enough to provide gai_strerror.

The next version will just try to link a program that uses gai_strerror,
if that fails, IPv6 support will be disabled.

I hope this doesn't break anything.

I won't really bother to get leafnode IPv6 to work on such systems for
now, I think I can expect a system that claims IPv6 support to comply
with IEEE Std 1003.1-2001 aka. Single Unix Specification 3 aka. The Open
Group Base Specifications Issue 6. Later on, I may pull in the fake
getaddrinfo stuff from OpenBSD/OpenSSH, if I know it works well enough
for leafnode also (it's targeted as OpenSSH).


Beware though, SuSE have discontinued support for their 6.0 through 6.4
distributions. (They support their products for two years.) So you may
have unfixed security issues.


This is the relevant patch, to try it, you will have to have recent
autoconf, automake versions (you will have to configure them with
--prefix=/usr and maybe more to overwrite SuSE's versions, lest other
packages like GTK-based fail later on autoconf/autorun) -- and run
/configure --enable-maintainer-mode:

Index: configure.ac
===================================================================
RCS file: /var/CVS/leafnode-2/configure.ac,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- configure.ac	2002/07/15 03:01:37	1.28
+++ configure.ac	2002/07/15 14:23:08	1.29
@@ -4,9 +4,9 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT
 AC_CONFIG_SRCDIR([leafnode.h])
-AM_INIT_AUTOMAKE([leafnode],[2.0-snapshot-20020715a])
+AM_INIT_AUTOMAKE([leafnode],[2.0-snapshot-20020715b])
 AC_PREREQ(2.53)
-AC_REVISION($Revision: 1.28 $)
+AC_REVISION($Revision: 1.29 $)
 AC_CONFIG_SRCDIR(leafnode.h)
 AM_CONFIG_HEADER(config.h)
 dnl AM_MAINTAINER_MODE
@@ -319,13 +319,15 @@
 AC_REPLACE_FUNCS(mergesort mkstemp inet_ntop)
 
 dnl Check whether the system has IPv6
-AC_CACHE_CHECK(for IPv6, cf_cv_ipv6, AC_TRY_COMPILE([
+AC_CACHE_CHECK(for IPv6, cf_cv_ipv6, AC_TRY_LINK([
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+#include <netdb.h>
 ],[struct sockaddr_in6 *a;
    int b = AF_INET6;
    void *c = &(a->sin6_addr);
+   char *e = gai_strerror(0);
    return 0;],[cf_cv_ipv6=yes],[cf_cv_ipv6=no])
 )
 if test "$cf_cv_ipv6" = "yes"


-- 
Matthias Andree

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list