音乐分享(自动连播):
So cold
Not my baby
Wicked Game
What Is Love
Once Upon a Time
The Heart Of The Ocean
靳闯博客 记录是一种习惯 、分享是一种态度
bin/ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.
发表于 - | 分类 - 技术积累 | 标签 - Linux PHP

php编译过程中最后报错,出现此错误:
make: *** [Makefile:306: sapi/fpm/php-fpm] Error 1
这个是先出现的错误: bin/ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.

经查阅资料问题是因为gcc版本太高导致

# 当前centos7系统
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/11.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC) 

解决: 降级gcc版本

yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils

# 临时启用
scl enable devtoolset-9 bash

# 永久启动
echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile

# 查看gcc版本
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-9/root/usr --mandir=/opt/rh/devtoolset-9/root/usr/share/man --infodir=/opt/rh/devtoolset-9/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-9.3.1-20200408/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC) 
!!!
!!!
<p class="duan">再次编译通过没问题了</p>

本站文章除注明[转载|引用|原文]出处外,均为本站原生内容,转载前请注明出处 | 文章链接地址:https://me.jinchuang.org/archives/1328.html

如果这篇文章帮助到了你,我感到十分荣幸!

记录 🐾 分享 👣 进步 💪 变强


留言

顶部