1

我按照这个链接进行编译v8v8js但是当我执行make编译时v8js,它显示了这个日志和这个错误:

/bin/bash /tmp/v8js/libtool --mode=compile g++ -I. -I/tmp/v8js -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -I/opt/v8/include -I/opt/v8  -DV8_COMPRESS_POINTERS -DHAVE_CONFIG_H  -g -O2   -Wno-narrowing -std=c++14 -c /tmp/v8js/v8js_array_access.cc -o v8js_array_access.lo 
libtool: compile:  g++ -I. -I/tmp/v8js -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -I/opt/v8/include -I/opt/v8 -DV8_COMPRESS_POINTERS -DHAVE_CONFIG_H -g -O2 -Wno-narrowing -std=c++14 -c /tmp/v8js/v8js_array_access.cc  -fPIC -DPIC -o .libs/v8js_array_access.o
In file included from /usr/include/dirent.h:245,
                 from /usr/include/php/20200930/Zend/zend_virtual_cwd.h:89,
                 from /usr/include/php/20200930/main/php.h:437,
                 from /tmp/v8js/php_v8js_macros.h:45,
                 from /tmp/v8js/v8js_array_access.cc:17:
/tmp/v8js/v8js_class.h: In function ‘v8js_ctx* v8js_ctx_fetch_object(zend_object*)’:
/tmp/v8js/v8js_class.h:83:54: warning: ‘offsetof’ within non-standard-layout type ‘v8js_ctx’ is conditionally-supported [-Winvalid-offsetof]
   83 |  return (struct v8js_ctx *)((char *)obj - XtOffsetOf(struct v8js_ctx, std));
/tmp/v8js/v8js_class.h:83:43: note: in expansion of macro ‘XtOffsetOf’
   83 |  return (struct v8js_ctx *)((char *)obj - XtOffsetOf(struct v8js_ctx, std));
      |                                           ^~~~~~~~~~
/tmp/v8js/v8js_array_access.cc: In function ‘zval v8js_array_access_dispatch(zend_object*, const char*, int, uint32_t, zval)’:
/tmp/v8js/v8js_array_access.cc:53:6: error: ‘zend_fcall_info’ {aka ‘struct _zend_fcall_info’} has no member named ‘no_separation’
   53 |  fci.no_separation = 0;
      |      ^~~~~~~~~~~~~
/tmp/v8js/v8js_array_access.cc: In function ‘void v8js_array_access_enumerator(const v8::PropertyCallbackInfo<v8::Array>&)’:
/tmp/v8js/v8js_array_access.cc:213:74: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’, declared with attribute ‘warn_unused_result’ [-Wunused-result]
  213 | esult->Set(isolate->GetEnteredOrMicrotaskContext(), i ++, V8JS_INT(j));
      |                                                                      ^

In file included from /tmp/v8js/php_v8js_macros.h:55,
                 from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8.h:3943:37: note: declared here
 3943 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
      |                                     ^~~
/tmp/v8js/v8js_array_access.cc:217:86: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute ‘warn_unused_result’ [-Wunused-result]
  217 | late->GetEnteredOrMicrotaskContext(), V8JS_SYM("length"), V8JS_INT(i));
      |                                                                      ^

In file included from /tmp/v8js/php_v8js_macros.h:55,
                 from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8.h:3940:37: note: declared here
 3940 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
/tmp/v8js/v8js_array_access.cc: In function ‘void v8js_array_access_named_getter(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&)’:
/tmp/v8js/v8js_array_access.cc:253:83: warning: ignoring return value of ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const [with S = v8::Value; T = v8::Value]’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  253 | t(isolate->GetEnteredOrMicrotaskContext(), property).ToLocal(&ret_value);
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

make: *** [Makefile:223: v8js_array_access.lo] Error 1

我的 PHP 版本:8.0.5

4

0 回答 0