Subject: Re: current isn't building and I think it's /usr/src/sys/sys/endian.h
To: walt <wa1ter@myrealbox.com>
From: Nicolas Joly <njoly@pasteur.fr>
List: current-users
Date: 12/28/2005 16:45:19
On Wed, Dec 28, 2005 at 07:35:39AM -0800, walt wrote:
> On Tue, 2005-12-27 at 12:26 -0500, Perry E. Metzger wrote:
> 
> > I've now done the __inline thing for the small number of include files
> > where it was user visible, so anything C89 or after should now be
> > fine. (I'll be doing more testing to see if I missed something).
> 
> Hi Perry,
> 
> I've updated my -current but I'm still seeing this error:
> 
> gcc -o dummy dummy.c  -pipe -ansi -Wall  -lpthread  
> In file included from /usr/include/machine/endian_machdep.h:7,
>                  from /usr/include/sys/endian.h:78,
>                  from /usr/include/machine/endian.h:3,
>                  from /usr/include/sys/types.h:98,
>                  from /usr/include/sys/time.h:38,
>                  from /usr/include/time.h:131,
>                  from /usr/include/pthread.h:44,
>                  from dummy.c:2:
> /usr/include/machine/byte_swap.h:49: error: syntax error before "__uint32_t"
> 
> The byte_swap.h still uses 'inline', which I think is causing the problem(?)
> (This is on i386, BTW.)

Same on -current amd64, while trying to compile XFree86 CVS (not xsrc) :

cd ./config/imake && make -f Makefile.proto imakeonly
gcc -O2 -ansi -Dasm=__asm -Wall -Wpointer-arith -Wundef  -Wno-char-subscripts -Wno-shadow   -I. -I../../include  -I../../exports/include   -DCSRG_BASED   -DFUNCPROTO=15 -DNARROWPROTO     -DCPP_PROGRAM="\"cpp\"" -DHAS_MERGE_CONSTANTS=`if gcc -fmerge-constants -xc /dev/null -S -o /dev/null 2> /dev/null 1> /dev/null; then echo 1; else echo 0; fi`           -c imake.c
In file included from /usr/include/machine/endian_machdep.h:7,
                 from /usr/include/sys/endian.h:78,
                 from /usr/include/machine/endian.h:3,
                 from /usr/include/sys/types.h:98,
                 from /usr/include/sys/param.h:89,
                 from imake.c:149:
/usr/include/machine/byte_swap.h:48: error: syntax error before "u_int32_t"
/usr/include/machine/byte_swap.h:49: error: syntax error before "u_int16_t"
/usr/include/machine/byte_swap.h:51: error: syntax error before "u_int32_t"
/usr/include/machine/byte_swap.h:58: error: syntax error before "u_int16_t"
In file included from /usr/include/x86/lock.h:50,
                 from /usr/include/machine/lock.h:3,
                 from /usr/include/sys/lock.h:87,
                 from /usr/include/sys/ucred.h:37,
                 from /usr/include/sys/sysctl.h:44,
                 from imake.c:151:
/usr/include/machine/cpufunc.h:51: error: syntax error before "void"
/usr/include/machine/cpufunc.h:57: error: syntax error before "void"
In file included from /usr/include/x86/lock.h:61,
                 from /usr/include/machine/lock.h:3,
                 from /usr/include/sys/lock.h:87,
                 from /usr/include/sys/ucred.h:37,
                 from /usr/include/sys/sysctl.h:44,
                 from imake.c:151:
/usr/include/machine/atomic.h:43: error: syntax error before "u_int64_t"
/usr/include/machine/atomic.h:49: error: syntax error before "u_int32_t"
/usr/include/machine/atomic.h:57: error: syntax error before "__int32_t"
/usr/include/machine/atomic.h:65: error: syntax error before "void"
/usr/include/machine/atomic.h:70: error: syntax error before "void"
/usr/include/machine/atomic.h:77: error: syntax error before "void"
/usr/include/machine/atomic.h:82: error: syntax error before "void"
In file included from /usr/include/machine/lock.h:3,
                 from /usr/include/sys/lock.h:87,
                 from /usr/include/sys/ucred.h:37,
                 from /usr/include/sys/sysctl.h:44,
                 from imake.c:151:
/usr/include/x86/lock.h:63: error: syntax error before "void"
/usr/include/x86/lock.h:65: error: syntax error before "void"
/usr/include/x86/lock.h:67: error: syntax error before "int"
/usr/include/x86/lock.h:69: error: syntax error before "void"
/usr/include/x86/lock.h:72: error: syntax error before "void"
/usr/include/x86/lock.h:80: error: syntax error before "void"
/usr/include/x86/lock.h:93: error: syntax error before "int"
/usr/include/x86/lock.h:104: error: syntax error before "void"
In file included from imake.c:151:
/usr/include/sys/sysctl.h:1218: error: syntax error before "const"
*** Error code 1

Thanks.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.