Closed ivoba closed 7 years ago
Hi! After libv8-5.5 (or 5.4, can't recall) I install libv8 in /opt/libv8-x.y/{include,lib}
which is probably why you get Please reinstall the v8 distribution
error. I guess ./configure --with-v8js=/opt/libv8-6.1
or something like that should solve the issue.
@stesie i implemented this check in my ext's config.m4
:
V8_MIN_API_VERSION_STR=6.1.170
DESIRED_V8_VERSION=`echo "${V8_MIN_API_VERSION_STR}" | $AWK 'BEGIN { FS = "."; } { printf "%s.%s", [$]1, [$]2;}'`
# Path where v8 from packages we recommend are installed, it's /opt/libv8-MAJOR.MINOR on Ubuntu
# and /usr/local/opt/v8@MAJOR.MINOR on macOS
PRIORITY_SEARCH_PATH="/opt/libv8-${DESIRED_V8_VERSION} /usr/local/opt/v8@${DESIRED_V8_VERSION}"
SEARCH_PATH="${PRIORITY_SEARCH_PATH} /usr/local /usr"
and it may also do a job for v8js.
Thanks for your answer.
I tried now with
git clone https://github.com/phpv8/v8js.git
cd v8js
git checkout tags/1.4.0
phpize
./configure --with-v8js=/opt/libv8-6.1
make
make test
make install
and i get:
checking for libv8_libplatform... configure: error: could not find libv8_libplatform library
Did i do wrong?
Make sure you install dev files and try master branch, looking briefly on commits history it looks like 1.4.0 does not work with 6.x. However, I don't use v8js, so I may not be accurate on that.
Anyway, it worked for me:
sudo add-apt-repository -y ppa:pinepain/libv8-6.1
sudo apt-get install libv8-6.1 libv8-6.1-dev
git clone https://github.com/phpv8/v8js.git
cd v8js
phpize
./configure --with-v8js=/opt/libv8-6.1
make
make test
ok ill try that, ill let you know.
with libv8-5.9 release 1.4.0 worked.
yes with master banch it worked, as you have described above
apt-get install -y libv8-6.1 libv8-6.1-dev
cd /tmp
git clone https://github.com/phpv8/v8js.git
cd v8js
phpize
./configure --with-v8js=/opt/libv8-6.1
make
make test
make install
echo extension=v8js.so > /etc/php/7.1/mods-available/v8js.ini
ln -s /etc/php/7.1/mods-available/v8js.ini /etc/php/7.1/fpm/conf.d/99-v8js.ini
ln -s /etc/php/7.1/mods-available/v8js.ini /etc/php/7.1/cli/conf.d/99-v8js.ini
rm -rf /tmp/*
@pinepain Thanks a lot for your help and also for the PPAs :)
my system is centos 6.5,how to install dev files and try master branch?
all the answer is about ubuntu but my system is centos 7 how to install libv8-6.1 libv8-6.1-dev and
i was erroring like this libv8_libplatform... configure: error: could not find libv8_libplatform library then i tried /opt/remi/php71/root/bin/pecl install v8js and works
Hi there, i used to build v8js with @pinepain s ppa.
Now trying the same with newer versions like libv8-6.1-dev and i receive:
There seem to have changed something, how can i fix this with ppa usage?