免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 7128 | 回复: 20
打印 上一主题 下一主题

Debian下编译glibc库问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-26 16:19 |只看该作者 |倒序浏览
不知道为什么,在编译glibc时出现了以下的错误:
In file included from /home/star/armlinux/tools/arm-linux/include/linux/errno.h:4,
                 from ../sysdeps/unix/sysv/linux/bits/errno.h:25,
                 from ../stdlib/errno.h:36,
                 from ../include/errno.h:3,
                 from ../linuxthreads/sysdeps/pthread/errno-loc.c:21:
/home/star/armlinux/tools/arm-linux/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
In file included from /home/star/armlinux/tools/arm-linux/include/linux/errno.h:4,
                 from ../sysdeps/unix/sysv/linux/bits/errno.h:25,
                 from ../stdlib/errno.h:36,
                 from ../include/errno.h:3,
                 from ../sysdeps/generic/errno.c:20:
/home/star/armlinux/tools/arm-linux/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
In file included from /home/star/armlinux/tools/arm-linux/include/linux/errno.h:4,
                 from ../sysdeps/unix/sysv/linux/bits/errno.h:25,
                 from ../stdlib/errno.h:36,
                 from ../include/errno.h:3,
                 from ../sysdeps/generic/libc-tls.c:20:
/home/star/armlinux/tools/arm-linux/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
In file included from /home/star/armlinux/tools/arm-linux/include/linux/errno.h:4,
                 from ../sysdeps/unix/sysv/linux/bits/errno.h:25,
                 from ../stdlib/errno.h:36,
                 from ../include/errno.h:3,
                 from ../sysdeps/generic/check_fds.c:19:
/home/star/armlinux/tools/arm-linux/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
In file included from /home/star/armlinux/tools/arm-linux/include/linux/errno.h:4,
                 from ../sysdeps/unix/sysv/linux/bits/errno.h:25,
                 from ../sysdeps/unix/arm/sysdep.S:21,
                 from ../sysdeps/unix/sysv/linux/arm/sysdep.S:34:
/home/star/armlinux/tools/arm-linux/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
In file included from /home/star/armlinux/tools/arm-linux/include/linux/errno.h:4,
                 from ../sysdeps/unix/sysv/linux/bits/errno.h:25,
                 from ../sysdeps/unix/arm/sysdep.S:21,
                 from ../sysdeps/unix/sysv/linux/arm/sysdep.S:34:
/home/star/armlinux/tools/arm-linux/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
make[2]: *** [/home/star/armlinux/build-tools/build-glibc/csu/sysdep.o] Error 1
make[1]: *** [csu/subdir_lib] Error 2
这是什么错误,缺少asm-generic/errno.h文件?

论坛徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵节徽章
日期:2015-03-06 15:50:392015亚冠之大阪钢巴
日期:2015-06-12 16:01:352015年中国系统架构师大会
日期:2015-06-29 16:11:2815-16赛季CBA联赛之四川
日期:2018-12-17 14:10:21
2 [报告]
发表于 2009-09-26 16:52 |只看该作者
可以试试用buildroot或者crosstool

论坛徽章:
0
3 [报告]
发表于 2009-09-26 18:00 |只看该作者
我是想尝试下自己构建交叉工具链。现在我将获取头文件的kernel下的/include里的asm-generic文件夹复制到$TARGET_PREFIX/include/下咯。可是又出现新的错误啊。
/tmp/cc1CqGOw.s: Assembler messages:
/tmp/cc1CqGOw.s:71: Error: junk at end of line, first unrecognized character is `,'
/tmp/cc1CqGOw.s:73: Error: junk at end of line, first unrecognized character is `,'
make[2]: *** [/home/star/armlinux/build-tools/build-glibc/intl/localealias.o] Error 1
make[2]: Leaving directory `/home/star/armlinux/build-tools/glibc-2.3.2/intl'
make[1]: *** [intl/subdir_lib] Error 2
make[1]: Leaving directory `/home/star/armlinux/build-tools/glibc-2.3.2'
make: *** [all] Error 2

这下就不知道什么错啦

论坛徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵节徽章
日期:2015-03-06 15:50:392015亚冠之大阪钢巴
日期:2015-06-12 16:01:352015年中国系统架构师大会
日期:2015-06-29 16:11:2815-16赛季CBA联赛之四川
日期:2018-12-17 14:10:21
4 [报告]
发表于 2009-09-26 22:01 |只看该作者
看错误是编译的过程中产生的文件有问题
会不会是你的编译器的版本的问题呢?
换个其他版本的试试

论坛徽章:
0
5 [报告]
发表于 2009-09-28 09:17 |只看该作者
昨天,我把全部都重新编译一遍,到了glibc,还是那个问题。唉,这下可以不好办啊。我是按照别人博客介绍一步一步来的。为什么别人成功,我就不成功呢。不关主机linux版本问题吧,我是在Debian下编译的哦!要是换gcc应该换什么版本?CC=arm-linux-gcc ../glibc-2.2.3 /configure --host=$TARGET --prefix="/usr"--enable-add-ons --with-headers=$TARGET_PREFIX/include 这是编译glibc的命令。

论坛徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵节徽章
日期:2015-03-06 15:50:392015亚冠之大阪钢巴
日期:2015-06-12 16:01:352015年中国系统架构师大会
日期:2015-06-29 16:11:2815-16赛季CBA联赛之四川
日期:2018-12-17 14:10:21
6 [报告]
发表于 2009-09-28 10:45 |只看该作者
有个2.95.3的有个3.2.1的,有个4.3.2的
一般来说
你用2.95.3或者3.2的应该不会有啥大问题
换着试试吧

论坛徽章:
0
7 [报告]
发表于 2009-09-28 15:35 |只看该作者
gcc换3.2.3版本啦,config的时候没有出错,可是make的时候,就出错啦。下面是错误信息啊:
../../gcc-3.2.3/gcc/read-rtl.c:662: error: lvalue required as increment operand
make[1]: *** [read-rtl.o] Error 1
make[1]: Leaving directory `/home/star/armlinux/build-tools/build-gcc/gcc'
make: *** [all-gcc] Error 2
这个连编译器都出错啦。

论坛徽章:
0
8 [报告]
发表于 2009-09-28 16:17 |只看该作者
又换2.95.3版本啦,还是有错哦。错误信息是:
.95.3/gcc -I../../gcc-2.95.3/gcc/config -I../../gcc-2.95.3/gcc/../include ../../gcc-2.95.3/gcc/config/arm/arm.c
../../gcc-2.95.3/gcc/config/arm/arm.c: In function ‘arm_override_options’:
../../gcc-2.95.3/gcc/config/arm/arm.c:286: warning: assignment discards qualifiers from pointer target type
../../gcc-2.95.3/gcc/config/arm/arm.c:530: error: lvalue required as left operand of assignment
make[1]: *** [arm.o] Error 1
make[1]: Leaving directory `/home/star/armlinux/build-tools/build-gcc/gcc'
make: *** [all-gcc] Error 2

论坛徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵节徽章
日期:2015-03-06 15:50:392015亚冠之大阪钢巴
日期:2015-06-12 16:01:352015年中国系统架构师大会
日期:2015-06-29 16:11:2815-16赛季CBA联赛之四川
日期:2018-12-17 14:10:21
9 [报告]
发表于 2009-09-28 18:30 |只看该作者
那换个其他版本的glibc呢?

论坛徽章:
0
10 [报告]
发表于 2009-10-09 14:39 |只看该作者
放假回来啦,我换个低版本试试
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP