Created
March 24, 2016 10:30
-
-
Save spyl94/d8ff1a0ef438aaaec26c to your computer and use it in GitHub Desktop.
Dockerfile command to install recent v8 and v8js php7 extension
This file contains 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
FROM debian:jessie | |
# Install recent v8, phpv8js | |
RUN apt-get update && \ | |
apt-get upgrade -y && \ | |
apt-get install -y vim git git-svn subversion make g++ libreadline-dev && \ | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /usr/local/depot_tools && \ | |
export PATH=/usr/local/depot_tools:$PATH && \ | |
cd /tmp && \ | |
fetch v8 && \ | |
cd v8 && \ | |
git checkout 4.9.385.28 && \ | |
gclient sync && \ | |
export GYP_DEFINES="use_system_icu=1" && \ | |
export GYPFLAGS="-Dv8_use_external_startup_data=0" && \ | |
make native library=shared snapshot=on -j4 && \ | |
cp out/native/lib.target/lib*.so /usr/lib/ && \ | |
cp out/native/obj.target/tools/gyp/libv8_libplatform.a /usr/lib && \ | |
cp -R include/* /usr/include && \ | |
git clone https://github.com/phpv8/v8js.git --branch 1.1.0 /tmp/v8js && \ | |
cd /tmp/v8js && phpize && ./configure && \ | |
make all test install && \ | |
cd / && \ | |
rm -rf /tmp /usr/local/depot_tools && \ | |
apt-get purge -y vim git git-svn subversion make g++ libreadline-dev && \ | |
apt-get autoremove -y && \ | |
apt-get clean all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is not working for me....
CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/debug/x64/debug-x64.o CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/full-codegen/x64/full-codegen-x64.o CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/ic/x64/access-compiler-x64.o CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/ic/x64/handler-compiler-x64.o CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/ic/x64/ic-x64.o CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/ic/x64/ic-compiler-x64.o CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/ic/x64/stub-cache-x64.o CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/regexp/x64/regexp-macro-assembler-x64.o CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/compiler/x64/code-generator-x64.o CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/compiler/x64/instruction-scheduler-x64.o CXX(target) /tmp/v8/out/native/obj.target/v8_base/src/compiler/x64/instruction-selector-x64.o AR(target) /tmp/v8/out/native/obj.target/tools/gyp/libv8_nosnapshot.a AR(target) /tmp/v8/out/native/obj.target/tools/gyp/libv8_base.a CXX(target) /tmp/v8/out/native/obj.target/mksnapshot/src/snapshot/mksnapshot.o LINK(target) /tmp/v8/out/native/mksnapshot /tmp/v8/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o: unsupported reloc 42 against global symbol __gmon_start__ /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o(.init+0x7): error: unsupported reloc 42 clang: error: linker command failed with exit code 1 (use -v to see invocation) tools/gyp/mksnapshot.target.native.mk:273: recipe for target '/tmp/v8/out/native/mksnapshot' failed make[1]: *** [/tmp/v8/out/native/mksnapshot] Error 1 rm third_party_icu_icu_gyp_icuuc_target_generate_icuuc_shim_headers.intermediate third_party_icu_icu_gyp_icui18n_target_generate_icui18n_shim_headers.intermediate make[1]: Leaving directory '/tmp/v8/out' Makefile:312: recipe for target 'native' failed make: *** [native] Error 2