This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
final gcc compiler can't find pthread.h even though it *is* in the include dir
- From: Vandra Akos <axos88 at yahoo dot com dot au>
- To: GCC Help <gcc-help at gcc dot gnu dot org>
- Date: Sat, 2 Jun 2007 03:33:33 -0700 (PDT)
- Subject: final gcc compiler can't find pthread.h even though it *is* in the include dir
Hello everyone,
I am trying to build a toolchain for arm-linux cross-development from a standard x86 PC. I've successfully build the gcc bootstrap compiler, and built the uClibc libraries with it. However, when I try to build the final gcc compiler, it fails.
It seems it can't find pthread.h even though it *IS* in the include path.
I've checked the makefile, and it reads
prefix = /home/akos/ARM/tools
(...)
includedir=${prefix}/include
akos@akosv:~/ARM/build-tools/build/gcc-final$ ls -l /home/akos/ARM/tools/include/ | grep pthread.h
-rw-r--r-- 1 akos akos 24823 2006-12-08 05:19 pthread.h
So the file exists. Why can't the gcc bootstrap find it?
I configured the final gcc compiler with
export TARGET=arm-linux
export PREFIX=/home/akos/ARM/tools
akos@akosv:~/ARM/build-tools/build/gcc-final$ ../../gcc-4.0.2/configure
--target=${TARGET} --prefix=${PREFIX} --program-prefix=${TARGET}-
--disable-threads --enable-languages=c --disable-libmudflap
--disable-shared
But when I issue make, it gives this error:
In file included from ./gthr-default.h:1,
from ../../../gcc-4.0.2/gcc/gthr.h:114,
from ../../../gcc-4.0.2/gcc/unwind-dw2.c:42:
../../../gcc-4.0.2/gcc/gthr-posix.h:43:21: error: pthread.h: No such file or directory
../../../gcc-4.0.2/gcc/gthr-posix.h:44:20: error: unistd.h: No such file or directory
In file included from ./gthr-default.h:1,
from ../../../gcc-4.0.2/gcc/gthr.h:114,
from ../../../gcc-4.0.2/gcc/unwind-dw2.c:42:
../../../gcc-4.0.2/gcc/gthr-posix.h:46: error: syntax error before ‘__gthread_key_t’
../../../gcc-4.0.2/gcc/gthr-posix.h:46: warning: type defaults to ‘int’ in declaration of ‘__gthread_key_t’
../../../gcc-4.0.2/gcc/gthr-posix.h:46: warning: data definition has no type or storage class
../../../gcc-4.0.2/gcc/gthr-posix.h:47: error: syntax error before ‘__gthread_once_t’
../../../gcc-4.0.2/gcc/gthr-posix.h:47: warning: type defaults to ‘int’ in declaration of ‘__gthread_once_t’
../../../gcc-4.0.2/gcc/gthr-posix.h:47: warning: data definition has no type or storage class
../../../gcc-4.0.2/gcc/gthr-posix.h:48: error: syntax error before ‘__gthread_mutex_t’
../../../gcc-4.0.2/gcc/gthr-posix.h:48: warning: type defaults to ‘int’ in declaration of ‘__gthread_mutex_t’
../../../gcc-4.0.2/gcc/gthr-posix.h:48: warning: data definition has no type or storage class
../../../gcc-4.0.2/gcc/gthr-posix.h:49: error: syntax error before ‘__gthread_recursive_mutex_t’
../../../gcc-4.0.2/gcc/gthr-posix.h:49: warning: type defaults to ‘int’ in declaration of ‘__gthread_recursive_mutex_t’
../../../gcc-4.0.2/gcc/gthr-posix.h:49: warning: data definition has no type or storage class
../../../gcc-4.0.2/gcc/gthr-posix.h: In function ‘__gthread_active_p’:
../../../gcc-4.0.2/gcc/gthr-posix.h:110: error: ‘pthread_cancel’ undeclared (first use in this function)
../../../gcc-4.0.2/gcc/gthr-posix.h:110: error: (Each undeclared identifier is reported only once
../../../gcc-4.0.2/gcc/gthr-posix.h:110: error: for each function it appears in.)
../../../gcc-4.0.2/gcc/gthr-posix.h: At top level:
(the list goes on for a few pages of text)
Can you help me fiugre out what is wrong?
Thanks,
Akos Vandra
_________________________________________________________________________________
How would you spend $50,000 to create a more sustainable environment in Australia? Go to Yahoo!7 Answers and share your idea.
http://advision.webevents.yahoo.com/aunz/lifestyle/answers/y7ans-babp_reg.html