Git Product home page Git Product logo

v8-android-buildscripts's Introduction

npm version Build for Android iOS build

V8 build scripts for React Native Android

The aim of this project is to support V8 runtime for React Native.

Integrate prebuilt V8 library

We publish prebuilt V8 shared libraries at npm. https://www.npmjs.com/package/v8-android

This makes upgrade V8 from React Native easier and is pretty much like what jsc-android-buildscripts did.

To integrate with React Native, please check react-native-v8.

V8 Feature Flags

V8 comes in 4 flavours

  • v8 lite mode (memory optimized)
  • v8 lite mode + no intl (memory optimized + smaller size)
  • v8 JIT (performance optimized)
  • v8 JIT + no intl (performance optimized + smaller size)

Features

  1. Single libv8android.so (or libv8.so on iOS) file.
  2. Support i18n and JavaScript Intl.
  3. V8 Lite mode (JIT-less mode) https://v8.dev/blog/v8-lite
  4. Build by Android official NDK r23c which prevent potential ABI incompatible issue to integrate with React Native.

Build Guides

Prerequisites

  • Ubuntu 20.04
  • git + python + nodejs + npm + wget + yarn

Build steps

# Checkout V8 code and install necessary packages
yarn setup

# Build
yarn start

Could further check real build steps from GitHub Actions.

v8-android-buildscripts's People

Contributors

kudo avatar sirpy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

v8-android-buildscripts's Issues

Release a version with JIT

I'm working with cryptography on react-native using javascript libraries, on android it is very slow.
I've tried running with the latest JavascriptCore which improves performance and reduces runtime to half but still it takes about 2 seconds where on IOS it runs in milliseconds.
I've tried v8 which doesnt improve performance and have results like the old JavascriptCore.

Maybe a v8 with JIT could help with performance.
Also on android chrome it runs fast, so why would v8 be so slow?
Any chance you can add to the build automatic build also a version with JIT enabled?

signal 5 (SIGTRAP), code 1 (TRAP_BRKPT) v8::base::OS::Abort()

hello,our project has reported so crash:

  #00  pc 00000000003acf7c  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libv8android.so (v8::base::OS::Abort()+24)
  #00  pc 00000000003a8b90  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libv8android.so (V8_Fatal(char const*, ...)+372)
  #00  pc 00000000006cbb54  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libv8android.so
  #00  pc 000000000002ae04  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libv8executor.so (facebook::V8Runtime::V8Runtime(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&)+204)
  #00  pc 000000000002acec  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libv8executor.so (facebook::createV8Runtime(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&)+40)
  #00  pc 000000000002199c  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libv8executor.so (facebook::react::V8ExecutorFactory::createJSExecutor(std::__ndk1::shared_ptr<facebook::react::ExecutorDelegate>, std::__ndk1::shared_ptr<facebook::react::MessageQueueThread>)+64)
  #00  pc 00000000000a7260  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libreactnativejni.so (facebook::react::NativeToJsBridge::NativeToJsBridge(facebook::react::JSExecutorFactory*, std::__ndk1::shared_ptr<facebook::react::ModuleRegistry>, std::__ndk1::shared_ptr<facebook::react::MessageQueueThread>, std::__ndk1::shared_ptr<facebook::react::InstanceCallback>)+252)
  #00  pc 000000000009e578  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libreactnativejni.so
  #00  pc 000000000006df2c  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libreactnativejni.so
  #00  pc 000000000006be90  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libreactnativejni.so
  #00  pc 000000000005b45c  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libreactnativejni.so (facebook::jni::detail::MethodWrapper<void (facebook::react::JNativeRunnable::*)(), &facebook::react::JNativeRunnable::run(), facebook::react::JNativeRunnable, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject*>)+32)
  #00  pc 000000000005b3d8  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/lib/arm64/libreactnativejni.so (facebook::jni::detail::FunctionWrapper<void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject*>), &facebook::jni::detail::MethodWrapper<void (facebook::react::JNativeRunnable::*)(), &facebook::react::JNativeRunnable::run(), facebook::react::JNativeRunnable, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject*>), facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject*, void>::call(_JNIEnv*, _jobject*)+56)
  #00  pc 00000000002b71cc  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/oat/arm64/base.odex (art_jni_trampoline+124)
  #00  pc 00000000008a6f1c  /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+76)
  #00  pc 00000000005109e4  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/oat/arm64/base.odex (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage+52)
  #00  pc 00000000008aa570  /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+1456)
  #00  pc 0000000000510c04  /data/app/com.xiao.smart-7NraJESEkXjsuDur8IdjFA==/oat/arm64/base.odex (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+324)
  #00  pc 0000000000216fc8  /system/framework/arm64/boot.oat (java.lang.Thread.run+72)
  #00  pc 0000000000144334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
  #00  pc 00000000001531a4  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+252)
  #00  pc 00000000004c6e90  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #00  pc 00000000004c7f24  /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416)
  #00  pc 0000000000507ef4  /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176)
  #00  pc 00000000000cf700  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #00  pc 00000000000720e8  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

External snapshot file

Latest packages have snapshot bin as external files.
Do envision to release a package with snapshots as non-external data ?

As I'm reading more carefully env.sh, I'm seeing that jit is disabled for non-external data:

Is it possible to have JIT and non-external data?

App crash on startup with v7.8.0

App is crashing on startup with v8-android version 7.8.0. It is working fine with v7.5.1.

React Native Version

System:
OS: macOS Mojave 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 241.96 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.1 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
Android NDK: 20.0.5594570
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.4 => 0.60.4
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-create-library: 3.1.2
react-native-git-upgrade: 0.2.7
react-native-wm-utils: 1.0.10

Stacktrace

D/ReactNative(23345): ReactInstanceManager.recreateReactContextInBackgroundInner()
D/ReactNative(23345): ReactInstanceManager.recreateReactContextInBackgroundFromBundleLoader()
D/ReactNative(23345): ReactInstanceManager.recreateReactContextInBackground()
D/ReactNative(23345): ReactInstanceManager.runCreateReactContextOnNewThread()
D/SoLoader(23345): About to load: libhermes.so
D/SoLoader(23345): libhermes.so not found on /data/data/com.-.-/lib-main
D/SoLoader(23345): libhermes.so not found on /data/app/com.-.-/lib/arm
D/SoLoader(23345): libhermes.so not found on /system/vendor/lib
D/SoLoader(23345): libhermes.so not found on /system/lib
E/SoLoader(23345): couldn't find DSO to load: libhermes.so
E/AndroidRuntime(23345): FATAL EXCEPTION: create_react_context
E/AndroidRuntime(23345): Process: com.-.-, PID: 23345
E/AndroidRuntime(23345): java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
E/AndroidRuntime(23345): at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
E/AndroidRuntime(23345): at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
E/AndroidRuntime(23345): at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
E/AndroidRuntime(23345): at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
E/AndroidRuntime(23345): at com.facebook.hermes.reactexecutor.HermesExecutor.(HermesExecutor.java:20)
E/AndroidRuntime(23345): at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27)

Build x64 version with AddressSanitizer fails

Built on https://github.com/Sunbreak/v8-android-buildscripts/tree/7.8.1-asan

$ NO_INTL=1 ./scripts/build.sh
ninja: Entering directory `out.v8.arm'
ninja: no work to do.
ninja: Entering directory `out.v8.x86'
ninja: no work to do.
ninja: Entering directory `out.v8.arm64'
ninja: no work to do.
ninja: Entering directory `out.v8.x64'
[1/1] SOLINK_MODULE ./libv8android.so
FAILED: libv8android.so lib.unstripped/libv8android.so
../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -fuse-ld=lld -Wl,--color-diagnostics -Wl,--no-rosegment -Wl,--exclude-libs=libgcc.a -Wl,--exclude-libs=libvpx_assembly_arm.a --target=x86_64-linux-android21 -m64 -Werror --sysroot=../android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot -B../android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64 -Wl,--warn-shared-textrel -fsanitize=address -fsanitize-address-use-after-scope -Wl,--warn-shared-textrel -Wl,-O2 -Wl,--gc-sections -Wl,-u_sanitizer_options_link_helper -fsanitize=address -fsanitize-address-use-after-scope -o "./lib.unstripped/libv8android.so" -Wl,-soname="libv8android.so" @"./libv8android.so.rsp" && ../buildtools/third_party/eu-strip/bin/eu-strip -o "./libv8android.so" "./lib.unstripped/libv8android.so"
ld.lld: error: cannot open /home/ubuntu/v7.8.x/v8-android-buildscripts/v8/third_party/llvm-build/Release+Asserts/lib/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64-android.so: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

clang/10.0.0 x64 dependencies are missing while arm, x86 and arm64 are present

ls -al v8/third_party/llvm-build/Release+Asserts/lib/clang/10.0.0/lib/linux/libclang_rt.asan*android*
-rwxr-xr-x 1 ubuntu ubuntu 1268176 8月  28  2019 v8/third_party/llvm-build/Release+Asserts/lib/clang/10.0.0/lib/linux/libclang_rt.asan-aarch64-android.so
-rwxr-xr-x 1 ubuntu ubuntu 1183072 8月  28  2019 v8/third_party/llvm-build/Release+Asserts/lib/clang/10.0.0/lib/linux/libclang_rt.asan-arm-android.so
-rwxr-xr-x 1 ubuntu ubuntu 1301792 8月  28  2019 v8/third_party/llvm-build/Release+Asserts/lib/clang/10.0.0/lib/linux/libclang_rt.asan-i686-android.so

Built on https://github.com/Sunbreak/v8-android-buildscripts/tree/7.8.1-asan

$ NO_INTL=true ./scripts/build.sh android x64
ninja: Entering directory `v8/out.v8.x64'
[1/1] SOLINK_MODULE ./libv8android.so
FAILED: libv8android.so lib.unstripped/libv8android.so
../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -fuse-ld=lld -Wl,--fatal-warnings -Wl,--build-id -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--color-diagnostics -Wl,--no-rosegment -Wl,--no-call-graph-profile-sort -Wl,--exclude-libs=libgcc.a -Wl,--exclude-libs=libvpx_assembly_arm.a --rtlib=libgcc --target=x86_64-linux-android23 -m64 -no-canonical-prefixes --sysroot=../android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/sysroot --gcc-toolchain=../android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64 -Wl,--warn-shared-textrel -fsanitize=address -Wl,--warn-shared-textrel -Wl,-O2 -Wl,--gc-sections -Wl,-u_sanitizer_options_link_helper -fsanitize=address -o "./lib.unstripped/libv8android.so" -Wl,-soname="libv8android.so" @"./libv8android.so.rsp" && ../third_party/llvm-build/Release+Asserts/bin/llvm-strip -o "./libv8android.so" "./lib.unstripped/libv8android.so"
ld.lld: error: cannot open ../third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan-x86_64-android.so: No such file or directory
ld.lld: error: cannot open ../third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan_static-x86_64-android.a: No such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

clang 15.0.0 x64 dependencies are missing while arm, x86 and arm64 are present

$ ls -al v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan*android*
-rwxr-xr-x 1 ubuntu ubuntu 1390064 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan-aarch64-android.so
-rwxr-xr-x 1 ubuntu ubuntu 1316764 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan-arm-android.so
-rwxr-xr-x 1 ubuntu ubuntu 1385684 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan-i686-android.so
-rw-r--r-- 1 ubuntu ubuntu    5576 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan_static-aarch64-android.a
-rw-r--r-- 1 ubuntu ubuntu    4452 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan_static-arm-android.a
-rw-r--r-- 1 ubuntu ubuntu    4536 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan_static-i686-android.a

Build on Mac OS need input password

image

I'm trying to build v8 so library for Android on Mac. When running 'yarn setup' the progress is stuck at need input a password. What is the password, how can get the password? Thanks!

the size of libv8android.so is too big, how can I find a smaller one?

When I use the command "yarn add [email protected]" to download the v8 engine, I find the size of v8-android-7.8.2.aar is 29.4MB, while android-jsc-r245459.aar is just 12.5MB。

The size of our android project is huge, so I'm afraid I can't afford any increase in the engine's size,
So how can I find a smaller v8?
Could U please upload a smaller to npm?

Looking forward to hearing from you~

build failed: command(yarn setup)

error msg:
at v8/build/install-build-deps.sh.rej
--- build/install-build-deps.sh
+++ build/install-build-deps.sh
@@ -570,9 +570,9 @@ fi
if package_exists libinput-dev; then
dev_list="${dev_list} libinput-dev"
fi
-if package_exists snapcraft; then

dev_list="${dev_list} snapcraft"
-fi
+# if package_exists snapcraft; then
+# dev_list="${dev_list} snapcraft"
+# fi

ubuntu 版本:20.04
ndk版本:r23c

Failed to remove...invalid cross-device link

I'm now getting an issue with the current HEAD of https://github.com/Kudo/v8-android-buildscripts that I don't get if I build with cba3209 (which builds, but is incompatible with RN 0.61.5):

> bash -c '. ./scripts/export_npm_env.sh && ./scripts/start.sh android'


WARNING: 'v8/third_party/zlib' is no longer part of this client.
It is recommended that you manually remove it or use 'gclient sync -D' next time.

________ running 'cipd ensure -log-level error -root /home/ubuntu/v8-android-buildscripts -ensure-file /tmp/tmp8ENUn3.ensure' in '.'
[P678 01:15:44.013 client.go:1522 E] Failed to remove chromium/third_party/android_sdk/public/build-tools/29.0.2 - rename /home/ubuntu/v8-android-buildscripts/.cipd/pkgs/1 /home/ubuntu/v8-android-buildscripts/.cipd/pkgs/JTt8mo5PtaYO: invalid cross-device link (subdir "v8/third_party/android_sdk/public")
[P678 01:15:44.841 client.go:1522 E] Failed to remove chromium/third_party/android_sdk/public/platforms/android-29 - rename /home/ubuntu/v8-android-buildscripts/.cipd/pkgs/6 /home/ubuntu/v8-android-buildscripts/.cipd/pkgs/7FjtupeOTVNI: invalid cross-device link (subdir "v8/third_party/android_sdk/public")
[P678 01:15:45.420 client.go:1522 E] Failed to remove chromium/third_party/android_sdk/public/sources/android-29 - rename /home/ubuntu/v8-android-buildscripts/.cipd/pkgs/7 /home/ubuntu/v8-android-buildscripts/.cipd/pkgs/OHozfRE0fmDj: invalid cross-device link (subdir "v8/third_party/android_sdk/public")
Error: failed to update packages, see the log.
Error: Command 'cipd ensure -log-level error -root /home/ubuntu/v8-android-buildscripts -ensure-file /tmp/tmp8ENUn3.ensure' returned non-zero exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @7.8.2 start: `bash -c '. ./scripts/export_npm_env.sh && ./scripts/start.sh android'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @7.8.2 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2020-01-15T01_16_33_960Z-debug.log
The command '/bin/sh -c bash -c "NO_INTL=1 npm run start"' returned a non-zero code: 1

Any ideas?

libatomic1 dependency missing in build

Hi,

I'm trying to build this in a stock-ish Ubuntu container, but I can't seem to figure out how to get the script to find libatomic.so.1. It fails near the end no matter what I do. It worked 2 months ago, but recently it no longer works.

The error:

[2279/2291] STAMP clang_x86_v8_arm/obj/v8_base_without_compiler.stamp
[2280/2291] LINK clang_x86_v8_arm/mksnapshot
[2281/2291] ACTION //:run_mksnapshot_default(//build/toolchain/android:android_clang_arm)
FAILED: gen/embedded.S gen/snapshot.cc
python ../tools/run.py ./clang_x86_v8_arm/mksnapshot --turbo_instruction_scheduling --target_os=android --target_arch=arm --embedded_src gen/embedded.S --embedded_variant Default --random-seed 314159265 --startup_src gen/snapshot.cc --no-native-code-counters
./clang_x86_v8_arm/mksnapshot: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
ninja: build stopped: subcommand failed.
error Command failed with exit code 1.

Any suggestions?

FROM ubuntu:18.04

RUN apt-get update && apt-get install -y git python wget curl sudo
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install nodejs
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install -y yarn

ENV DEBIAN_FRONTEND=noninteractive
RUN ln -s /usr/share/zoneinfo/UTC /etc/localtime
RUN apt-get install -y tzdata

# v8 dependencies
RUN apt-get install -y libpci3 libx11-xcb1 linux-libc-dev \
        apache2-bin binutils binutils-aarch64-linux-gnu \
        binutils-arm-linux-gnueabihf binutils-mips64el-linux-gnuabi64 \
        binutils-mipsel-linux-gnu bison bzip2 cdbs curl dbus-x11 \
        devscripts dpkg-dev elfutils fakeroot flex git-core gperf \
        libapache2-mod-php7.2 libappindicator3-1 libappindicator3-dev \
        libasound2 libasound2-dev libatk1.0-0 libatspi2.0-0
RUN apt-get install -y libatspi2.0-dev libbluetooth-dev libbrlapi-dev libbrlapi0.6 \
        libbz2-1.0 libbz2-dev libc6 libc6-dev libcairo2 libcairo2-dev \
        libcap-dev libcap2 libcups2 libcups2-dev libcurl4-gnutls-dev \
        libdrm-dev libelf-dev libexpat1 libffi-dev libffi6 \
        libfontconfig1 libfreetype6 libgbm-dev libglib2.0-0 \
        libglib2.0-dev libglu1-mesa-dev libgnome-keyring-dev \
        libgnome-keyring0 libgtk-3-0 libgtk-3-dev libjpeg-dev
RUN apt-get install -y libkrb5-dev libnspr4 libnspr4-dev libnss3 libnss3-dev \
        libpam0g libpam0g-dev libpango1.0-0 libpci-dev libpci3 \
        libpcre3 libpixman-1-0 libpng16-16 libpulse-dev libpulse0 \
        libsctp-dev libspeechd-dev libspeechd2 libsqlite3-0 \
        libsqlite3-dev libssl-dev libstdc++6 libudev-dev libudev1 \
        libuuid1 libwayland-egl1-mesa libwww-perl libx11-6 libx11-xcb1 \
        libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1
RUN apt-get install -y libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1 \
        libxkbcommon-dev libxrandr2 libxrender1 libxslt1-dev \
        libxss-dev libxt-dev libxtst-dev libxtst6 locales openbox \
        p7zip patch perl php7.2-cgi pkg-config python python-cherrypy3 \
        python-crypto python-dev python-numpy python-opencv \
        python-openssl python-psutil python-yaml rpm ruby subversion \
        uuid-dev wdiff x11-utils xcompmgr xz-utils zip zlib1g

RUN apt-get install -y openjdk-8-jdk

# Try to get libatomic recognized
RUN apt-get install -y libatomic1-armhf-cross
ENV LIBRARY_PATH="/usr/arm-linux-gnueabihf/lib"

ARG V8_COMMIT=origin/master
ARG RN_COMMIT=origin/master
WORKDIR /home
ADD ./container/ .

ENV ANDROID_NDK_HOME=/root/v8-android-buildscripts/v8/third_party/android_tools/ndk
ENV ANDROID_SDK_ROOT=/root/v8-android-buildscripts/v8/third_party/android_tools/sdk

RUN ./v8-android-buildscripts.sh -c $V8_COMMIT
RUN ./react-native-v8.sh -c $RN_COMMIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.