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

Ubuntu 18 configure: error: could not determine libv8 version #384

Closed TheRatG closed 5 years ago

TheRatG commented 5 years ago

Hello, I try to compile v8js to Ubuntu18 but i have an error :

checking for V8 version... NONE
configure: error: could not determine libv8 version

Steps:

add-apt-repository ppa:stesie/libv8
apt-get update -y
apt-get install libv8-7.1-dev -y
cd /tmp
git clone https://github.com/phpv8/v8js.git
cd v8js
phpize
./configure --with-v8js=/opt/libv8-7.1 LDFLAGS="-lstdc++"

Debug info

config.log

# ldd /opt/libv8-7.1/lib/*.so  | grep 'not found'
    libv8_libbase.so => not found
    libv8_libbase.so => not found

Thanks.

TheRatG commented 5 years ago

Problem was solved.

So before install php-extension run this.

apt-get install patchelf
for A in /opt/libv8-7.1/lib/*.so; do patchelf --set-rpath '$ORIGIN' $A;done
stesie commented 5 years ago

Oh, interesting :) ... just tried the packages on xenial so far, and there it works fine without patching.