Re: Sun RPC support not detected in glibc-2.26 or later, build fails

Dominik 'Rathann' Mierzejewski <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <[email protected]>
On Wednesday, 13 February 2019 at 10:21, Mike Aubury wrote:
> Sorry - assumed the "..." was a break in the ./configure output

Well, that's my fault. I only pasted the log parts I thought were
relevant, using ... as an indicator of the parts I cut. Sorry.

> I'm not sure adding tirpc would help
> Its failing with a missing definition for "u_int32"
> will be defined in a header file - so its missing something to pull in that
> typedef in there.

Well, I was under the impression it came from the fallback
implementation of RPC included in aubit4gl, so my thinking was that
using system headers should work. I admit I haven't checked the code in
detail. Have you tried building aubit4gl on a modern Linux distribution?

> I didnt write the configure script (guy who did is long gone) - in there -
> it says :
> 
> AC_ARG_WITH(rpc,
> [  --with-rpc[=DIR]          Include RPC support.  DIR is the RPC base
>                           install directory, defaults to /usr/local.],
> [
> ...
>                LDFLAGS="$LDFLAGS $TEST_I_FLAGS $TEST_L_FLAGS"
>                 # FIXME: Replace `main' with a function in `-lrpclib':
>                 AC_CHECK_LIB([rpclib], [main])
>                 AC_CHECK_LIB([rpcsvc], [main])
> 
>                 if test "$ac_cv_lib_rpcsvc_main" = "yes"; then
>                         #seems rpc library is rpcsvc on aix and
> sparc-sun-solaris2.7
>                         #which defines a bunch of symbols starting 'xdr_'
> 
>                         AC_CHECK_LIB(rpcsvc, svctcp_create
> ,AC_DEFINE(HAVE_RPCSVC,1,[ ]))
> 
>                         AC_MSG_CHECKING(library containing RPC functions)
>                         if test "$ac_cv_lib_rpcsvc___rpc_thread_svc_fdset"
> = "yes" || test "$ac_cv_lib_rpcsvc_svctcp_create_" = "yes" || test
> "$ac_cv_lib_rpcsvc_xdr_argument_" = "yes"; then
>                                 AC_MSG_RESULT(-lrpcsvc)
>                     RPCLIB_NAME=-lrpcsvc
> ...
> 
> Do we need to add the tirpc as a lib to check in that portion of the code ?

Yes, that's the idea. Regardless of why the compilation is failing, the
current official RPC implementation should be detected. I'm not an
autotools expert myself, so I'm not sure where the best place to put the
detection code would be. Certainly, the assumption that RPC is provided
by glibc is false for glibc-2.26+.

Regards,
Dominik
-- 
Fedora   https://getfedora.org  |  RPM Fusion  http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
        -- from "Collected Sayings of Muad'Dib" by the Princess Irulan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.