4.4.0版本在gcc4.8.5源码编译安装报错

What did you do? If possible, provide a simple script for reproducing the error.
v4.4.0源码编译安装
执行脚本如下:
/usr/local/php-7.0.32/bin/phpize
./configure --with-php-config=/usr/local/php-7.0.32/bin/php-config
make

What did you expect to see?
成功编译,生成swoole.so文件

What did you see instead?
-soname -Wl,swoole.so -o .libs/swoole.so
/usr/bin/ld: .libs/php_swoole_cxx.o: relocation R_X86_64_32 against `executor_globals' can not be used when making a shared object; recompile with -fPIC
.libs/php_swoole_cxx.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: * [swoole.la] Error 1

What version of Swoole are you using (show your php --ri swoole)?
v4.4.0

What is your machine environment used (including version of kernel & php & gcc) ?
系统:Linux version 2.6.32-573.7.1.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Tue Sep 22 22:00:00 UTC 2015
php版本:7.3.7
gcc版本:4.8.5

阅读 3k
1 个回答

make clean再重新编译又成功了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进