Compile problems on Solaris 2.6

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Oct 27 10:18:07 EDT 2006


On Fri, 27 Oct 2006 00:39:49 +0300,
Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
> On 26 Oct 2006 14:18:21 -0700, tomaddox at 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.__pthread_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 at 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 at i3g2000cwc.googlegroups.com>
| [...]
| 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'.




More information about the Kerberos mailing list