Re: 2.1.3 - " cannot compute sizeof (char), 77" configure error

Theo Schlossnagle <[email protected]> Sat, 31 Mar 2007 08:51:35 -0400
Newsgroups gmane.comp.apache.mod-wackamole.general
Message-ID <[email protected]>
On Mar 28, 2007, at 5:18 PM, O'Brien, Nick wrote:

> Thanks Theo,
>
> Looks like my system header files might be broken (see below).  
> Although
> I installed gcc 3.4.6 straight from the packages on sunfreeware.com
>
> Does anyone on list know if this is definitely the case of my original
> problem and if so how to fix it?

The ip.h error doesn't seem like a killer.  The issue there is that  
you need to include netinet/in.h first.  But, since it is a configure  
script, it will just note it an continue.

> configure:5517: checking netinet/ip.h usability
> configure:5529: gcc -c -g -O2 -Wall  -I/usr/local/include
> -DDONT_USE_THREADS con
> ftest.c >&5
> In file included from conftest.c:91:
> /usr/include/netinet/ip.h:61: error: field `ip_src' has incomplete  
> type
> /usr/include/netinet/ip.h:61: error: field `ip_dst' has incomplete  
> type
> /usr/include/netinet/ip.h:134: error: field `ipt_addr' has incomplete
> type
> configure:5535: $? = 1
> ..
> ..
> ..
> configure:5822: checking for inet_aton
> configure:5879: gcc -o conftest -g -O2 -Wall  -I/usr/local/include
> -DDONT_USE_TH
> READS  -L/usr/local/lib -W1,-rpath=/usr/local/lib conftest.c -ldl
> -lsocket -lnsl
>   -lspread >&5
> Undefined                       first referenced
>  symbol                             in file
> inet_aton                           /var/tmp//ccO5JEEE.o
> ld: fatal: Symbol referencing errors. No output written to conftest
> collect2: ld returned 1 exit status

I don't have a Solaris 9 box around.  On my solaris 8,10 and  
opensolaris machines:

Solaris 8:
; grep inet_aton */*
arpa/inet.h:extern      int     inet_aton(const char *, struct  
in_addr *);

Solaris 10:
; grep inet_aton */*
arpa/inet.h:extern int inet_aton(const char *, struct in_addr *);
arpa/inet.h:extern int inet_aton();

Notably, nm shows inet_aton to be in libnsl on solaris 10 and not on  
solaris 8.  I assume it is missing on Solaris 9 as well.

Looking at the code, it appears we may have used inet_aton in the  
past, but no longer use it.  So, you should be able to remove  
inet_aton from the configure.in file and rerun autoconf.  Though,  
that check should be a check only -- it should just not that you  
don't have it (and rightfully so).  It doesn't look like the rest of  
the wackamole code needs that function to operate.

The "cannot compute sizeof (char), 77" is likely something to do with  
no being able to find one of the libraries (spread). The sizeof  
checks are the first checks in the script that _run_ anything, the  
preceding are just compile/link tests.  So, I'm guessing that it can  
find the lbi to link, but not to run. (run path problem).  As a note:

-W1,-rpath=/usr/local/lib

Should likely be:

-Wl,-rpath=/usr/local/lib

Also, consider running Sun Studio 11.  It's free, excellent and  
produces much much better Sparc binaries than gcc and doesn't make  
you tote around the libgcc_s nonsense.  If you use Sun's compiler,  
you can use -R/usr/local/lib like with most other compilers to  
specify your run path.

// Theo Schlossnagle
// Principal@OmniTI: http://omniti.com
// Esoteric Curio: http://www.lethargy.org/~jesus/