1.试图运行程序,提示"libc.so.6: version `GLIBC_2.14' not found",原因是系统的glibc版本太低,软件编译时使用了较高版本的glibc引起的:
2.查看系统glibc支持的版本:
- [ghui@StuOS bin]$ strings /lib64/libc.so.6 |grep GLIBC_
- GLIBC_2.2.5
- GLIBC_2.2.6
- GLIBC_2.3
- GLIBC_2.3.2
- GLIBC_2.3.3
- GLIBC_2.3.4
- GLIBC_2.4
- GLIBC_2.5
- GLIBC_2.6
- GLIBC_2.7
- GLIBC_2.8
- GLIBC_2.9
- GLIBC_2.10
- GLIBC_2.11
- GLIBC_2.12
- GLIBC_PRIVATE
- [ghui@StuOS bin]$ rpm -qa |grep glibc
- glibc-static-2.12-1.80.el6_3.6.x86_64
- glibc-headers-2.12-1.80.el6_3.6.x86_64
- glibc-common-2.12-1.80.el6_3.6.x86_64
- glibc-devel-2.12-1.80.el6_3.6.x86_64
- glibc-static-2.12-1.80.el6_3.6.i686
- glibc-devel-2.12-1.80.el6_3.6.i686
- glibc-2.12-1.80.el6_3.6.i686
- glibc-2.12-1.80.el6_3.6.x86_64
直接拷贝 工具链中的 libc库到文件系统中即可
gcc版本太高导致libbow编译错误的解决方案
版本:
arm-hisiv500-linux-gcc (Hisilicon_v500_20170922) 4.9.4 20150629 (prerelease)
bow-20020213
错误1:
bow/libbow.h
2128行: array type has incomplete element type(数组类型不完全)
出错行:
extern struct argp_child bow_argp_children[];
解决:
出错的原因是不允许在定义之前声明,将该行注释,之后在所有提示‘bow_argp_children’未声明的语句之前加上:
extern struct argp_child bow_argp_children[];
错误2: operator '&&' has no right operand(操作符&&缺少右操作数)
在argp/argp-fs-xinl.c和argp/argp-xinl.c两个文件的第一行加上:
#include <stdio.h>
错误3:
error: invalid storage class for function 'grow_if_necessary'('grow_if_necessary'的存储类无效)
gcc在编译时不允许static型的函数声明出现在函数定义中,去掉static即可
错误4:
label at end of compound statement(标志出现在复合语句的末尾)
GCC4不允许行标记之后为空,加上空语句";"就可以了,如
改成:
出错行:
extern struct argp_child bow_argp_children[];
解决:
出错的原因是不允许在定义之前声明,将该行注释,之后在所有提示‘bow_argp_children’未声明的语句之前加上:
extern struct argp_child bow_argp_children[];
错误2: operator '&&' has no right operand(操作符&&缺少右操作数)
在argp/argp-fs-xinl.c和argp/argp-xinl.c两个文件的第一行加上:
#include <stdio.h>
错误3:
error: invalid storage class for function 'grow_if_necessary'('grow_if_necessary'的存储类无效)
gcc在编译时不允许static型的函数声明出现在函数定义中,去掉static即可
错误4:
label at end of compound statement(标志出现在复合语句的末尾)
GCC4不允许行标记之后为空,加上空语句";"就可以了,如
default: }
default: ; }