Compile problems on Solaris 2.6 - Kerberos

This is a discussion on Compile problems on Solaris 2.6 - Kerberos ; Hi, everyone, I'm trying to compile MIT's Kerberos V (krb5-1.5.1) on SPARC Solaris 2.6, and it keeps blowing up. At the moment, I'm using the GNU tools to do the build, since Sun's compiler won't take the arguments that configure ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Compile problems on Solaris 2.6

  1. Compile problems on Solaris 2.6

    Hi, everyone,

    I'm trying to compile MIT's Kerberos V (krb5-1.5.1) on SPARC Solaris
    2.6, and it keeps blowing up. At the moment, I'm using the GNU tools
    to do the build, since Sun's compiler won't take the arguments that
    configure wants to give it.

    My configure command line is:
    # configure --prefix=/zircon/opt --enable-dns-for-realm --without-krb4
    --with-tcl=/zircon/opt/usr/local/lib

    I'm using gcc version 3.4.6 (Sunfreeware package) and GNU ld 2.11.2.

    If I run it with Sun's compiler, the configure fails with the following
    errors in config.log:

    ucbcc: Warning: Option
    -YP,:/usr/ucblib:/zircon/opt/SUNWspro/WS6U2/bin/../lib:/z
    ircon/opt/SUNWspro/WS6U2/bin:/usr/ccs/lib:/usr/lib passed to ld, if ld
    is invoke
    d, ignored otherwise
    ucbcc: Warning: Option --version passed to ld, if ld is invoked,
    ignored otherwi
    se
    ld: warning: option -YP appears more than once, first setting taken
    /usr/ccs/bin/ld: illegal option -- -
    /usr/ccs/bin/ld: illegal option -- v
    usage: ld [-6:abc:d:e:f:h:il:mo:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?]
    file(s)

    Using gcc, the configure runs fine, but then make craps out like so:

    make[2]: Entering directory `/zircon/opt/krb5-1.5.1/src/util/support'
    /zircon/opt/usr/local/bin/gcc -fPIC -DSHARED -I../../include
    -I./../../include -I. -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1 -g -O2
    -Wall -Wmissing-prototypes -Wcast-qual -Wcast-align -Wconversion
    -Wshadow -pedantic -D_REENTRANT -pthreads -c threads.c -o threads.so.o
    && mv -f threads.so.o threads.so
    threads.c:36: warning: missing braces around initializer
    threads.c:36: warning: (near initialization for
    `krb5int_thread_support_init__once.once.o.__pthrea d_once_pad')
    threads.c:130: warning: missing braces around initializer
    threads.c:130: warning: (near initialization for
    `loaded_test_once.__pthread_once_pad')
    threads.c:403: warning: no previous prototype for
    'krb5int_call_thread_support_init'
    threads.c: In function `krb5int_thread_support_init':
    threads.c:456: warning: implicit declaration of function
    `krb5int_err_init'
    threads.c: At top level:
    threads.c:610: warning: no previous prototype for
    'krb5int_mutex_report_stats'
    /zircon/opt/usr/local/bin/gcc -fPIC -DSHARED -I../../include
    -I./../../include -I. -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1 -g -O2
    -Wall -Wmissing-prototypes -Wcast-qual -Wcast-align -Wconversion
    -Wshadow -pedantic -D_REENTRANT -pthreads -c init-addrinfo.c -o
    init-addrinfo.so.o && mv -f init-addrinfo.so.o init-addrinfo.so
    /zircon/opt/usr/local/bin/gcc -fPIC -DSHARED -I../../include
    -I./../../include -I. -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1 -g -O2
    -Wall -Wmissing-prototypes -Wcast-qual -Wcast-align -Wconversion
    -Wshadow -pedantic -D_REENTRANT -pthreads -c plugins.c -o plugins.so.o
    && mv -f plugins.so.o plugins.so
    plugins.c: In function `krb5int_get_plugin_func':
    plugins.c:251: warning: ISO C forbids conversion of object pointer to
    function pointer type
    /zircon/opt/usr/local/bin/gcc -fPIC -DSHARED -I../../include
    -I./../../include -I. -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1 -g -O2
    -Wall -Wmissing-prototypes -Wcast-qual -Wcast-align -Wconversion
    -Wshadow -pedantic -D_REENTRANT -pthreads -c errors.c -o errors.so.o &&
    mv -f errors.so.o errors.so
    errors.c:31: warning: no previous prototype for 'krb5int_err_init'
    errors.c: In function `krb5int_vset_error':
    errors.c:52: warning: passing arg 1 of `free' discards qualifiers from
    pointer target type
    errors.c: In function `krb5int_get_error':
    errors.c:76: warning: assignment discards qualifiers from pointer
    target type
    errors.c:80: warning: implicit declaration of function
    `krb5int_call_thread_support_init'
    errors.c:120: warning: assignment discards qualifiers from pointer
    target type
    errors.c: In function `krb5int_clear_error':
    errors.c:146: warning: passing arg 2 of `krb5int_free_error' discards
    qualifiers from pointer target type
    /zircon/opt/usr/local/bin/gcc -fPIC -DSHARED -I../../include
    -I./../../include -I. -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1 -g -O2
    -Wall -Wmissing-prototypes -Wcast-qual -Wcast-align -Wconversion
    -Wshadow -pedantic -D_REENTRANT -pthreads -c gmt_mktime.c -o
    gmt_mktime.so.o && mv -f gmt_mktime.so.o gmt_mktime.so
    gmt_mktime.c:40: warning: no previous prototype for
    'krb5int_gmt_mktime'
    /zircon/opt/usr/local/bin/gcc -fPIC -DSHARED -I../../include
    -I./../../include -I. -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1 -g -O2
    -Wall -Wmissing-prototypes -Wcast-qual -Wcast-align -Wconversion
    -Wshadow -pedantic -D_REENTRANT -pthreads -c fake-addrinfo.c -o
    fake-addrinfo.so.o && mv -f fake-addrinfo.so.o fake-addrinfo.so
    fake-addrinfo.c: In function `fake_getnameinfo':
    fake-addrinfo.c:934: warning: cast increases required alignment of
    target type
    fake-addrinfo.c: At top level:
    fake-addrinfo.c:1331: error: variable `krb5int_in6addr_any' has
    initializer but incomplete type
    fake-addrinfo.c:1331: error: `IN6ADDR_ANY_INIT' undeclared here (not in
    a function)
    fake-addrinfo.c: In function `krb5int_getnameinfo':
    fake-addrinfo.c:1355: warning: passing arg 4 of `my_fake_getnameinfo'
    as signed due to prototype
    fake-addrinfo.c:1355: warning: passing arg 6 of `my_fake_getnameinfo'
    as signed due to prototype
    fake-addrinfo.c: At top level:
    fake-addrinfo.c:1331: error: storage size of `krb5int_in6addr_any'
    isn't known
    fake-addrinfo.c:1317: warning: 'krb5int_lock_fac' defined but not used
    fake-addrinfo.c:1326: warning: 'krb5int_unlock_fac' defined but not
    used
    make[2]: *** [fake-addrinfo.so] Error 1
    make[2]: Leaving directory `/zircon/opt/krb5-1.5.1/src/util/support'
    make[1]: *** [all-recurse] Error 1
    make[1]: Leaving directory `/zircon/opt/krb5-1.5.1/src/util'
    make: *** [all-recurse] Error 1

    Has anyone seen problems like this, or does anyone know what might be
    causing it?

    TIA,

    Tom


  2. Re: Compile problems on Solaris 2.6

    On 26 Oct 2006 14:18:21 -0700, tomaddox@gmail.com wrote:
    > Hi, everyone,
    >
    > I'm trying to compile MIT's Kerberos V (krb5-1.5.1) on SPARC
    > Solaris 2.6, and it keeps blowing up. At the moment, I'm using
    > the GNU tools to do the build, since Sun's compiler won't take
    > the arguments that configure wants to give it.
    >
    > My configure command line is:
    > # configure --prefix=/zircon/opt --enable-dns-for-realm \
    > --without-krb4 --with-tcl=/zircon/opt/usr/local/lib
    >
    > I'm using gcc version 3.4.6 (Sunfreeware package) and GNU ld 2.11.2.
    >
    > If I run it with Sun's compiler, the configure fails with the
    > following errors in config.log:
    >
    > ucbcc: Warning: Option
    > -YP,:/usr/ucblib:/zircon/opt/SUNWspro/WS6U2/bin/../lib:/z
    > ircon/opt/SUNWspro/WS6U2/bin:/usr/ccs/lib:/usr/lib passed to ld, if ld
    > is invoke
    > d, ignored otherwise
    > ucbcc: Warning: Option --version passed to ld, if ld is invoked,
    > ignored otherwi
    > se
    > ld: warning: option -YP appears more than once, first setting taken
    > /usr/ccs/bin/ld: illegal option -- -
    > /usr/ccs/bin/ld: illegal option -- v
    > usage: ld [-6:abc:d:e:f:h:il:mo:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?]
    > file(s)
    >
    > Using gcc, the configure runs fine, but then make craps out like so:
    >
    > make[2]: Entering directory `/zircon/opt/krb5-1.5.1/src/util/support'
    > /zircon/opt/usr/local/bin/gcc -fPIC -DSHARED -I../../include
    > -I./../../include -I. -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1 -g -O2
    > -Wall -Wmissing-prototypes -Wcast-qual -Wcast-align -Wconversion
    > -Wshadow -pedantic -D_REENTRANT -pthreads -c threads.c -o threads.so.o
    > && mv -f threads.so.o threads.so
    > threads.c:36: warning: missing braces around initializer
    > threads.c:36: warning: (near initialization for
    > `krb5int_thread_support_init__once.once.o.__pthrea d_once_pad')

    [...]

    Where does -pedantic and all those -Wfoo flags come from?

    Do you have CFLAGS or CC set in your environment at all?


  3. Re: Compile problems on Solaris 2.6


    Giorgos Keramidas wrote:

    > Where does -pedantic and all those -Wfoo flags come from?


    I presume they're set by the configure script when it's constructing
    the makefiles.

    > Do you have CFLAGS or CC set in your environment at all?


    CFLAGS is unset; CC is set to point to gcc.


  4. Re: Compile problems on Solaris 2.6

    On Thu, 26 Oct 2006, tomaddox@gmail.com wrote:

    > If I run it with Sun's compiler, the configure fails with the following
    > errors in config.log:
    >
    > ucbcc: Warning: Option


    You're commiting the common error (some might say cardinal sin) of
    having /usr/ucb in your PATH. Get rid of /usr/ucb from your PATH
    and add /usr/ccs/bin and /opt/SUNWspro.

    --
    Rich Teer, SCNA, SCSA, OpenSolaris CAB member

    President,
    Rite Online Inc.

    Voice: +1 (250) 979-1638
    URL: http://www.rite-group.com/rich

  5. Re: Compile problems on Solaris 2.6

    On Fri, 27 Oct 2006 00:39:49 +0300,
    Giorgos Keramidas wrote:
    > On 26 Oct 2006 14:18:21 -0700, tomaddox@gmail.com wrote:
    >> I'm using gcc version 3.4.6 (Sunfreeware package) and GNU ld 2.11.2.
    >>
    >> If I run it with Sun's compiler, the configure fails with the
    >> following errors in config.log:
    >>
    >> [...]
    >> Using gcc, the configure runs fine, but then make craps out like so:
    >>
    >> make[2]: Entering directory `/zircon/opt/krb5-1.5.1/src/util/support'
    >> /zircon/opt/usr/local/bin/gcc -fPIC -DSHARED -I../../include
    >> -I./../../include -I. -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1 -g -O2
    >> -Wall -Wmissing-prototypes -Wcast-qual -Wcast-align -Wconversion
    >> -Wshadow -pedantic -D_REENTRANT -pthreads -c threads.c -o threads.so.o
    >> && mv -f threads.so.o threads.so
    >> threads.c:36: warning: missing braces around initializer
    >> threads.c:36: warning: (near initialization for
    >> `krb5int_thread_support_init__once.once.o.__pthrea d_once_pad')

    > [...]
    >
    > Where does -pedantic and all those -Wfoo flags come from?
    >
    > Do you have CFLAGS or CC set in your environment at all?


    On 26 Oct 2006 14:44:17 -0700, tomaddox@gmail.com wrote:
    >Giorgos Keramidas wrote:
    >> Where does -pedantic and all those -Wfoo flags come from?

    >
    > I presume they're set by the configure script when it's constructing
    > the makefiles.


    GCC 3.4 is going to warn for many more things with -pedantic than
    without it, so this may be the cause of some of the warnings and errors
    you see.

    >> Do you have CFLAGS or CC set in your environment at all?

    >
    > CFLAGS is unset; CC is set to point to gcc.


    Right. Then it's a bug in the configure & build system of the
    particular application.

    If you have the experience to work with autoconf-based builds, then the
    real fix may range from easy to completely obnoxious. I can't tell
    without access to a Solaris 6 system, the tools you are using *and* the
    original KRB5 sources though.

    The build error you are seeing now seems to be near:

    | Copied from message <1161897501.597877.282030@i3g2000cwc.googlegroups.c om>
    | [...]
    | fake-addrinfo.c: At top level:
    | fake-addrinfo.c:1331: error: variable `krb5int_in6addr_any' has \
    | initializer but incomplete type
    | fake-addrinfo.c:1331: error: `IN6ADDR_ANY_INIT' undeclared here \
    | (not in a function)
    | fake-addrinfo.c: In function `krb5int_getnameinfo': fake-addrinfo.c:1355: \
    | warning: passing arg 4 of `my_fake_getnameinfo' as signed due to prototype
    | fake-addrinfo.c:1355: warning: passing arg 6 of `my_fake_getnameinfo' \
    | as signed due to prototype
    | fake-addrinfo.c: At top level:
    | fake-addrinfo.c:1331: error: storage size of `krb5int_in6addr_any' isn't known
    | fake-addrinfo.c:1317: warning: 'krb5int_lock_fac' defined but not used
    | fake-addrinfo.c:1326: warning: 'krb5int_unlock_fac' defined but not used

    I don't know if Solaris 6 has a definition of `IN6ADDR_ANY_INIT', but on
    a Solaris 10 system here I can see it in `/usr/include/netinet/in.h':

    | % pwd
    | /usr/include
    | % gfgrep -r IN6ADDR_ANY_INIT .
    | ./netinet/in.h: * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
    | ./netinet/in.h: * const struct in6_addr IN6ADDR_ANY_INIT;
    | ./netinet/in.h:#define IN6ADDR_ANY_INIT { 0, 0, 0, 0 }
    | ./netinet/in.h:#define IN6ADDR_ANY_INIT { 0, 0, 0, 0, \
    | ./resolv.h:#ifdef IN6ADDR_ANY_INIT
    | %

    If Solaris 6 has the same definition too, then you will have to find out
    why `fake-addrinfo.c' fails to include `/usr/include/netinet/in.h'.


  6. Re: Compile problems on Solaris 2.6

    Giorgos Keramidas wrote:
    > I don't know if Solaris 6 has a definition of `IN6ADDR_ANY_INIT', but on
    > a Solaris 10 system here I can see it in `/usr/include/netinet/in.h':
    >
    > | % pwd
    > | /usr/include
    > | % gfgrep -r IN6ADDR_ANY_INIT .
    > | ./netinet/in.h: * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
    > | ./netinet/in.h: * const struct in6_addr IN6ADDR_ANY_INIT;
    > | ./netinet/in.h:#define IN6ADDR_ANY_INIT { 0, 0, 0, 0 }
    > | ./netinet/in.h:#define IN6ADDR_ANY_INIT { 0, 0, 0, 0, \
    > | ./resolv.h:#ifdef IN6ADDR_ANY_INIT
    > | %
    >
    > If Solaris 6 has the same definition too, then you will have to find out
    > why `fake-addrinfo.c' fails to include `/usr/include/netinet/in.h'.


    Right. Per an email I received, the MIT Kerberos team doesn't test on
    Solaris versions prior to 9, and Solaris 2.6 didn't have an IP version
    6 implementation, so ipv6 compatibility is configured into MIT's krb5
    by default. It looks like I have three options to deal with this
    issue:

    1) Hack the Kerberos code to tell it not to include ipv6
    2) Upgrade Solaris
    3) Use a different Kerberos implementation

    I can't *really* blame MIT for not testing compatibility with a
    decade-old Solaris release, but I do wish they'd included a configure
    option for disabling ipv6.


  7. Re: Compile problems on Solaris 2.6

    To follow up, I started pulling out references to IPV6 and INET6
    whenever they caused make to fail. Now I'm getting the following
    errors in addrinfo-test.c:

    making all in tests/resolve...
    make[2]: Entering directory `/zircon/opt/krb5-1.5.1/src/tests/resolve'
    gcc -DPACKAGE_NAME=\"Kerberos\ 5\" -DPACKAGE_TARNAME=\"krb5\"
    -DPACKAGE_VERSION=\"1.5.1\" -DPACKAGE_STRING=\"Kerberos\ 5\ 1.5.1\"
    -DPACKAGE_BUGREPORT=\"krb5-bugs@mit.edu\" -DHAVE_BT_RSEQ=1
    -DHAVE_LIBNSL=1 -DHAVE_LIBSOCKET=1 -DKRB5_DNS_LOOKUP_KDC=1
    -DKRB5_DNS_LOOKUP=1 -DHAVE_LIBRESOLV=1 -DHAVE_DN_SKIPNAME=1
    -DHAVE_RES_SEARCH=1 -DHAVE_PRAGMA_WEAK_REF=1 -DDELAY_INITIALIZER=1
    -DCONSTRUCTOR_ATTR_WORKS=1 -DDESTRUCTOR_ATTR_WORKS=1 -DENABLE_THREADS=1
    -DHAVE_PTHREAD=1 -DHAVE_PTHREAD_ONCE=1 -DUSE_DLOPEN=1 -DHAVE_REGCOMP=1
    -DSTDC_HEADERS=1 -DHAVE_STRCHR=1 -DHAVE_SYS_TYPES_H=1
    -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
    -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
    -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1
    -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_DLFCN_H=1
    -DHAVE_SEMAPHORE_H=1 -DRETSIGTYPE=void -DPOSIX_SIGNALS=1
    -I../../include -I./../../include -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1
    -g -O2 -Wall -Wmissing-prototypes -Wcast-qual -Wcast-align
    -Wconversion -Wshadow -pedantic -D_REENTRANT -pthreads -c
    fake-addrinfo-test.c
    addrinfo-test.c: In function `protoname':
    addrinfo-test.c:62: error: `IPPROTO_NONE' undeclared (first use in this
    function)
    addrinfo-test.c:62: error: (Each undeclared identifier is reported only
    once
    addrinfo-test.c:62: error: for each function it appears in.)
    addrinfo-test.c: In function `usage':
    addrinfo-test.c:109: warning: string length `539' is greater than the
    length `509' ISO C89 compilers are required to support
    addrinfo-test.c: In function `main':
    addrinfo-test.c:132: error: storage size of 'hints' isn't known
    addrinfo-test.c:197: error: `AI_PASSIVE' undeclared (first use in this
    function)
    addrinfo-test.c:205: error: `AI_CANONNAME' undeclared (first use in
    this function)
    addrinfo-test.c:246: warning: implicit declaration of function
    `getaddrinfo'
    addrinfo-test.c:248: error: `EAI_SYSTEM' undeclared (first use in this
    function)
    addrinfo-test.c:248: warning: implicit declaration of function
    `gai_strerror'
    addrinfo-test.c:258: error: dereferencing pointer to incomplete type
    addrinfo-test.c:259: error: `NI_MAXHOST' undeclared (first use in this
    function)
    addrinfo-test.c:259: error: `NI_MAXSERV' undeclared (first use in this
    function)
    addrinfo-test.c:263: error: dereferencing pointer to incomplete type
    addrinfo-test.c:265: error: dereferencing pointer to incomplete type
    addrinfo-test.c:265: error: dereferencing pointer to incomplete type
    addrinfo-test.c:266: error: dereferencing pointer to incomplete type
    addrinfo-test.c:266: error: dereferencing pointer to incomplete type
    addrinfo-test.c:268: error: dereferencing pointer to incomplete type
    addrinfo-test.c:268: error: dereferencing pointer to incomplete type
    addrinfo-test.c:270: warning: implicit declaration of function
    `getnameinfo'
    addrinfo-test.c:270: error: dereferencing pointer to incomplete type
    addrinfo-test.c:270: error: dereferencing pointer to incomplete type
    addrinfo-test.c:271: error: `NI_NUMERICHOST' undeclared (first use in
    this function)
    addrinfo-test.c:271: error: `NI_NUMERICSERV' undeclared (first use in
    this function)
    addrinfo-test.c:275: error: dereferencing pointer to incomplete type
    addrinfo-test.c:276: error: dereferencing pointer to incomplete type
    addrinfo-test.c:277: error: dereferencing pointer to incomplete type
    addrinfo-test.c:277: warning: void format, addrinfo arg (arg 2)
    addrinfo-test.c:278: error: dereferencing pointer to incomplete type
    addrinfo-test.c:279: error: dereferencing pointer to incomplete type
    addrinfo-test.c:280: error: dereferencing pointer to incomplete type
    addrinfo-test.c:288: error: dereferencing pointer to incomplete type
    addrinfo-test.c:288: error: dereferencing pointer to incomplete type
    addrinfo-test.c:289: error: `NI_NAMEREQD' undeclared (first use in this
    function)
    addrinfo-test.c:259: warning: unused variable `hbuf'
    addrinfo-test.c:259: warning: unused variable `pbuf'
    addrinfo-test.c:132: warning: unused variable `hints'
    make[2]: *** [addrinfo-test.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    In file included from fake-addrinfo-test.c:2:
    addrinfo-test.c: In function `protoname':
    addrinfo-test.c:62: error: `IPPROTO_NONE' undeclared (first use in this
    function)
    addrinfo-test.c:62: error: (Each undeclared identifier is reported only
    once
    addrinfo-test.c:62: error: for each function it appears in.)
    addrinfo-test.c: In function `usage':
    addrinfo-test.c:109: warning: string length `539' is greater than the
    length `509' ISO C89 compilers are required to support
    addrinfo-test.c: In function `main':
    addrinfo-test.c:271: warning: passing arg 2 of `krb5int_getnameinfo' as
    signed due to prototype
    addrinfo-test.c:277: warning: void format, my_fake_addrinfo arg (arg 2)
    addrinfo-test.c:289: warning: passing arg 2 of `krb5int_getnameinfo' as
    signed due to prototype
    make[2]: *** [fake-addrinfo-test.o] Error 1
    make[2]: Leaving directory `/zircon/opt/krb5-1.5.1/src/tests/resolve'
    make[1]: *** [all-recurse] Error 1
    make[1]: Leaving directory `/zircon/opt/krb5-1.5.1/src/tests'
    make: *** [all-recurse] Error 1

    Any thoughts on these?


+ Reply to Thread