当前系统opencloudos9.x aarch64,在编译php5.6时报错,报错内容如下:
/tmp/ccuaho1i.s: Assembler messages: /tmp/ccuaho1i.s:6283: Error: expected an integer or zero register at operand 2 -- `mul x1,v0,v1' /tmp/ccuaho1i.s:6284: Error: expected an integer or zero register at operand 2 -- `smulh x0,v0,v1' /tmp/ccuaho1i.s:6980: Error: expected an integer or zero register at operand 2 -- `mul x2,v9,v0' /tmp/ccuaho1i.s:6981: Error: expected an integer or zero register at operand 2 -- `smulh x1,v9,v0' /tmp/ccuaho1i.s:7135: Error: expected an integer or zero register at operand 2 -- `mul x2,v0,v0' /tmp/ccuaho1i.s:7136: Error: expected an integer or zero register at operand 2 -- `smulh x1,v0,v0'
|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 2 3 4 5 6 7 | /tmp/ccuaho1i.s: Assembler messages: /tmp/ccuaho1i.s:6283: Error: expected an integer or zero register at operand 2 -- `mul x1,v0,v1' /tmp/ccuaho1i.s:6284: Error: expected an integer or zero register at operand 2 -- `smulh x0,v0,v1' /tmp/ccuaho1i.s:6980: Error: expected an integer or zero register at operand 2 -- `mul x2,v9,v0' /tmp/ccuaho1i.s:6981: Error: expected an integer or zero register at operand 2 -- `smulh x1,v9,v0' /tmp/ccuaho1i.s:7135: Error: expected an integer or zero register at operand 2 -- `mul x2,v0,v0' /tmp/ccuaho1i.s:7136: Error: expected an integer or zero register at operand 2 -- `smulh x1,v0,v0' |
已有补丁修复,补丁下载地址
https://bugs.php.net/patch-display.php?bug_id=70015&patch=X-to-r-to-avoid-macro-expansion-error.patch&revision=latest
在源码中导入补丁
patch -p1 < X-to-r-to-avoid-macro-expansion-error.patch.patch.txt
|---|--------------------------------------------------------------------| | 1 | patch -p1 < X-to-r-to-avoid-macro-expansion-error.patch.patch.txt |
导入后重新编译即可
make clean make
|-----|-----------------| | 1 2 | make clean make |
最后,建议使用wlnmp源,直接yum安装,省略编译环节,即装即用。