Chinaunix首页 | 论坛 | 博客
  • 博客访问: 59257
  • 博文数量: 12
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 100
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-19 16:31
文章存档

2014年(7)

2007年(5)

我的朋友

分类: LINUX

2014-04-14 22:33:07

 

编译glibc-2.18时出现以下现象

configure: error:  *** These critical programs are missing or too old: gawk *** Check the INSTALL file for required versions.

apt-get install build-essential automake bison flex texinfo gawk g\+\+ 

../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber    gtype-desc.c -o gtype-desc.o

gtype-desc.c:8829:18: error: subscripted value is neither array nor pointer nor vector

gtype-desc.c:8948:36: error: subscripted value is neither array nor pointer nor vector

gtype-desc.c:9032:31: error: subscripted value is neither array nor pointer nor vector

gtype-desc.c:9053:31: error: subscripted value is neither array nor pointer nor vector

gtype-desc.c:9060:31: error: subscripted value is neither array nor pointer nor vector

gtype-desc.c:9067:31: error: subscripted value is neither array nor pointer nor vector

make[2]: *** [gtype-desc.o] Error 1

make[2]: Leaving directory `/usr/src/build/gcc-4.6.1/build/gcc'

make[1]: *** [all-gcc] Error 2

make[1]: Leaving directory `/usr/src/build/gcc-4.6.1/build'

make: *** [all] Error 2

解决方法:

diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index abf17f8..550d3bb 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -3594,13 +3594,13 @@ write_field_root (outf_p f, pair_p v, type_p type, const char *name,
                  int has_length, struct fileloc *line, const char *if_marked,
                  bool emit_pch, type_p field_type, const char *field_name)
 {
+  struct pair newv;
   /* If the field reference is relative to V, rather than to some
      subcomponent of V, we can mark any subarrays with a single stride.
      We're effectively treating the field as a global variable in its
      own right.  */
   if (v && type == v->type)
     {
-      struct pair newv;
 
       newv = *v;
       newv.type = field_type;
 
 
 

 

编译gcc4.6.1时候遇到以下情况

crti.o: Relocations in generic ELF

解决方法:

解决方法:
(1)
在工程根目录下执行make clean -w;
(2)./configure --host=arm-linux
(3)make
(4)make install
(5)
顺利执行,编译成功

原因:
(1)
由于这个在这个iperf目录中之前使用gcc编译过x86版本的iperf,然后修改configure 的编译选项开始编译arm-linux版本,会造成有x86的文件遗留,使用make clean -w清理后再交叉编译;

 
阅读(15841) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~