如何在Mac上使用php7.3编译v8js?

时间:2018-10-19 11:33:47

标签: php

我遵循了这些说明How to install php v8js on Mac?,但是它是在Mac中的旧版本而不是我有php7.3的新版本中编译的。如何使用新版本进行编译?
我尝试基于PEAR claims php was compiled with old module更改pear配置的路径,但是当我执行“ make”命令时,得到以下输出:

 timurs-mbp:v8js timurozkul$ make  
/bin/sh /tmp/v8js/libtool --mode=compile g++ -Wno-c++11-narrowing - 
 std=c++11 -I. -I/tmp/v8js -DPHP_ATOM_INC -I/tmp/v8js/include - 
 I/tmp/v8js/main -I/tmp/v8js -I/usr/local/php5/include/php - 
 I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM - 
 I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext - 
 I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include -   
 I/usr/local  -DHAVE_CONFIG_H  -Wno-c++11-narrowing   -c /tmp/v8js/v8js_array_access.cc -o v8js_array_access.lo 
mkdir .libs  
 g++ -Wno-c++11-narrowing -std=c++11 -I. -I/tmp/v8js -DPHP_ATOM_INC - 
 I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js - 
 I/usr/local/php5/include/php -I/usr/local/php5/include/php/main - 
 I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend - 
 I/usr/local/php5/include/php/ext - 
 I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include -   
 I/usr/local -DHAVE_CONFIG_H -Wno-c++11-narrowing -c  /tmp/v8js/v8js_array_access.cc  -fno-common -DPIC -o  
 .libs/v8js_array_access.o
In file included from /tmp/v8js/v8js_array_access.cc:17:  
In file included from ./php_v8js_macros.h:42:  
In file included from /usr/local/php5/include/php/main/php.h:35:  
In file included from /usr/local/php5/include/php/Zend/zend.h:328:  
/usr/local/php5/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/php5/include/php/main/php_config.h:2619:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
                       ^  
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here
extern int finite(double)
           ^  
In file included from /tmp/v8js/v8js_array_access.cc:17:  
In file included from ./php_v8js_macros.h:42:  
In file included from /usr/local/php5/include/php/main/php.h:35:  
In file included from /usr/local/php5/include/php/Zend/zend.h:328:  
/usr/local/php5/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/php5/include/php/main/php_config.h:2619:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
                       ^  
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here
extern int finite(double)
           ^  
/tmp/v8js/v8js_array_access.cc:226:24: error: no matching constructor for initialization of 'v8::String::Utf8Value'
        v8::String::Utf8Value cstr(property);
                              ^    ~~~~~~~~  
/usr/local/include/v8.h:2996:5: note: candidate constructor not viable: no known conversion from 'v8::Local<v8::String>' to 'const v8::String::Utf8Value' for 1st argument
    Utf8Value(const Utf8Value&) = delete;
    ^  
/usr/local/include/v8.h:2989:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Utf8Value(Isolate* isolate, Local<v8::Value> obj);
    ^  
/tmp/v8js/v8js_array_access.cc:246:26: warning: 'ToObject' is deprecated: Use maybe version [-Wdeprecated-declarations]
                ret_value = prototype->ToObject()->Get(property);
                                       ^  
/usr/local/include/v8.h:2548:10: note: 'ToObject' has been explicitly marked deprecated here
  inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
         ^  
/usr/local/include/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^  
3 warnings and 1 error generated.
make: *** [v8js_array_access.lo] Error 1

所有路径都指向php5

0 个答案:

没有答案