v8js: Centos 7, PHP 7.2 compilation errors

Hello, sorry for question in issues, but I cannot compile. Could anyone help with this issue?

[root@php v8js]# make
/bin/sh /tmp/v8js/libtool --mode=compile g++  -std=c++11 -I. -I/tmp/v8js -DPHP_ATOM_INC -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/opt/v8/include -I/opt/v8  -DHAVE_CONFIG_H  -g -O2   -c /tmp/v8js/v8js_array_access.cc -o v8js_array_access.lo
libtool: compile:  g++ -std=c++11 -I. -I/tmp/v8js -DPHP_ATOM_INC -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/opt/v8/include -I/opt/v8 -DHAVE_CONFIG_H -g -O2 -c /tmp/v8js/v8js_array_access.cc  -fPIC -DPIC -o .libs/v8js_array_access.o
In file included from /opt/v8/include/v8.h:26:0,
                 from /tmp/v8js/php_v8js_macros.h:52,
                 from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8config.h:326:49: warning: 'CallerOwnedBuffer' is deprecated (declared at /usr/include/c++/4.8.2/bits/stl_pair.h:96) [-Wdeprecated-declarations]
   declarator __attribute__((deprecated(message)))
                                                 ^
/opt/v8/include/v8.h:4348:5: note: in expansion of macro 'V8_DEPRECATED'
     V8_DEPRECATED(
     ^
/opt/v8/include/v8.h:4352:39: warning: 'v8::WasmCompiledModule::CallerOwnedBuffer' is deprecated (declared at /opt/v8/include/v8.h:4334): Use BufferReference. [-Wdeprecated-declarations]
                       inline operator CallerOwnedBuffer());
                                       ^
/opt/v8/include/v8config.h:326:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^
/opt/v8/include/v8.h:4352:39: warning: 'v8::WasmCompiledModule::CallerOwnedBuffer' is deprecated (declared at /opt/v8/include/v8.h:4334): Use BufferReference. [-Wdeprecated-declarations]
                       inline operator CallerOwnedBuffer());
                                       ^
/opt/v8/include/v8config.h:326:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^
In file included from /tmp/v8js/php_v8js_macros.h:52:0,
                 from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8.h:4435:46: warning: 'CallerOwnedBuffer' is deprecated (declared at /usr/include/c++/4.8.2/bits/stl_pair.h:96) [-Wdeprecated-declarations]
     WasmCompiledModule::CallerOwnedBuffer buf)
                                              ^
/opt/v8/include/v8.h:4438:30: warning: 'v8::WasmCompiledModule::CallerOwnedBuffer' is deprecated (declared at /opt/v8/include/v8.h:4334): Use BufferReference. [-Wdeprecated-declarations]
 operator WasmCompiledModule::CallerOwnedBuffer() {
                              ^
/opt/v8/include/v8.h:4438:30: warning: 'v8::WasmCompiledModule::CallerOwnedBuffer' is deprecated (declared at /opt/v8/include/v8.h:4334): Use BufferReference. [-Wdeprecated-declarations]
/opt/v8/include/v8.h:4438:30: warning: 'v8::WasmCompiledModule::CallerOwnedBuffer' is deprecated (declared at /opt/v8/include/v8.h:4334): Use BufferReference. [-Wdeprecated-declarations]
/tmp/v8js/v8js_array_access.cc: In function 'void v8js_array_access_named_getter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)':
/tmp/v8js/v8js_array_access.cc:226:37: error: no matching function for call to 'v8::String::Utf8Value::Utf8Value(v8::Local<v8::String>&)'
  v8::String::Utf8Value cstr(property);
                                     ^
/tmp/v8js/v8js_array_access.cc:226:37: note: candidate is:
In file included from /tmp/v8js/php_v8js_macros.h:52:0,
                 from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8.h:2960:5: note: v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)
     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
     ^
/opt/v8/include/v8.h:2960:5: note:   candidate expects 2 arguments, 1 provided
/tmp/v8js/v8js_array_access.cc:246:35: error: no matching function for call to 'v8::Value::ToObject()'
   ret_value = prototype->ToObject()->Get(property);
                                   ^
/tmp/v8js/v8js_array_access.cc:246:35: note: candidates are:
In file included from /tmp/v8js/php_v8js_macros.h:52:0,
                 from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8.h:2524:44: note: v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                            ^
/opt/v8/include/v8.h:2524:44: note:   candidate expects 1 argument, 0 provided
In file included from /opt/v8/include/v8.h:26:0,
                 from /tmp/v8js/php_v8js_macros.h:52,
                 from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8.h:2539:35: note: v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const
                     Local<Object> ToObject(Isolate* isolate) const);
                                   ^
/opt/v8/include/v8config.h:348:48: note: in definition of macro 'V8_DEPRECATE_SOON'
 #define V8_DEPRECATE_SOON(message, declarator) declarator
                                                ^
/opt/v8/include/v8.h:2539:35: note:   candidate expects 1 argument, 0 provided
                     Local<Object> ToObject(Isolate* isolate) const);
                                   ^
/opt/v8/include/v8config.h:348:48: note: in definition of macro 'V8_DEPRECATE_SOON'
 #define V8_DEPRECATE_SOON(message, declarator) declarator
                                                ^
make: *** [v8js_array_access.lo] Error 1

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 23 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Hello! Are there any updates on when this will be merged into the php7 branch? Any update would be greatly appreciated. Thanks.

@temuri416 good question 😃 I wanted to get CI/Travis going w/ the new version before merging (currently it’s broken, since using too old V8 version). @virgofx is already on that topic (i.e. taking over packaging for ubuntu from Bogdan), yet not ready …

yey:

root@dg72:~/install# php --ri v8js

v8js

V8 Javascript Engine => enabled
V8 Engine Compiled Version => 7.1.0
V8 Engine Linked Version => 7.1.0 (candidate)
Version => 2.1.0

Directive => Local Value => Master Value
v8js.flags => no value => no value
v8js.icudtl_dat_path => no value => no value
v8js.use_date => 0 => 0
v8js.use_array_access => 0 => 0
root@dg72:~/install#

@temuri416 here we go, I’ve finally got it working on V8 7.0.276.3, … still needs some love though 😃

Would you fix this issue?

… yeah, I’ll look into it (somewhen soon). Currently I don’t have an up-to-date version of V8 around, will have to package it for NixOS first 😄