2016-12-24 56 views
3

我正在嘗試編寫一個PHP程序,該程序需要在橙色PI PC2上安裝pthreads。 pthreads需要zts,這通常不包含在PHP中,但在編譯期間很容易添加。PHP7無法在arm64上編譯(OrangePI PC2)

不幸的是,當試圖構建PHP 7時出現以下錯誤。我試過7.0.14和7.1。這一切在一個覆盆子pi(不是64位)上完美運行。有誰知道如何解決這個錯誤?

[email protected]:~/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

僅供參考 - 在這個愚蠢的問題2天后,我通過刪除ext/opcache和'/ buildconf --force'來通過它。這顯然會消除可能導致性能問題的opcache,但我的目的僅在於CLI。所有的工作,但是,我很想看看是否有一個真正的修復。 – Ryan

+0

我維護下一個雲端快照(您鏈接到的),並且我在7.0.14和7.1中都得到了相同的結果。我們被困在7.0.12上。無論如何,我還沒有運氣。 – Kyle

+0

我[記錄了一個針對PHP的錯誤](https://bugs.php.net/bug.php?id=73898),也許他們有一些建議。 – Kyle

回答

1

Bug #73898,這已在7.0.15和7.1.1(我剛剛驗證兩者)中得到修復。