LinuxSir.cn,穿越时空的Linuxsir!

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

交叉编译在glibc时出错

[复制链接]
发表于 2005-11-24 16:26:00 | 显示全部楼层 |阅读模式
各路高手们,我在为arm板制作交叉编译器的时候遇到很多错误,请大家帮我寻找原因。
我的主机上用的redhat9.0,为arm制作交叉编译环境:其中使用的组件为:binutil-2.10.1 gcc-2.95.3 glibc-2.2.3 glibc-linuxthreads-2.2.3 gdb-5.0

我在对binutil-2.10.1 和gcc-2.95.3 进行操作时都很顺利,接下来对glibc-2.2.3操作
$ ../glibc-2.2.3/configure --target=arm-linux --prefix=/usr/local --enable-add-ons --with-headers=/usr/local/arm-linux/include
$ make

然后出现如下错误:
from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:23,
from gconv_db.c:26:
../linuxthreads/sysdeps/pthread/pthread.h:163: parse error before "__thread"
../linuxthreads/sysdeps/pthread/pthread.h:165: `pthread_create' declared as function returning a function
../linuxthreads/sysdeps/pthread/pthread.h:165: warning: function declaration isn't a prototype
../linuxthreads/sysdeps/pthread/pthread.h:166: parse error before "void"
../linuxthreads/sysdeps/pthread/pthread.h:591: storage class specified for parameter `type name'
In file included from ../linuxthreads/sysdeps/pthread/pthread.h:655,
from ../include/pthread.h:1,
from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:23,
from gconv_db.c:26:
../linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h:36: storage class specified for parameter `type name'
gconv_charset.h:51: warning: `upstr' defined but not used
make[2]: *** [/usr/src/build/glibc/iconv/gconv_db.o] Error 1
make[2]: Leaving directory `/usr/src/tars/glibc-2.2.3/iconv'
make[1]: *** [iconv/subdir_lib] Error 2
make[1]: Leaving directory `/usr/src/tars/glibc-2.2.3'
make: *** [all] Error 2

我在网上找了许久,也看到过有人出现过这种错误,可是就是没有找到解决的办法,请知道如何解决这个问题的高手们为我指点一下,感激不尽!!
发表于 2005-11-25 00:42:46 | 显示全部楼层
perl -pi -e s'/__thread/__thread_param/'
../glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h
perl -pi -e s'/__thread/__thread_param/'
../glibc-2.2.5/linuxthreads/sysdeps/pthread/pthread.h

我不懂C,抄的。你试试。我觉得原因是接口改变了,导致错误。
回复 支持 反对

使用道具 举报

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

本版积分规则

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