[OpenAFS] Trouble compiling 1.4rc4 SRPM
Derek Atkins
warlord@MIT.EDU
Fri, 30 Sep 2005 14:54:03 -0400
Actually, it turns out that just removing res_search causes
the RPM to fail to build on RHEL3.. So.. I think I need to
take this route and search for both res_search and __res_search.
I'm testing it now on EL3.. But then I suspect I'll have to go
back and rebuild FC1,3,4. Feh!
-derek
Russ Allbery <rra@stanford.edu> writes:
> Kurt Seiffert <seiffert@indiana.edu> writes:
>
>> I'm trying to compile openafs 1.4.0rc4 from the SRPM's. I am trying
>> this on both RHEL AS 3 and RHEL AS 4.
>
>> Openafs itself seems to compile OK but when the rpmbuild runs the
>> configure script for afs-krb5 it gets the following error:
>
>> checking for res_search in -lresolv... no
>> configure: error: Unable to find res_search function
>
> Yup, you're on AMD64. This is a problem specific to the AMD64 glibc
> libraries. Basically, glibc on AMD64, but not on i386, hides res_search
> in a way that still works for normal code but doesn't work for the way
> Autoconf constructs its library probes (since it assumes that the code
> being compiled has included the relevant header).
>
> The simple cheat is to search for __res_search instead, and in fact a
> simple perl -i -pe 's/\bres_search\b/__res_search/g' configure will
> generally fix it on that platform.
>
> The slightly more robust cheat is to change anything like:
>
> AC_SEARCH_LIBS([res_search], [resolv])
>
> in configure.in or wherever to:
>
> AC_SEARCH_LIBS([res_search], [resolv], ,
> [AC_SEARCH_LIBS([__res_search], [resolv])])
>
> The actually correct thing to do is to not use AC_SEARCH_LIBS and instead
> use one of the other probe mechanisms that lets you force the inclusion of
> an additional header in the library probe and then include arpa/nameser.h
> and resolv.h. Autoconf doesn't provide a nice way to do this,
> unfortunately, but the src/cf/ressearch.m4 file in OpenAFS defines a macro
> that does the right thing.
>
> --
> Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info
>
>
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord@MIT.EDU PGP key available