共被编辑 1 次

版本 更新时间 贡献者 编辑原因 操作
#r1 7月17日 kavin_wei12 创建问题 查看

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