PHP 7.28编译make -j报错
daironghua521 opened this issue · 3 comments
[root@dairh phpx-0.0.2]# make -j
[ 12%] Building CXX object CMakeFiles/phpx.dir/src/array.cc.o
[ 25%] Building CXX object CMakeFiles/phpx.dir/src/base.cc.o
[ 37%] Building CXX object CMakeFiles/phpx.dir/src/class.cc.o
[ 50%] Building CXX object CMakeFiles/phpx.dir/src/extension.cc.o
[ 62%] Building CXX object CMakeFiles/phpx.dir/src/hash.cc.o
[ 75%] Building CXX object CMakeFiles/phpx.dir/src/string.cc.o
[ 87%] Building CXX object CMakeFiles/phpx.dir/src/variant.cc.o
In file included from /root/phpx-0.0.2/src/extension.cc:17:0:
/root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录
#include "php.h"
^
编译中断。
In file included from /root/phpx-0.0.2/src/array.cc:17:0:
/root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录
#include "php.h"
^
编译中断。
In file included from /root/phpx-0.0.2/src/string.cc:17:0:
/root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录
#include "php.h"
^
编译中断。
In file included from /root/phpx-0.0.2/src/class.cc:17:0:
/root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录
#include "php.h"
^
编译中断。
make[2]: *** [CMakeFiles/phpx.dir/src/class.cc.o] 错误 1
make[2]: *** 正在等待未完成的任务....
In file included from /root/phpx-0.0.2/src/hash.cc:17:0:
/root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录
#include "php.h"
^
编译中断。
In file included from /root/phpx-0.0.2/src/variant.cc:17:0:
/root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录
#include "php.h"
^
编译中断。
make[2]: *** [CMakeFiles/phpx.dir/src/variant.cc.o] 错误 1
In file included from /root/phpx-0.0.2/src/base.cc:17:0:
/root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录
#include "php.h"
^
编译中断。
make[2]: *** [CMakeFiles/phpx.dir/src/base.cc.o] 错误 1
make[2]: *** [CMakeFiles/phpx.dir/src/extension.cc.o] 错误 1
make[2]: *** [CMakeFiles/phpx.dir/src/string.cc.o] 错误 1
make[2]: *** [CMakeFiles/phpx.dir/src/array.cc.o] 错误 1
make[2]: *** [CMakeFiles/phpx.dir/src/hash.cc.o] 错误 1
make[1]: *** [CMakeFiles/phpx.dir/all] 错误 2
make: *** [all] 错误 2
装个php-dev
1,检查一下php-config命令是否存在,不存在的话直接到PHP sbin目录里面做软链接ln -s /usr/local/php/bin/php-config /usr/bin/php-config
2,删掉cmakecache.txt,重新编译一次
执行一下php-config命令,看一下是否有正常的header路径输出:
[root@10-10-182-80 service]# php-config
Usage: /usr/local/bin/php-config [OPTION]
Options:
--prefix [/usr/local]
--includes [-I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib]
--ldflags [ -L/usr/local/lib]
--libs [-lcrypt -lz -lcrypt -lrt -lmcrypt -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lrt -lxml2 -lz -lm -lssl -lcrypto -lcurl -lssl -lcrypto -lssl -lcrypto -lz -lrt -lxml2 -lz -lm -lssl -lcrypto -lfreetype -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lssl -lcrypto -lcrypt ]
--extension-dir [/usr/local/lib/php/extensions/no-debug-non-zts-20160303]
--include-dir [/usr/local/include/php]
--man-dir [/usr/local/php/man]
--php-binary [/usr/local/bin/php]
--php-sapis [ cli fpm phpdbg cgi]
--configure-options [--enable-fpm --with-mcrypt --with-zlib --with-gd --with-curl --enable-mbstring --with-jpeg-dir --with-iconv --enable-sockets --with-mysqli --enable-exif --with-png-dir --with-freetype-dir --with-openssl --with-bz2 --enable-zip --enable-soap --with-pdo-mysql --enable-ftp --enable-bcmath]
--version [7.1.13]
--vernum [70113]