bug-gnulib
[Top][All Lists]
Advanced

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

Re: coreutils-5.90 build feedback


From: Jim Meyering
Subject: Re: coreutils-5.90 build feedback
Date: Sat, 01 Oct 2005 10:20:20 +0200

Thanks a lot!

"Nelson H. F. Beebe" <address@hidden> wrote:
> The coreutils-5.90 builds and installations went pretty smoothly,
> except for these:
>
> On Mac OS X:
>
>       expected actual differ: char 553, line 20
>       20d19
>       < f
>       21a21
>       > f
>       FAIL: basic
>       ./deref: skipping this test; your system doesn't support changing
>       the owner or group of a symbolic link.

Would you please do this:

  env DEBUG=yes VERBOSE=yes make check -C tests/chmod TESTS=basic > log 2>&1

and then send the contents of `log'?

> On Solaris 7 with native cc:
>
>       cc  -I/usr/local/include  -R/usr/local/lib -L/usr/local/lib -o pinky  
> pinky.o ../lib/libcoreutils.a
>       /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -lc 
> -R/usr/local/lib ../lib/libcoreutils.a -lnsl
>
>       Undefined                       first referenced
>        symbol                             in file
>       getservbyname                       ../lib/libcoreutils.a(getaddrinfo.o)
>
> That function is in -lsocket, but that library is not mentioned in the
> cc command.

I've just fixed the above for coreutils:

2005-10-01  Jim Meyering  <address@hidden>

        * getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
        libraries [inet nsl socket xnet].  Nelson Beebe reported that with
        native cc on Solaris 7, getaddrinfo.c requires -lsocket.

Index: m4/getaddrinfo.m4
===================================================================
RCS file: /fetish/cu/m4/getaddrinfo.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -u -r1.5 -r1.6
--- m4/getaddrinfo.m4   24 Sep 2005 10:44:30 -0000      1.5
+++ m4/getaddrinfo.m4   1 Oct 2005 06:54:11 -0000       1.6
@@ -1,4 +1,4 @@
-# getaddrinfo.m4 serial 5
+# getaddrinfo.m4 serial 6
 dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,8 +6,9 @@ dnl with or without modifications, as lo
 
 AC_DEFUN([gl_GETADDRINFO],
 [
-  AC_SEARCH_LIBS(getaddrinfo, nsl socket)
+  AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
   AC_SEARCH_LIBS(gethostbyname, [inet nsl])
+  AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet])
   AC_REPLACE_FUNCS(getaddrinfo gai_strerror)
   gl_PREREQ_GETADDRINFO
 ])

> On Compaq Alpha OSF/1 5.1:
>
>       c89 -DHAVE_CONFIG_H 
> -DLIBDIR=\"/uufs/inscc.utah.edu/common/home/mthnhb/alpha/local/lib\" -I. -I. 
> -I..
>        -I.. -I. -I/uufs/inscc.utah.edu/common/home/mthnhb/alpha/local/include 
>  -ieee
>       -I/uufs/inscc.utah.edu/common/home/mthnhb/alpha/local/include -c 
> getaddrinfo.c
>       ...
>       cc: Error: getaddrinfo.h, line 31: In this declaration, the struct 
> "addrinfo" is redefined.
>       (redefstruct)
>       struct addrinfo
>       ^
>       cc: Error: getaddrinfo.h, line 91: In this declaration, the type of 
> "gai_strerror" is not compatible
>       with the type of a previous declaration of "gai_strerror" at line 
> number 293 in file
>       /usr/include/netdb.h. (notcompat)
>       extern const char *gai_strerror (int ecode);
>
> I'm doing a new build with cc on that system.

This is happening because getaddrinfo.h defines struct addrinfo
and declares gai_strerror merely because the system lacks the
getaddrinfo function.  But this system already has those in netdb.h,
and they conflict.

Simon, I think the guards should be more precise.
I.e., use HAVE_GETADDRINFO only for the getaddrinfo declaration.
Then test for gai_strerror and guard its declaration with HAVE_GAI_STRERROR.
Similarly for struct addrinfo.

Do you feel like doing that?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]