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: ; }