phpv8 / php-v8

PHP extension for V8 JavaScript engine
https://php-v8.readthedocs.io
MIT License
217 stars 14 forks source link

CreateDefaultPlatform is deprecated warning (V8 6.4.291) #80

Closed AlexMasterov closed 6 years ago

AlexMasterov commented 6 years ago

"Use NewDefaultPlatform instead".

v8/v8@ffee558e14e28fc8b1f9a3c10ea3615e0d686c7b

pinepain commented 6 years ago

For some reason upgrading from CreateDefaultPlatform() to NewDefaultPlatform() doesn't work well.

Hello world example throws:

/home/vagrant/php-v8/scripts/test_v8/hello_world.cpp:21: undefined reference to `v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::unique_ptr<v8::TracingController, std::default_delete<v8::TracingController> >)'

Extension itself is unable to load:

/home/vagrant/.phpbrew/php/7.2-debug/bin/php: symbol lookup error: /home/vagrant/php-v8/modules/v8.so: undefined symbol: _ZN2v88platform18NewDefaultPlatformEiNS0_15IdleTaskSupportENS0_21InProcessStackDumpingESt10unique_ptrINS_17TracingControllerESt14default_deleteIS4_EE

After spending some time on troubleshooting, I think we need more eyes on this. I posted to v8-users mailing list (https://groups.google.com/forum/#!topic/v8-users/Jb1VSouy2Z0).

pinepain commented 6 years ago

It came up that the issue was in how libv8 was build (it wasn't build in a relocatable way and thus wasn't quite good for packaging).

pinepain commented 6 years ago

Done in #87. Thanks for taking care!

AlexMasterov commented 6 years ago

Thank you :+1: Happy New Year!