Bug 28298 - Problem compiling gcc 4.1.1
Summary: Problem compiling gcc 4.1.1
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-07 08:54 UTC by Pierre
Modified: 2007-04-10 00:02 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre 2006-07-07 08:54:16 UTC
[...]
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
Comment 1 Richard Biener 2006-07-07 11:39:57 UTC
/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.
Comment 2 Andrew Pinski 2006-07-07 16:37:01 UTC
/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.
Comment 3 Pierre 2006-07-08 14:09:43 UTC
I didn't disable fixincludes.
What is the minimum glibc version required ?
Comment 4 Sebastian Forsman 2006-08-15 15:46:16 UTC
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'
Comment 5 Sebastian Forsman 2006-08-15 17:09:20 UTC
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 ;)
Comment 6 Andrew Pinski 2006-11-14 06:07:55 UTC
building inside the src directory is not really supported.
Comment 7 Pierre 2007-04-09 23:32:21 UTC
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.
Comment 8 Pierre 2007-04-10 00:02:15 UTC
Same problem with gcc 4.1.2