You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Rodent of Unusual Size <Ke...@Golux.Com> on 2001/12/04 22:28:43 UTC

gai_strerror not found on RH 5.2 (libc5?)

I'm getting this when I try to build Apache 2.0.* on Red Hat
Linux 5.2 (libc5, I think):

###Test: Platform: Linux 2.0.36 i586 unknown
###Test: Removing files from previous test run
###Test: Creating working directory /var/tmp/ap2-test
###Test: Locking work area: done.
###Test: Working with CVS revision HEAD
###Test: Building with ./configure options:
###Test:   --enable-auth-anon
###Test:   --enable-auth-digest
###Test:   --enable-case-filter
###Test:   --enable-case-filter-in
###Test:   --enable-cgi
###Test:   --enable-echo
###Test:   --enable-expires
###Test:   --enable-headers
###Test:   --enable-info
###Test:   --enable-maintainer-mode
###Test:   --enable-mime-magic
###Test:   --enable-optional-hook-export
###Test:   --enable-optional-hook-import
###Test:   --enable-rewrite
###Test:   --enable-speling
###Test:   --enable-unique-id
###Test:   --enable-usertrack
###Test:   --enable-vhost-alias
###Test:   --prefix=/var/tmp/ap2-test/server
###Test: Creating installation directory
###Test: Checking out: httpd-2.0
###Test: Checking out: apr
###Test: Checking out: apr-util
###Test: Checking out: httpd-test
###Test: Disabling test: ssl/all
###Test: Disabling test: modules/dav
###Test: Preprocessing: buildconf
###Test: Preprocessing: configure
###Test: Preprocessing: make distclean
###Test: MPM-Start: prefork
###Test: configure
###Test: make
###Test: Error encountered
###Test: Output from last command
Making all in srclib
make[1]: Entering directory `/var/tmp/ap2-test/httpd-2.0/srclib'
Making all in apr
make[2]: Entering directory `/var/tmp/ap2-test/httpd-2.0/srclib/apr'
	:
make[2]: Entering directory `/var/tmp/ap2-test/httpd-2.0/support'
/bin/sh /var/tmp/ap2-test/httpd-2.0/srclib/apr/libtool --silent --mode=compile gcc  -g -O2 -Wall -Wmissing-prototypes
-Wstrict-prototypes -Wmissing-declarations -pthread -DNO_DBM_REWRITEMAP    -DLINUX=2 -D_REENTRANT -DAP_DEBUG
-DAP_HAVE_DESIGNATED_INITIALIZER   -I. -I/var/tmp/ap2-test/httpd-2.0/os/unix
-I/var/tmp/ap2-test/httpd-2.0/server/mpm/prefork -I/var/tmp/ap2-test/httpd-2.0/modules/http
-I/var/tmp/ap2-test/httpd-2.0/modules/proxy -I/var/tmp/ap2-test/httpd-2.0/include
-I/var/tmp/ap2-test/httpd-2.0/srclib/apr/include -I/var/tmp/ap2-test/httpd-2.0/srclib/apr-util/include
-I/var/tmp/ap2-test/httpd-2.0/modules/dav/main -prefer-non-pic -static -c htpasswd.c && touch htpasswd.lo
/bin/sh /var/tmp/ap2-test/httpd-2.0/srclib/apr/libtool --silent --mode=link gcc  -g -O2 -Wall -Wmissing-prototypes
-Wstrict-prototypes -Wmissing-declarations -pthread -DNO_DBM_REWRITEMAP    -DLINUX=2 -D_REENTRANT -DAP_DEBUG
-DAP_HAVE_DESIGNATED_INITIALIZER   -I. -I/var/tmp/ap2-test/httpd-2.0/os/unix
-I/var/tmp/ap2-test/httpd-2.0/server/mpm/prefork -I/var/tmp/ap2-test/httpd-2.0/modules/http
-I/var/tmp/ap2-test/httpd-2.0/modules/proxy -I/var/tmp/ap2-test/httpd-2.0/include
-I/var/tmp/ap2-test/httpd-2.0/srclib/apr/include -I/var/tmp/ap2-test/httpd-2.0/srclib/apr-util/include
-I/var/tmp/ap2-test/httpd-2.0/modules/dav/main -export-dynamic    -o htpasswd  htpasswd.lo
/var/tmp/ap2-test/httpd-2.0/srclib/apr-util/libaprutil.la /var/tmp/ap2-test/httpd-2.0/srclib/apr/libapr.la -lm -lcrypt -lnsl
-ldl -lgdbm /var/tmp/ap2-test/httpd-2.0/srclib/apr-util/xml/expat/lib/libexpat.la
/var/tmp/ap2-test/httpd-2.0/srclib/apr/.libs/libapr.so: undefined reference to `gai_strerror'
make[2]: *** [htpasswd] Error 1

On RH 6.2, gai_strerror() is in libc.a and libc_p.a.  The man pages
indicate that gai_strerror() is a companion to getaddrinfo(), and
it's prototyped in <netdb.h>.  It doesn't appear on my 5.2 system
at all.

Has it been decided that APR won't support this environment?  A
friendlier way of saying so would be nice.. :-)
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"

Re: [PATCH] Re: gai_strerror not found on RH 5.2 (libc5?)

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
* On 2001-12-04 at 18:00,
  Jeff Trawick <tr...@attglobal.net> excited the electrons to say:
> 
> Please try this patch and post

It has fixed my problem; I'll get you the details you
requested to-night or to-morrow.  Thanks!
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"

[PATCH] Re: gai_strerror not found on RH 5.2 (libc5?)

Posted by Jeff Trawick <tr...@attglobal.net>.
Please try this patch and post

1) the part of configure output that corresponds to this from my 
   machine:

Checking for IPv6 Networking support...
checking for library containing getaddrinfo... none required
checking for library containing gai_strerror... none required
checking for library containing getnameinfo... none required
checking for gai_strerror... yes
checking for working getaddrinfo... yes
checking for negative error codes for getaddrinfo... yes
checking for working getnameinfo... yes
checking for sockaddr_in6... yes
checking if APR supports IPv6... yes

2) whether or not HAVE_GETADDRINFO is in apr_private.h

3) whether or not your build works (and if not, how does it fail) 

Thanks,

Jeff

Index: srclib/apr/configure.in
===================================================================
RCS file: /home/cvspublic/apr/configure.in,v
retrieving revision 1.383
diff -u -r1.383 configure.in
--- srclib/apr/configure.in	2001/12/04 20:37:38	1.383
+++ srclib/apr/configure.in	2001/12/04 21:44:48
@@ -1319,7 +1319,9 @@
   [ user_disabled_ipv6=0 ] )
 
 AC_SEARCH_LIBS(getaddrinfo, inet6)
+AC_SEARCH_LIBS(gai_strerror, inet6)
 AC_SEARCH_LIBS(getnameinfo, inet6)
+AC_CHECK_FUNCS(gai_strerror)
 APR_CHECK_WORKING_GETADDRINFO
 APR_CHECK_NEGATIVE_EAI
 APR_CHECK_WORKING_GETNAMEINFO
Index: srclib/apr/build/apr_network.m4
===================================================================
RCS file: /home/cvspublic/apr/build/apr_network.m4,v
retrieving revision 1.10
diff -u -r1.10 apr_network.m4
--- srclib/apr/build/apr_network.m4	2001/11/27 03:50:49	1.10
+++ srclib/apr/build/apr_network.m4	2001/12/04 21:44:48
@@ -5,6 +5,10 @@
 dnl
 dnl check for working getaddrinfo()
 dnl
+dnl Note that if the system doesn't have gai_strerror(), we
+dnl can't use getaddrinfo() because we can't get strings
+dnl describing the error codes.
+dnl
 AC_DEFUN(APR_CHECK_WORKING_GETADDRINFO,[
   AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
   AC_TRY_RUN( [
@@ -44,7 +48,11 @@
   ac_cv_working_getaddrinfo="yes"
 ])])
 if test "$ac_cv_working_getaddrinfo" = "yes"; then
-  AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works well enough for APR])
+  if test "$ac_cv_func_gai_strerror" != "yes"; then
+    ac_cv_working_getaddrinfo="no"
+  else
+    AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works well enough for APR])
+  fi
 fi
 ])
 

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: gai_strerror not found on RH 5.2 (libc5?)

Posted by Ryan Bloom <rb...@covalent.net>.
On Tuesday 04 December 2001 01:33 pm, Jeff Trawick wrote:

> > Has it been decided that APR won't support this environment?  A
> > friendlier way of saying so would be nice.. :-)
>
> The only environment APR won't support is the environment that has no
> crusader (well, pretty much).

Well said, Jeff!!!!!   :-)

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: gai_strerror not found on RH 5.2 (libc5?)

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
/me howls "@#^&*^%&*@!#*%* ASF list missing Reply-To!!!!"

Jeff Trawick wrote:
> 
> errorcodes.c assumes that if you have getaddrinfo() you have
> gai_strerror().
        :
> Can you verify that getaddrinfo() exists

nm sez it's in libc.

> and that HAVE_GETADDRINFO is defined in
> srclib/apr/include/private/arch/unix/apr_private.h pretty please?

Well, yes, it's there -- as long as I elide the '/private/'
segment from the path..

> We already do some sanity-checking of getaddrinfo() before deciding to
> use it.  Probably we need to not consider that getaddrinfo() is usable
> if there is no gai_strerror().  If you can verify that you really have
> getaddrinfo() I'll work up a patch for you to test out.

'need to not consider it usable' -- in other words, if there's no
gai_strerror(), getaddrinfo() is garbage?

Ta, Jeff!
-- 
#ken    P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"

Re: gai_strerror not found on RH 5.2 (libc5?)

Posted by Jeff Trawick <tr...@attglobal.net>.
Rodent of Unusual Size <Ke...@Golux.Com> writes:

> I'm getting this when I try to build Apache 2.0.* on Red Hat
> Linux 5.2 (libc5, I think):
...
> /var/tmp/ap2-test/httpd-2.0/srclib/apr/.libs/libapr.so: undefined reference to `gai_strerror'
> make[2]: *** [htpasswd] Error 1

> On RH 6.2, gai_strerror() is in libc.a and libc_p.a.  The man pages
> indicate that gai_strerror() is a companion to getaddrinfo(), and
> it's prototyped in <netdb.h>.  It doesn't appear on my 5.2 system
> at all.

errorcodes.c assumes that if you have getaddrinfo() you have
gai_strerror().  

#if defined(HAVE_GETADDRINFO)
        statcode -= APR_OS_START_EAIERR;
#if defined(NEGATIVE_EAI)
        statcode = -statcode;
#endif
        return stuffbuffer(buf, bufsize, gai_strerror(statcode));
#else
        return stuffbuffer(buf, bufsize, "APR does not understand this
        error code");
#endif

Can you verify that getaddrinfo() exists and that
HAVE_GETADDRINFO is defined in
srclib/apr/include/private/arch/unix/apr_private.h pretty please?

(I assume it is there, but I just want to double-check.)

We already do some sanity-checking of getaddrinfo() before deciding to
use it.  Probably we need to not consider that getaddrinfo() is usable
if there is no gai_strerror().  If you can verify that you really have
getaddrinfo() I'll work up a patch for you to test out.

> Has it been decided that APR won't support this environment?  A
> friendlier way of saying so would be nice.. :-)

The only environment APR won't support is the environment that has no
crusader (well, pretty much).

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...