swoole/phpx

mac编译libphpx.so报错

Closed this issue · 0 comments

php是7.2
用的macos
gcc是9.4
composer是2.1.1

执行make -j 4报错:
➜ phpx-0.3.0 make -j 4
Consolidate compiler generated dependencies of target phpx
Consolidate compiler generated dependencies of target phpx_static
[ 4%] Building CXX object CMakeFiles/phpx_static.dir/src/extension.o
[ 9%] Building CXX object CMakeFiles/phpx.dir/src/extension.o
[ 13%] Building CXX object CMakeFiles/phpx.dir/src/variant.o
[ 18%] Building CXX object CMakeFiles/phpx_static.dir/src/variant.o
In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17:
In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php.h:35:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend.h:328:
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend_operators.h:114:18: warning: 'finite' is deprecated: first deprecated in macOS
10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations]
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
^
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated
here
extern int finite(double)
^
In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17:
In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php.h:35:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend.h:328:
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend_operators.h:125:18: warning: 'finite' is deprecated: first deprecated in macOS
10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations]
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
^
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated
here
extern int finite(double)
^
In file included from /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17:
In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php.h:35:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend.h:328:
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend_operators.h:114:18: warning: 'finite' is deprecated: first deprecated in macOS
10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations]
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
^
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated
here
extern int finite(double)
^
In file included from /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17:
In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php.h:35:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend.h:328:
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend_operators.h:125:18: warning: 'finite' is deprecated: first deprecated in macOS
10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations]
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
^
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated
here
extern int finite(double)
^
In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17:
In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php.h:35:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend.h:328:
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend_operators.h:114:18: warning: 'finite' is deprecated: first deprecated in macOS
10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations]
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
^
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated
here
extern int finite(double)
^
In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17:
In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php.h:35:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend.h:328:
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend_operators.h:125:18: warning: 'finite' is deprecated: first deprecated in macOS
10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations]
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
In file included from ^
/Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17:
In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20/usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php_config.h:
:In file included from 2675/usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php.h::2435::
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend.h:note328: :
expanded from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend_operators.hmacro: 114'zend_finite':18
: warning: 'finite' is deprecated: first deprecated in macOS
#define zend_finite(a) finite(a)
10.9 ^-
Use isfinite((double)x) instead. [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated
here
extern int finite(double)
^
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
^
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated
here
extern int finite(double)
^
In file included from /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17:
In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php.h:35:
In file included from /usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend.h:328:
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/Zend/zend_operators.h:125:18: warning: 'finite' is deprecated: first deprecated in macOS
10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations]
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
^
/usr/local/Cellar/php@7.2/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated
here
extern int finite(double)
^
In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17:
/Users/admin/Downloads/phpx-0.3.0/include/phpx.h:329:20: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be
assumed to always convert to true [-Wundefined-bool-conversion]
return this;
^~~~
In file included from /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17:
/Users/admin/Downloads/phpx-0.3.0/include/phpx.h:329:20: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be
assumed to always convert to true [-Wundefined-bool-conversion]
return this;
^~~~
In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17:
/Users/admin/Downloads/phpx-0.3.0/include/phpx.h:329:20: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be
assumed to always convert to true [-Wundefined-bool-conversion]
return this;
^~~~
In file included from /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17:
/Users/admin/Downloads/phpx-0.3.0/include/phpx.h:329:20: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be
assumed to always convert to true [-Wundefined-bool-conversion]
return this;
^~~~
/Users/admin/Downloads/phpx-0.3.0/src/extension.cc:159:13: error: non-constant-expression cannot be narrowed from type 'uint32_t'
(aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
(uint32_t) entry.modifiable, // modifiable
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/admin/Downloads/phpx-0.3.0/src/extension.cc:159:13: note: insert an explicit cast to silence this issue
(uint32_t) entry.modifiable, // modifiable
^~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast( )
/Users/admin/Downloads/phpx-0.3.0/src/extension.cc:159:13: error: non-constant-expression cannot be narrowed from type 'uint32_t'
(aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
(uint32_t) entry.modifiable, // modifiable
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/admin/Downloads/phpx-0.3.0/src/extension.cc:159:13: note: insert an explicit cast to silence this issue
(uint32_t) entry.modifiable, // modifiable
^~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast( )
3 warnings generated.
3 warnings generated.
3 warnings and 1 error generated.
3 warnings and 1 error generated.
make[2]: *** [CMakeFiles/phpx.dir/src/extension.o] Error 1
make[1]: *** [CMakeFiles/phpx.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/phpx_static.dir/src/extension.o] Error 1
make[1]: *** [CMakeFiles/phpx_static.dir/all] Error 2
make: *** [all] Error 2