Last active
July 18, 2020 07:15
-
-
Save sumitpore/339df4326c6a6f9275dd43b4568c1a69 to your computer and use it in GitHub Desktop.
Installing v8js pecl extension on php 7.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "==================================" | |
echo "Installing Dependencies" | |
echo "==================================" | |
sudo apt-get update | |
sudo apt-get install \ | |
git \ | |
build-essential \ | |
curl \ | |
python \ | |
libglib2.0-dev \ | |
patchelf | |
echo "==========================================" | |
echo "Installing V8JS Module in /opt/compile-v8" | |
echo "==========================================" | |
sudo mkdir -p /opt/compile-v8 \ | |
&& cd /opt/compile-v8 \ | |
\ | |
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git --progress --verbose \ | |
&& export PATH="$PATH:/tmp/depot_tools" \ | |
\ | |
&& fetch v8 \ | |
&& cd v8 \ | |
&& git checkout 7.5.288.30 \ | |
&& gclient sync \ | |
\ | |
&& tools/dev/v8gen.py -vv x64.release -- \ | |
binutils_path=\"/usr/bin\" \ | |
target_os=\"linux\" \ | |
target_cpu=\"x64\" \ | |
v8_target_cpu=\"x64\" \ | |
v8_use_external_startup_data=false \ | |
is_official_build=true \ | |
is_component_build=true \ | |
is_cfi=false \ | |
is_clang=false \ | |
use_custom_libcxx=false \ | |
use_sysroot=false \ | |
use_gold=false \ | |
use_allocator_shim=false \ | |
treat_warnings_as_errors=false \ | |
symbol_level=0 \ | |
\ | |
&& ninja -C out.gn/x64.release/ \ | |
&& mkdir -p /opt/libv8-7.5/{lib,include} \ | |
&& cp out.gn/x64.release/lib*.so out.gn/x64.release/*_blob.bin out.gn/x64.release/icudtl.dat /opt/libv8-7.5/lib/ \ | |
&& cp -R include/* /opt/libv8-7.5/include/ \ | |
&& for A in /opt/libv8-7.5/lib/*.so; do patchelf --set-rpath '$ORIGIN' $A;done | |
echo "==================================" | |
echo "Installing v8js pecl extension" | |
echo "==================================" | |
cd /tmp \ | |
&& git clone https://github.com/phpv8/v8js.git \ | |
&& cd v8js \ | |
&& phpize \ | |
&& ./configure --with-v8js=/opt/libv8-7.5 \ | |
&& export NO_INTERACTION=1 \ | |
&& make \ | |
&& make test \ | |
&& make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment