LinuxSir.cn,穿越时空的Linuxsir!

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

求救:交叉编译出错

[复制链接]
发表于 2007-8-12 20:47:12 | 显示全部楼层 |阅读模式
我先安装了uclibc,好似安装不太成功,因为在$PREFIX/uclibc下没有生成bin目录,当然也就没有i386-uclibc-gcc和i386-uclibc-ld这两个文件了。接下来我安装gcc:
../gcc-3.4./configure --target=$TARGET --prefix=$PREFIX \
--enable-languages=c,c++
make all
于是就出现了如下错误:
../../gcc-3.2/gcc/gthr-posix.h: At top level:
../../gcc-3.2/gcc/gthr-posix.h:39: parse error before "__gthread_key_t"
../../gcc-3.2/gcc/gthr-posix.h:39: warning: type defaults to `int' in
declaration of `__gthread_key_t'
../../gcc-3.2/gcc/gthr-posix.h:39: warning: data definition has no type or
storage class
../../gcc-3.2/gcc/gthr-posix.h:40: parse error before "__gthread_once_t"
../../gcc-3.2/gcc/gthr-posix.h:40: warning: type defaults to `int' in
declaration of `__gthread_once_t'
../../gcc-3.2/gcc/gthr-posix.h:40: warning: data definition has no type or
storage class
../../gcc-3.2/gcc/gthr-posix.h:41: parse error before "__gthread_mutex_t"
../../gcc-3.2/gcc/gthr-posix.h:41: warning: type defaults to `int' in
declaration of `__gthread_mutex_t'
../../gcc-3.2/gcc/gthr-posix.h:41: warning: data definition has no type or
storage class
../../gcc-3.2/gcc/gthr-posix.h: In function `__gthread_active_p':
../../gcc-3.2/gcc/gthr-posix.h:83: `pthread_create' undeclared (first use in
this function)
../../gcc-3.2/gcc/gthr-posix.h:83: (Each undeclared identifier is reported
only once
../../gcc-3.2/gcc/gthr-posix.h:83: for each function it appears in.)
../../gcc-3.2/gcc/gthr-posix.h: At top level:
../../gcc-3.2/gcc/gthr-posix.h:438: parse error before '*' token
../../gcc-3.2/gcc/gthr-posix.h:438: parse error before ')' token
../../gcc-3.2/gcc/gthr-posix.h:447: parse error before '*' token
../../gcc-3.2/gcc/gthr-posix.h:447: parse error before ')' token
../../gcc-3.2/gcc/gthr-posix.h:453: parse error before "key"
../../gcc-3.2/gcc/gthr-posix.h:454: warning: function declaration isn't a
prototype
../../gcc-3.2/gcc/gthr-posix.h: In function `__gthread_key_dtor':
../../gcc-3.2/gcc/gthr-posix.h:456: `ptr' undeclared (first use in this
function)
../../gcc-3.2/gcc/gthr-posix.h:457: warning: implicit declaration of
function `pthread_setspecific'
../../gcc-3.2/gcc/gthr-posix.h:457: `key' undeclared (first use in this
function)
../../gcc-3.2/gcc/gthr-posix.h: At top level:
../../gcc-3.2/gcc/gthr-posix.h:463: parse error before "key"
../../gcc-3.2/gcc/gthr-posix.h:464: warning: function declaration isn't a
prototype
../../gcc-3.2/gcc/gthr-posix.h: In function `__gthread_key_delete':
../../gcc-3.2/gcc/gthr-posix.h:465: warning: implicit declaration of
function `pthread_key_delete'
../../gcc-3.2/gcc/gthr-posix.h:465: `key' undeclared (first use in this
function)
../../gcc-3.2/gcc/gthr-posix.h: At top level:
../../gcc-3.2/gcc/gthr-posix.h:469: parse error before "key"
../../gcc-3.2/gcc/gthr-posix.h:470: warning: function declaration isn't a
prototype
../../gcc-3.2/gcc/gthr-posix.h: In function `__gthread_getspecific':
../../gcc-3.2/gcc/gthr-posix.h:471: warning: implicit declaration of
function `pthread_getspecific'
../../gcc-3.2/gcc/gthr-posix.h:471: `key' undeclared (first use in this
function)
../../gcc-3.2/gcc/gthr-posix.h:471: warning: return makes pointer from
integer without a cast
../../gcc-3.2/gcc/gthr-posix.h: At top level:
../../gcc-3.2/gcc/gthr-posix.h:475: parse error before "key"
../../gcc-3.2/gcc/gthr-posix.h:476: warning: function declaration isn't a
prototype
../../gcc-3.2/gcc/gthr-posix.h: In function `__gthread_setspecific':
../../gcc-3.2/gcc/gthr-posix.h:477: `key' undeclared (first use in this
function)
../../gcc-3.2/gcc/gthr-posix.h:477: `ptr' undeclared (first use in this
function)
../../gcc-3.2/gcc/gthr-posix.h: At top level:
../../gcc-3.2/gcc/gthr-posix.h:481: parse error before '*' token
../../gcc-3.2/gcc/gthr-posix.h:482: warning: function declaration isn't a
prototype
../../gcc-3.2/gcc/gthr-posix.h: In function `__gthread_mutex_lock':
../../gcc-3.2/gcc/gthr-posix.h:484: warning: implicit declaration of
function `pthread_mutex_lock'
../../gcc-3.2/gcc/gthr-posix.h:484: `mutex' undeclared (first use in this
function)
../../gcc-3.2/gcc/gthr-posix.h: At top level:
../../gcc-3.2/gcc/gthr-posix.h:490: parse error before '*' token
../../gcc-3.2/gcc/gthr-posix.h:491: warning: function declaration isn't a
prototype
../../gcc-3.2/gcc/gthr-posix.h: In function `__gthread_mutex_trylock':
../../gcc-3.2/gcc/gthr-posix.h:493: warning: implicit declaration of
function `pthread_mutex_trylock'
../../gcc-3.2/gcc/gthr-posix.h:493: `mutex' undeclared (first use in this
function)
../../gcc-3.2/gcc/gthr-posix.h: At top level:
../../gcc-3.2/gcc/gthr-posix.h:499: parse error before '*' token
../../gcc-3.2/gcc/gthr-posix.h:500: warning: function declaration isn't a
prototype
../../gcc-3.2/gcc/gthr-posix.h: In function `__gthread_mutex_unlock':
../../gcc-3.2/gcc/gthr-posix.h:502: warning: implicit declaration of
function `pthread_mutex_unlock'
../../gcc-3.2/gcc/gthr-posix.h:502: `mutex' undeclared (first use in this
function)
../../gcc-3.2/gcc/unwind-dw2.c: In function `extract_cie_info':
../../gcc-3.2/gcc/unwind-dw2.c:226: warning: implicit declaration of
function `strlen'
../../gcc-3.2/gcc/unwind-dw2.c: In function `uw_frame_state_for':
../../gcc-3.2/gcc/unwind-dw2.c:899: warning: implicit declaration of
function `memset'
../../gcc-3.2/gcc/unwind-dw2.c: In function `uw_install_context_1':
../../gcc-3.2/gcc/unwind-dw2.c:1166: syntax error before "once_regsizes"
../../gcc-3.2/gcc/unwind-dw2.c:1167: warning: implicit declaration of
function `__gthread_once'
../../gcc-3.2/gcc/unwind-dw2.c:1167: `once_regsizes' undeclared (first use
in this function)
../../gcc-3.2/gcc/unwind-dw2.c:1181: warning: implicit declaration of
function `memcpy'
make[2]: *** [libgcc/./unwind-dw2.o] Error 1
我换了好几个版本的GCC,都是这样。如果在configure的时候disable-threads就不会出现这些问题,但是我可能很需要threads。

高手能否告诉我这是怎么回事呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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