Error compiling buildworld

TooMany Secrets toomany at toomany.net
Sat Mar 22 09:08:59 PDT 2008


On Sat, Mar 22, 2008 at 4:40 PM, Jeremy Chadwick <koitsu at freebsd.org> wrote:
>  $ gcc -v

[toomany] root@~# gcc -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]

>  $ echo 'int main(void) { return 0; }' > tmp.c
>  $ gcc -Wchar-subscripts -o x tmp.c

Humm... This works fine in user mode... But, I don't understand why,
if I commented all ccache flags in make.conf an .cshrc's root, with or
without CFLAGS, in make.conf, etc, the output *was* the same???

>  $ uname -mnrs

FreeBSD toomany.toomany.net 7.0-RELEASE i386

>  $ echo 'int main(void) { return 0; }' > tmp.c
>  $ gcc -Wchar-subscripts -o x tmp.c

This works fine under a normal user. Under root... also!!!
(note that I really make a strong verification about ccache use;
deleted from make.conf, deleted from .cshrc's root and deleted port
ccache).

>  It can't be.  You're redefining CC in make.conf, for example, so this
>  output would not be the same:
>
>  CC='/usr/local/libexec/ccache/world-cc'  {...}  /usr/local/libexec/ccache/world-cc {...}
>
>  I don't mean to sound anal about it, but there's definitely something
>  unique your system which is causing this; choosing a separate compiler
>  or compiler wrapper is the most obvious cause.

One thing I don't know about it, is the "cc1"... There isn't any "cc1"
in the system, and also anything about ccache with it (sorry for my
bad english).

>  I should note that use of ?= won't fix your reported problem with
>  -Wchar-subscripts.  I was just pointing out that you should use it to
>  allow programs to override your settings -- because there are many cases
>  where programs use specific CFLAGS to build things correctly.
>  Overriding them can break that.

I'm trying to make a buildworld now, and at the moment... But here it
is; without ccache and only with system's gcc:

cc -O2 -fno-strict-aliasing -pipe -march=prescott -DIN_GCC
-DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -finhibit-size-direc
tive -fno-inline-functions  -fno-exceptions
-fno-zero-initialized-in-bss  -fno-zero-initialized-in-bss
-fno-toplevel-reorder -I/
usr/src/gnu/lib/csu/../../../contrib/gcclibs/include
-I/usr/src/gnu/lib/csu/../../../contrib/gcc/config
-I/usr/src/gnu/lib/csu/.
./../../contrib/gcc -I.
-I/usr/src/gnu/lib/csu/../../usr.bin/cc/cc_tools -std=gnu89  -g0
-DCRT_BEGIN -DCRTSTUFFT_O  -c -o crtbe
ginT.o /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c
cc -O2 -fno-strict-aliasing -pipe -march=prescott -DIN_GCC
-DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -finhibit-size-direc
tive -fno-inline-functions  -fno-exceptions
-fno-zero-initialized-in-bss  -fno-zero-initialized-in-bss
-fno-toplevel-reorder -I/
usr/src/gnu/lib/csu/../../../contrib/gcclibs/include
-I/usr/src/gnu/lib/csu/../../../contrib/gcc/config
-I/usr/src/gnu/lib/csu/.
./../../contrib/gcc -I.
-I/usr/src/gnu/lib/csu/../../usr.bin/cc/cc_tools -std=gnu89  -g0
-DCRT_BEGIN -DCRTSTUFFS_O -DSHARED -fp
ic  -c -o crtbegin.So /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c
cc -O2 -fno-strict-aliasing -pipe -march=prescott -DIN_GCC
-DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -finhibit-size-direc
tive -fno-inline-functions  -fno-exceptions
-fno-zero-initialized-in-bss  -fno-zero-initialized-in-bss
-fno-toplevel-reorder -I/
usr/src/gnu/lib/csu/../../../contrib/gcclibs/include
-I/usr/src/gnu/lib/csu/../../../contrib/gcc/config
-I/usr/src/gnu/lib/csu/.
./../../contrib/gcc -I.
-I/usr/src/gnu/lib/csu/../../usr.bin/cc/cc_tools -std=gnu89  -g0
-DCRT_END -DCRTSTUFFS_O -DSHARED -fpic
  -c -o crtend.So /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c
sh /usr/src/tools/install.sh -o root -g wheel -m 444  crtbegin.o
/usr/obj/usr/src/tmp/usr/lib/crtbegin.o
sh /usr/src/tools/install.sh -o root -g wheel -m 444  crtend.o
/usr/obj/usr/src/tmp/usr/lib/crtend.o
sh /usr/src/tools/install.sh -o root -g wheel -m 444  crtbeginT.o
/usr/obj/usr/src/tmp/usr/lib/crtbeginT.o
sh /usr/src/tools/install.sh -o root -g wheel -m 444  crtbegin.So
/usr/obj/usr/src/tmp/usr/lib/crtbeginS.o
sh /usr/src/tools/install.sh -o root -g wheel -m 444  crtend.So
/usr/obj/usr/src/tmp/usr/lib/crtendS.o
===> lib/csu/i386-elf (obj,depend,all,install)
rm -f .depend
mkdep -f .depend -a    -I/usr/src/lib/csu/i386-elf/../common
-I/usr/src/lib/csu/i386-elf/../../libc/include /usr/src/lib/csu/i38
6-elf/crt1.c /usr/src/lib/csu/i386-elf/crti.S /usr/src/lib/csu/i386-elf/crtn.S
cc -O2 -fno-strict-aliasing -pipe -march=prescott
-I/usr/src/lib/csu/i386-elf/../common
-I/usr/src/lib/csu/i386-elf/../../libc/
include -Wsystem-headers -Wall -Wno-format-y2k -W
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith
 -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow
-Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested
-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crt1.c
cc1: error: unrecognized command line option "-Wchar-subscripts"
*** Error code 1

Stop in /usr/src/lib/csu/i386-elf.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src

This is without ccache and with CFLAGS... :-/
Really... I don't know what to do... :-(

Thank you Jeremy.

-- 
Have a nice day ;-)
TooManySecrets

============================
Dijo Confucio:
"Exígete mucho a ti mismo y espera poco de los demás. Así te ahorrarás
disgustos."
============================


More information about the freebsd-stable mailing list