PHP7不能在arm64上编译(OrangePI PC2)

时间:2016-12-24 21:57:56

标签: php arm64

我正在尝试编写一个PHP程序,它需要在Orange PI PC2上使用pthreads。 pthreads需要zts,它通常不包含在PHP中,但在构建期间很容易添加。

不幸的是,在尝试构建PHP 7时出现以下错误。我尝试过7.0.14和7.1。这一切都适用于覆盆子pi(不是64位)。有谁知道如何解决这个错误?

orangepi@Orangepi:~/php-7.1.0$ make -j2
/bin/bash /home/orangepi/php-7.1.0/libtool --silent --preserve-dup-deps --mode=compile /home/orangepi/php-7.1.0/meta_ccld -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/opcache/ -I/home/orangepi/php-7.1.0/ext/opcache/ -DPHP_ATOM_INC -I/home/orangepi/php-7.1.0/include -I/home/orangepi/php-7.1.0/main -I/home/orangepi/php-7.1.0 -I/home/orangepi/php-7.1.0/ext/date/lib -I/usr/include/libxml2 -I/home/orangepi/php-7.1.0/ext/sqlite3/libsqlite -I/home/orangepi/php-7.1.0/TSRM -I/home/orangepi/php-7.1.0/Zend  -D_REENTRANT  -I/usr/include -g -O2 -fvisibility=hidden -pthread -DZTS -DZEND_SIGNALS    -c /home/orangepi/php-7.1.0/ext/opcache/ZendAccelerator.c -o ext/opcache/ZendAccelerator.lo 
/bin/bash /home/orangepi/php-7.1.0/libtool --silent --preserve-dup-deps --mode=compile /home/orangepi/php-7.1.0/meta_ccld -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/opcache/ -I/home/orangepi/php-7.1.0/ext/opcache/ -DPHP_ATOM_INC -I/home/orangepi/php-7.1.0/include -I/home/orangepi/php-7.1.0/main -I/home/orangepi/php-7.1.0 -I/home/orangepi/php-7.1.0/ext/date/lib -I/usr/include/libxml2 -I/home/orangepi/php-7.1.0/ext/sqlite3/libsqlite -I/home/orangepi/php-7.1.0/TSRM -I/home/orangepi/php-7.1.0/Zend  -D_REENTRANT  -I/usr/include -g -O2 -fvisibility=hidden -pthread -DZTS -DZEND_SIGNALS    -c /home/orangepi/php-7.1.0/ext/opcache/zend_accelerator_blacklist.c -o ext/opcache/zend_accelerator_blacklist.lo 
mkdir: cannot create directory 'ext/opcache/.libs': File exists
/bin/bash /home/orangepi/php-7.1.0/libtool --silent --preserve-dup-deps --mode=compile /home/orangepi/php-7.1.0/meta_ccld -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/opcache/ -I/home/orangepi/php-7.1.0/ext/opcache/ -DPHP_ATOM_INC -I/home/orangepi/php-7.1.0/include -I/home/orangepi/php-7.1.0/main -I/home/orangepi/php-7.1.0 -I/home/orangepi/php-7.1.0/ext/date/lib -I/usr/include/libxml2 -I/home/orangepi/php-7.1.0/ext/sqlite3/libsqlite -I/home/orangepi/php-7.1.0/TSRM -I/home/orangepi/php-7.1.0/Zend  -D_REENTRANT  -I/usr/include -g -O2 -fvisibility=hidden -pthread -DZTS -DZEND_SIGNALS    -c /home/orangepi/php-7.1.0/ext/opcache/zend_accelerator_debug.c -o ext/opcache/zend_accelerator_debug.lo 
/bin/bash /home/orangepi/php-7.1.0/libtool --silent --preserve-dup-deps --mode=compile /home/orangepi/php-7.1.0/meta_ccld -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/opcache/ -I/home/orangepi/php-7.1.0/ext/opcache/ -DPHP_ATOM_INC -I/home/orangepi/php-7.1.0/include -I/home/orangepi/php-7.1.0/main -I/home/orangepi/php-7.1.0 -I/home/orangepi/php-7.1.0/ext/date/lib -I/usr/include/libxml2 -I/home/orangepi/php-7.1.0/ext/sqlite3/libsqlite -I/home/orangepi/php-7.1.0/TSRM -I/home/orangepi/php-7.1.0/Zend  -D_REENTRANT  -I/usr/include -g -O2 -fvisibility=hidden -pthread -DZTS -DZEND_SIGNALS    -c /home/orangepi/php-7.1.0/ext/opcache/zend_accelerator_hash.c -o ext/opcache/zend_accelerator_hash.lo 
/bin/bash /home/orangepi/php-7.1.0/libtool --silent --preserve-dup-deps --mode=compile /home/orangepi/php-7.1.0/meta_ccld -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/opcache/ -I/home/orangepi/php-7.1.0/ext/opcache/ -DPHP_ATOM_INC -I/home/orangepi/php-7.1.0/include -I/home/orangepi/php-7.1.0/main -I/home/orangepi/php-7.1.0 -I/home/orangepi/php-7.1.0/ext/date/lib -I/usr/include/libxml2 -I/home/orangepi/php-7.1.0/ext/sqlite3/libsqlite -I/home/orangepi/php-7.1.0/TSRM -I/home/orangepi/php-7.1.0/Zend  -D_REENTRANT  -I/usr/include -g -O2 -fvisibility=hidden -pthread -DZTS -DZEND_SIGNALS    -c /home/orangepi/php-7.1.0/ext/opcache/zend_accelerator_module.c -o ext/opcache/zend_accelerator_module.lo 
/tmp/ccuWeYfe.s: Assembler messages:
/tmp/ccuWeYfe.s:951: Error: operand 3 should be an integer register -- `mul x1,x1,1048576'
/tmp/ccuWeYfe.s:952: Error: operand 3 should be an integer register -- `smulh x0,x1,1048576'
Makefile:1000: recipe for target 'ext/opcache/zend_accelerator_module.lo' failed
make: *** [ext/opcache/zend_accelerator_module.lo] Error 1
make: *** Waiting for unfinished jobs....

我到处搜索过,只发现了一个类似的issue,但仍然无法通过这个。

1 个答案:

答案 0 :(得分:1)

Bug #73898,这已在7.0.15和7.1.1中得到修复(我刚刚验证了两者)。