krb5-1.4.1 build failure on FreeBSD 5.4 (EAI_NODATA), and aworkaround - Kerberos

This is a discussion on krb5-1.4.1 build failure on FreeBSD 5.4 (EAI_NODATA), and aworkaround - Kerberos ; I'm getting a krb5-1.4.1 build failure on FreeBSD 5.4-RELEASE: ..../krb5-1.4.1/src/lib/krb5/os/hst_realm.c: In function `krb5int_translate_gai_error': ..../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: `EAI_NODATA' undeclared (first use in this function) ..../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: (Each undeclared identifier is reported only once ..../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: for each function it appears in.) I ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: krb5-1.4.1 build failure on FreeBSD 5.4 (EAI_NODATA), and aworkaround

  1. krb5-1.4.1 build failure on FreeBSD 5.4 (EAI_NODATA), and aworkaround

    I'm getting a krb5-1.4.1 build failure on FreeBSD 5.4-RELEASE:

    ..../krb5-1.4.1/src/lib/krb5/os/hst_realm.c: In function
    `krb5int_translate_gai_error':
    ..../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: `EAI_NODATA'
    undeclared (first use in this function)
    ..../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: (Each
    undeclared identifier is reported only once
    ..../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: for each
    function it appears in.)

    I believe this is partially due to autoconf, which is (correctly)
    detecting getaddrinfo in FreeBSD 5.4, and hence not building the fake-
    addr-info types (.../krb5-1.4.1/src/include/fake-addrinfo.h:333)

    However, I find the somewhat cryptic obsoleted comments in /usr/
    include/netdb.h, on FreeBSD:

    /*
    * Error return codes from getaddrinfo()
    */
    #if 0
    /* obsoleted */
    #define EAI_ADDRFAMILY 1 /* address family for hostname not
    supported */
    #endif
    #define EAI_AGAIN 2 /* temporary failure in name
    resolution */
    #define EAI_BADFLAGS 3 /* invalid value for ai_flags */
    #define EAI_FAIL 4 /* non-recoverable failure in name
    resolution */
    #define EAI_FAMILY 5 /* ai_family not supported */
    #define EAI_MEMORY 6 /* memory allocation failure */
    #if 0
    /* obsoleted */
    #define EAI_NODATA 7 /* no address associated with
    hostname */
    #endif
    #define EAI_NONAME 8 /* hostname nor servname provided, or
    not known */
    #define EAI_SERVICE 9 /* servname not supported for
    ai_socktype */
    #define EAI_SOCKTYPE 10 /* ai_socktype not supported */
    #define EAI_SYSTEM 11 /* system error returned in errno */
    #define EAI_BADHINTS 12
    #define EAI_PROTOCOL 13
    #define EAI_MAX 14

    My solution has been to modify the generated autoconf.h to not set
    HAVE_GETADDRINFO, and hence force the generation of the fake addrinfo
    code, but this is maybe less than optimal.

    EAI_NO_DATA is defined in /usr/include/lwres/netdb.h, but I don't
    know off hand what that header file is for.

    Any BSD experts available?

    /Fred


    ________________________________________________
    Kerberos mailing list Kerberos@mit.edu
    https://mailman.mit.edu/mailman/listinfo/kerberos


  2. Re: krb5-1.4.1 build failure on FreeBSD 5.4 (EAI_NODATA), and a workaround

    Fred Dushin writes:

    > I'm getting a krb5-1.4.1 build failure on FreeBSD 5.4-RELEASE:


    > .../krb5-1.4.1/src/lib/krb5/os/hst_realm.c: In function
    > `krb5int_translate_gai_error':
    > .../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: `EAI_NODATA'
    > undeclared (first use in this function)
    > .../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: (Each undeclared
    > identifier is reported only once
    > .../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: for each function
    > it appears in.)


    EAI_NODATA is obsolete; current implementations just return EAI_NONAME in
    that case. Note that EAI_NODATA is not listed as a valid return code in
    RFC 3493.

    This should be fixed in the krb5 source, but in the meantime the
    workaround would be to compile with -DEAI_NODATA=EAI_NONAME, which the
    code appears to deal with correctly.

    --
    Russ Allbery (rra@stanford.edu)

  3. Re: krb5-1.4.1 build failure on FreeBSD 5.4 (EAI_NODATA), and aworkaround

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On Mon, 11 Jul 2005 at 19:24 (-0700), Russ Allbery wrote:

    > Fred Dushin writes:
    >
    >> I'm getting a krb5-1.4.1 build failure on FreeBSD 5.4-RELEASE:

    >
    >> .../krb5-1.4.1/src/lib/krb5/os/hst_realm.c: In function
    >> `krb5int_translate_gai_error':
    >> .../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: `EAI_NODATA'
    >> undeclared (first use in this function)
    >> .../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: (Each undeclared
    >> identifier is reported only once
    >> .../krb5-1.4.1/src/lib/krb5/os/hst_realm.c:370: error: for each function
    >> it appears in.)

    >
    > EAI_NODATA is obsolete; current implementations just return EAI_NONAME
    > in that case. Note that EAI_NODATA is not listed as a valid return code
    > in RFC 3493.
    >
    > This should be fixed in the krb5 source, but in the meantime the
    > workaround would be to compile with -DEAI_NODATA=EAI_NONAME, which the
    > code appears to deal with correctly.


    I had the same problem and your suggested workaround did allow me to build
    1.4.1 successfully. However, after I installed it, I got the following
    error running kinit:

    Assertion failed: (k5int_i->did_run != 0), function krb5int_initialize_library,
    file krb5_libinit.c, line 60.
    Abort (core dumped)

    Any ideas about this? I'm also running FreeBSD 5.4-RELEASE.

    I have been building and installing MIT K5 for years, mostly on Solaris
    platforms, but also (a long time ago) on FreeBSD as well. This is the
    first time I've had this kind of problem.

    Thanks.

    Mike

    __________________________________________________ ___________________
    Mike Friedman System and Network Security
    mikef@ack.Berkeley.EDU 2484 Shattuck Avenue
    1-510-642-1410 University of California at Berkeley
    http://ack.Berkeley.EDU/~mikef http://security.berkeley.edu
    __________________________________________________ ___________________

    -----BEGIN PGP SIGNATURE-----
    Version: PGP 6.5.8

    iQA/AwUBQtXIFa0bf1iNr4mCEQJz3ACgsVkG+uQu+bSmaOoTthBSwZ GCvsgAn1XK
    eecHscFRwSPmPtWtZSmzW2gW
    =LXbE
    -----END PGP SIGNATURE-----
    ________________________________________________
    Kerberos mailing list Kerberos@mit.edu
    https://mailman.mit.edu/mailman/listinfo/kerberos


+ Reply to Thread