如何为ubuntu 12.04安装v8js?
我看到了以下问题: Installing PHPv8js on Ubuntu
当我使用编译版本v8js-0.1.3 for php 5.4.23时出现错误:
/usr/lib/php5/20100525# php -m | grep v8js
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/v8js.so' - /usr/lib/php5/20100525/v8js.so: undefined symbol: _ZN2v87Integer3NewEi in Unknown on line 0
可能原因:它为v5js for php 5.3(20090626)进行了编译。我将它用于php 5.4(20100525)。
通过gcc4.8编译v8js-0.1.5时得到的错误:
running: make
/bin/bash /tmp/pear/temp/pear-build-rootHtv6O2/v8js-0.1.5/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/pear/temp/v8js -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootHtv6O2 /v8js-0.1.5/include -I/tmp/pear/temp/pear-build-rootHtv6O2/v8js-0.1.5/main -I/tmp/pear/temp/v8js -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -c /tmp/pear/temp/v8js/v8js.cc -o v8js.lo
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make: *** [v8js.lo] Ошибка 1
ERROR: `make' failed
通过gcc 4.7:
running: make
...
/usr/include/v8.h:5091:24: note: v8::Context::Scope::Scope(v8::Handle<v8::Context>)
/usr/include/v8.h:5091:24: note: no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'v8::Handle<v8::Context>'
/usr/include/v8.h:5089:9: note: constexpr v8::Context::Scope::Scope(const v8::Context::Scope&)
/usr/include/v8.h:5089:9: note: no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'const v8::Context::Scope&'
/tmp/pear/temp/v8js/v8js.cc:1103:32: error: 'GetCurrent' is not a member of 'v8::Context'
/tmp/pear/temp/v8js/v8js.cc:1106:21: error: 'NewSymbol' is not a member of 'v8::String'
make: *** [v8js.lo] Ошибка 1
ERROR: `make' failed
我如何才能正确安装?感谢。