LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1355|回复: 1

编译gcc4.4.3时出错

[复制链接]
发表于 2010-7-10 15:15:36 | 显示全部楼层 |阅读模式
Hi,all
在configure
cd gcc-build
../gcc-4.4.3/configure --target=$LFS_TGT --prefix=/tools --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable--threads --disable-libmudflap --disable-libssp --disable-libgomp --enable-languages=c
正常后,执行make编译大约30分钟时报如下错误,
In file included from ../.././gcc/gthr-default.h:1,
                 from ../../../gcc-4.4.3/libgcc/../gcc/gthr.h:162,
                 from ../../../gcc-4.4.3/libgcc/../gcc/unwind-dw2.c:37:
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:41:21: error: pthread.h: No such file or directory
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:42:20: error: unistd.h: No such file or directory
In file included from ../.././gcc/gthr-default.h:1,
                 from ../../../gcc-4.4.3/libgcc/../gcc/gthr.h:162,
                 from ../../../gcc-4.4.3/libgcc/../gcc/unwind-dw2.c:37:
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_t'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_key_t'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_once_t'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_mutex_t'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_recursive_mutex_t'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_cond_t'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:118: error: 'pthread_once' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:118: warning: type defaults to 'int' in declaration of '__gthrw_pthread_once'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:119: error: 'pthread_getspecific' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:119: warning: type defaults to 'int' in declaration of '__gthrw_pthread_getspecific'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:120: error: 'pthread_setspecific' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:120: warning: type defaults to 'int' in declaration of '__gthrw_pthread_setspecific'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:122: error: 'pthread_create' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:122: warning: type defaults to 'int' in declaration of '__gthrw_pthread_create'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:123: error: 'pthread_join' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:123: warning: type defaults to 'int' in declaration of '__gthrw_pthread_join'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:124: error: 'pthread_equal' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:124: warning: type defaults to 'int' in declaration of '__gthrw_pthread_equal'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:125: error: 'pthread_self' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:125: warning: type defaults to 'int' in declaration of '__gthrw_pthread_self'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:126: error: 'pthread_detach' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:126: warning: type defaults to 'int' in declaration of '__gthrw_pthread_detach'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:127: error: 'pthread_cancel' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:127: warning: type defaults to 'int' in declaration of '__gthrw_pthread_cancel'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:128: error: 'sched_yield' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:128: warning: type defaults to 'int' in declaration of '__gthrw_sched_yield'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:130: error: 'pthread_mutex_lock' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:130: warning: type defaults to 'int' in declaration of '__gthrw_pthread_mutex_lock'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:131: error: 'pthread_mutex_trylock' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:131: warning: type defaults to 'int' in declaration of '__gthrw_pthread_mutex_trylock'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:137: error: 'pthread_mutex_unlock' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:137: warning: type defaults to 'int' in declaration of '__gthrw_pthread_mutex_unlock'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:138: error: 'pthread_mutex_init' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:138: warning: type defaults to 'int' in declaration of '__gthrw_pthread_mutex_init'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:139: error: 'pthread_mutex_destroy' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:139: warning: type defaults to 'int' in declaration of '__gthrw_pthread_mutex_destroy'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:141: error: 'pthread_cond_broadcast' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:141: warning: type defaults to 'int' in declaration of '__gthrw_pthread_cond_broadcast'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:142: error: 'pthread_cond_signal' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:142: warning: type defaults to 'int' in declaration of '__gthrw_pthread_cond_signal'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:143: error: 'pthread_cond_wait' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:143: warning: type defaults to 'int' in declaration of '__gthrw_pthread_cond_wait'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:144: error: 'pthread_cond_timedwait' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:144: warning: type defaults to 'int' in declaration of '__gthrw_pthread_cond_timedwait'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:145: error: 'pthread_cond_destroy' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:145: warning: type defaults to 'int' in declaration of '__gthrw_pthread_cond_destroy'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:148: error: 'pthread_key_create' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:148: warning: type defaults to 'int' in declaration of '__gthrw_pthread_key_create'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:149: error: 'pthread_key_delete' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:149: warning: type defaults to 'int' in declaration of '__gthrw_pthread_key_delete'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:150: error: 'pthread_mutexattr_init' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:150: warning: type defaults to 'int' in declaration of '__gthrw_pthread_mutexattr_init'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:151: error: 'pthread_mutexattr_settype' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:151: warning: type defaults to 'int' in declaration of '__gthrw_pthread_mutexattr_settype'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:152: error: 'pthread_mutexattr_destroy' undeclared here (not in a function)
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:152: warning: type defaults to 'int' in declaration of '__gthrw_pthread_mutexattr_destroy'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:676: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:683: error: expected ')' before '__threadid'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:689: error: expected ')' before '__threadid'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:695: error: expected ')' before '__t1'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:701: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_self'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h: In function '__gthread_yield':
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:709: error: called object '__gthrw_sched_yield' is not a function
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h: At top level:
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:713: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:722: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:728: error: expected ')' before '__key'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:734: error: expected ')' before '__key'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:740: error: expected ')' before '__key'
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:746: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:755: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:764: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:787: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:797: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:819: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:825: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:842: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:848: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:854: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:860: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:866: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:873: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:880: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/gthr-posix.h:888: error: expected ')' before '*' token
../../../gcc-4.4.3/libgcc/../gcc/unwind-dw2.c: In function 'uw_init_context_1':
../../../gcc-4.4.3/libgcc/../gcc/unwind-dw2.c:1452: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'once_regsizes'
../../../gcc-4.4.3/libgcc/../gcc/unwind-dw2.c:1452: error: 'once_regsizes' undeclared (first use in this function)
../../../gcc-4.4.3/libgcc/../gcc/unwind-dw2.c:1452: error: (Each undeclared identifier is reported only once
../../../gcc-4.4.3/libgcc/../gcc/unwind-dw2.c:1452: error: for each function it appears in.)
../../../gcc-4.4.3/libgcc/../gcc/unwind-dw2.c:1452: error: 'PTHREAD_ONCE_INIT' undeclared (first use in this function)
../../../gcc-4.4.3/libgcc/../gcc/unwind-dw2.c:1453: warning: implicit declaration of function '__gthread_once'
make[2]: *** [unwind-dw2.o] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2

系统平台为vmware 5+LFSlivecd 6.3 参考文档:LFS-BOOK-6.6
HP500 laptop(Intel(R) Pentium(R)2.26G) +2G RAM+60G disk)
 楼主| 发表于 2010-7-10 15:47:59 | 显示全部楼层
问题已解决,可能是因为删掉了binutils-2.20 目录和binutils-build目录导致
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表