These RPM were built to have an easy way to install the google's javascript engine v8 5.x and v8js php extension for EL7 users.
- You can install prebuilt rpm binary package from here. (Recommended method)
$ wget https://github.com/lesstif/v8js-rpm/releases/download/5.2.371/v8-5.2.371-1.x86_64.rpm
$ wget https://github.com/lesstif/v8js-rpm/releases/download/1.3.1-1/v8js-1.3.1-2.x86_64.rpm
$ sudo yum localinstall v8*.rpm -y
- GNU make
- g++ 4.8 or newer
- libicu-devel
yum install gcc-c++ make libicu-devel
- install depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
cd depot_tools
- adding PATH variable
export PATH=`pwd`/depot_tools:"$PATH"
- download v8 source
fetch v8
cd v8
- All build dependencies are fetched by running:
gclient sync
- checkout tag
git checkout tags/5.2.371
- setting build variable
# use libicu of operating system
export GYPFLAGS="-Duse_system_icu=1"
# Build (with internal snapshots)
export GYPFLAGS="${GYPFLAGS} -Dv8_use_snapshot=true - Dv8_use_external_startup_data=0 "
# eliminates swarming_client dependency
export GYPFLAGS="${GYPFLAGS} -Dtest_isolation_mode=noop"
# Force gyp to use system-wide ld.gold
export GYPFLAGS="${GYPFLAGS} -Dlinux_use_bundled_gold=0"
- compile
make x64.release library=shared snapshot=on i18nsupport=on -j8
change /home/lesstif/v8 to your v8 checkout directory.
rpmbuild -bb v8.spec --buildroot=/tmp/v8 --define="pre_built_dir /home/lesstif/v8"
- clone v8js
git clone https://github.com/phpv8/v8js
- checkout tag
git checkout tags/1.3.1
- compile
phpize
./configure
make
make test
change /home/lesstif/v8js to your v8js checkout directory.
rpmbuild -bb v8js.spec --define="pre_built_dir /home/lesstif/v8js"