cc(1) errors in libc includes

From: Florian Limberger <flo_at_snakeoilproductions.net>
Date: Sun, 16 Jul 2017 18:03:34 +0200
Hi -current,

today I built -CURRENT for the first time in a VM and installed from nfs
mounts. But now cc(1) from base seems to be broken, as it fails
compiling a simple hello-world program with errors in include files from
the libc. The previously installed clang40 works just fine for this
task, but since I lost track of -CURRENT around the time of the ino64
changes, I don't necessarily trust it to do the right thing.

Do you have any solutions for me how to get the compiler working again?

Below the uname info and the actual error messages:

 > # uname -a
 > FreeBSD nachtschatten 12.0-CURRENT FreeBSD 12.0-CURRENT #1 
aa8f1c64d43(master): Sun Jul 16 09:41:10 UTC 2017 
root_at_:/usr/obj/usr/src/sys/GENERIC-NODEBUG  amd64

 > # cat test.c
 > #include <stdio.h>
 >
 > int
 > main(void)
 > {
 >         printf("hello, world!\n");
 > }
 > # cc test.c
 > In file included from test.c:1:
 > In file included from /usr/include/stdio.h:41:
 > /usr/include/sys/_types.h:117:19: error: array is too large (128 
elements)
 >         char            __mbstate8[128];
 >                                    ^~~
 > In file included from test.c:1:
 > /usr/include/stdio.h:139:22: error: array is too large (3 elements)
 >         unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
 >                             ^
 > /usr/include/stdio.h:140:22: error: array is too large (1 elements)
 >         unsigned char _nbuf[1]; /* guarantee a getc() buffer */
 >                             ^
 > /usr/include/stdio.h:290:24: error: integer constant expression 
evaluates to value 3 that cannot be represented in a 32-bit unsigned 
integer type
 >             ...) __printflike(3, 4);
 >                               ^
 > /usr/include/stdio.h:292:18: error: integer constant expression 
evaluates to value 2 that cannot be represented in a 32-bit unsigned 
integer type
 >             __scanflike(2, 0);
 >                         ^
 > /usr/include/stdio.h:293:61: error: integer constant expression 
evaluates to value 1 that cannot be represented in a 32-bit unsigned 
integer type
 > int      vscanf(const char * __restrict, __va_list) __scanflike(1, 0);
 >                                                                 ^
 > /usr/include/stdio.h:295:30: error: integer constant expression 
evaluates to value 3 that cannot be represented in a 32-bit unsigned 
integer type
 >             __va_list) __printflike(3, 0);
 >                                     ^
 > /usr/include/stdio.h:297:18: error: integer constant expression 
evaluates to value 2 that cannot be represented in a 32-bit unsigned 
integer type
 >             __scanflike(2, 0);
 >                         ^
 > /usr/include/stdio.h:361:69: error: integer constant expression 
evaluates to value 2 that cannot be represented in a 32-bit unsigned 
integer type
 > int      vdprintf(int, const char * __restrict, __va_list) 
__printflike(2, 0);
 >                                                                         ^
 > /usr/include/stdio.h:364:62: error: integer constant expression 
evaluates to value 2 that cannot be represented in a 32-bit unsigned 
integer type
 > int      dprintf(int, const char * __restrict, ...) __printflike(2, 3);
 >                                                                  ^
 > /usr/include/stdio.h:371:56: error: integer constant expression 
evaluates to value 2 that cannot be represented in a 32-bit unsigned 
integer type
 > int      asprintf(char **, const char *, ...) __printflike(2, 3);
 >                                                            ^
 > /usr/include/stdio.h:381:19: error: integer constant expression 
evaluates to value 2 that cannot be represented in a 32-bit unsigned 
integer type
 >             __printflike(2, 0);
 >                          ^
 > 12 errors generated.

Regards


flo
Received on Sun Jul 16 2017 - 14:11:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:12 UTC