[...] make[3]: Entering directory `/tmp/gcc-4.1.1/host-i686-pc-linux-gnu/stage1-gcc' make \ CFLAGS="-g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute " \ CONFIG_H="tconfig.h auto-host.h ../.././gcc/../include/ansidecl.h" TM_H="tm.h options.h ../.././gcc/config/i386/i386.h ../.././gcc/config/i386/unix.h ../.././gcc/config/i386/att.h ../.././gcc/config/dbxelf.h ../.././gcc/config/elfos.h ../.././gcc/config/svr4.h ../.././gcc/config/linux.h ../.././gcc/config/i386/linux.h ../.././gcc/defaults.h insn-constants.h insn-flags.h options.h" \ INCLUDES="-I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include " \ MAKEOVERRIDES= \ -f libgcc.mk all make[4]: Entering directory `/tmp/gcc-4.1.1/host-i686-pc-linux-gnu/stage1-gcc' /tmp/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/xgcc -B/tmp/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include -O2 -O2 -s -O3 -march=i686 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include -fexceptions -fvisibility=hidden -DHIDE_EXPORTS -c ../.././gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o In file included from ../.././gcc/gthr-posix.h:43, from ./gthr-default.h:1, from ../.././gcc/gthr.h:114, from ../.././gcc/unwind-dw2.c:42: /usr/include/pthread.h:163: error: expected ';', ',' or ')' before '__thread' /usr/include/pthread.h:591: error: storage class specified for parameter 'type name' In file included from /usr/include/pthread.h:655, from ../.././gcc/gthr-posix.h:43, from ./gthr-default.h:1, from ../.././gcc/gthr.h:114, from ../.././gcc/unwind-dw2.c:42: /usr/include/bits/sigthread.h:36: error: storage class specified for parameter 'type name' In file included from ./gthr-default.h:1, from ../.././gcc/gthr.h:114, from ../.././gcc/unwind-dw2.c:42: ../.././gcc/gthr-posix.h:91: error: 'pthread_create' undeclared here (not in a function) ../.././gcc/gthr-posix.h:91: warning: type defaults to 'int' in declaration of '__gthrw_pthread_create' make[4]: *** [libgcc/./unwind-dw2.o] Error 1 make[4]: Leaving directory `/tmp/gcc-4.1.1/host-i686-pc-linux-gnu/stage1-gcc' make[3]: *** [libgcc.a] Error 2 make[3]: Leaving directory `/tmp/gcc-4.1.1/host-i686-pc-linux-gnu/stage1-gcc' make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory `/tmp/gcc-4.1.1' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/tmp/gcc-4.1.1' make: *** [all] Error 2
/usr/include/pthread.h:163: error: expected ';', ',' or ')' before '__thread' /usr/include/pthread.h:591: error: storage class specified for parameter 'type name' so, whats wrong there? This is really not enough information.
/usr/include/pthread.h:163: error: expected ';', ',' or ')' before '__thread' Did you disable fixincludes? If so this is why you don't disable fixincludes :). If you did not, then you might be better off updating glibc since the old glibc headers are broken.
I didn't disable fixincludes. What is the minimum glibc version required ?
I have exactly the same problem (and errors) on Debian 3.0 (kernel v2.4.28) with gcc v2.95, make v3.79.1 and glibc v2.2.5. Used the following simple configure: './configure --enable-threads=posix --enable-languages=c,c++,java' ...and then 'make'
Ok "fixed" with: <download and unpack sources> mkdir mybuild cd mybuild ../gcc-4.1.1/configure --enable-threads=posix --enable-languages=c,c++,java make bootstrap make install Pierre you probably tried to configure/make directly from the source directory as I did. Don't know about the gcc internals why this fails and too lazy to crawl the docs but I guess there's a good reason ;)
building inside the src directory is not really supported.
Documentation says : First, we highly recommend that GCC be built into a separate directory than the sources which does not reside within the source tree. This is how we generally build GCC; building where srcdir == objdir should still work, but doesn't get extensive testing; building where objdir is a subdirectory of srcdir is unsupported.
Same problem with gcc 4.1.2