phpv8 / v8js

V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
http://pecl.php.net/package/v8js
MIT License
1.84k stars 200 forks source link

Building V8JS on Debian Bullseye with support for PHP 8.2 and V8 11.1 #495

Closed magdutra closed 1 year ago

magdutra commented 1 year ago

I had compiled both V8 and V8JS before, but moved to PHP 8.2 now due to the end of support of PHP 7.4.

I have successfully compiled V8 11.1 on my Debian Bullseye. However, when running "configure" in preparation to build V8JS, it reported that the libv8 version could not be detected. After reading issue #490, I manually changed the version of c++14 to c++17 in the "configure" script, and could proceed further.

Then, I got a compilation error complaining about the "ShutdownPlatform" function. I replaced it by "DisposePlatform" and tried again. Now I'm getting the following error, for which I have no clue how to recover from:

/usr/local/src/v8js/v8js_v8object_class.cc: In function ‘zend_result zm_startup_v8js_v8object_class(int, int)’: /usr/local/src/v8js/v8js_v8object_class.cc:924:39: error: invalid conversion from ‘int ()(zend_object, zend_class_entry, zend_function, zend_object, bool)’ {aka ‘int ()(_zend_object, _zend_class_entry, _zend_function, _zend_object, bool)’} to ‘zend_object_get_closure_t’ {aka ‘ZEND_RESULT_CODE ()(_zend_object, _zend_class_entry, _zend_function, _zend_object**, bool)’} [-fpermissive] 924 v8js_v8object_handlers.get_closure = v8js_v8object_get_closure; ^~~~~~~~~
int ()(zend_object, zend_class_entry, zend_function, zend_object, bool) {aka int ()(_zend_object, _zend_class_entry, _zend_function, _zend_object, bool)}

make: *** [Makefile:257: v8js_v8object_class.lo] Error 1

Is it possible to build V8JS in the PHP8 branch for V8 version 11?

magdutra commented 1 year ago

Fix explained on issue #493