syslinux+buildroot,某程序报错:
1 |
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found |
经搜索,可以通过如下的方法查看GLBCXX版本:
那么libstdc++跟什么有关呢?
根据官网描述,这个版本信息实际是:
1 2 3 4 5 |
Symbol versioning on the libstdc++.so binary. mapfile: libstdc++-v3/config/abi/pre/gnu.ver It is versioned with the following labels and version definitions, where the version definition is the maximum for a particular release. Note, only symbols which are newly introduced will use the maximum version definition. Thus, for release series with the same label, but incremented version definitions, the later release has both versions. (An example of this would be the GCC 3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0 release.) If a particular release is not listed, it has the same version labels as the preceding release. |
可以看到,当前GLIBCXX支持的最高版本为3.4.20,没有该二进制需要的3.4.21。
这个问题之所以出现,应该是由于buildroot编译时使用的GCC版本低于编译上述二进制代码时的GCC版本所致。
修改buildroot的编译选项,将GCC版本提高至5.x,然后重新编译buildroot:
参考文档:
1、https://stackoverflow.com/questions/11176116/how-can-i-know-the-libstdc-shipped-with-each-gcc-version
2、https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
3、https://stackoverflow.com/questions/10354636/how-do-you-find-what-version-of-libstdc-library-is-installed-on-your-linux-mac
转载时请保留出处,违法转载追究到底:进城务工人员小梅 » 解决形如/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21′ not found的报错