PHP8.5.7源代码编译时报错及解决方法

2026年06月13日 4点热度 0人点赞 0条评论

make 时报错:

/bin/ld: dynamic STT_GNU_IFUNC symbol `mb_utf16be_to_wchar' with pointer equality in `ext/mbstring/libmbfl/filters/mbfilter_utf16.o' can not be used when making an executable; recompile with -fPIE and relink with -pie collect2: error: ld returned 1 exit status make: *** [Makefile:287: sapi/cli/php] Error 1 make: *** Waiting for unfinished jobs.... /bin/ld: dynamic STT_GNU_IFUNC symbol `mb_utf16be_to_wchar' with pointer equality in `ext/mbstring/libmbfl/filters/mbfilter_utf16.o' can not be used when making an executable; recompile with -fPIE and relink with -pie collect2: error: ld returned 1 exit status make: *** [Makefile:299: sapi/fpm/php-fpm] Error 1

 

# 首先清除原来的编译内容
make distclean
export CFLAGS="-fPIE"
export CXXFLAGS="-fPIE"
export LDFLAGS="-pie"
# 重新 configure
./configure [自定义参数]
make -j4

路灯

这个人很懒,什么都没留下

文章评论