-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to build for aarch64-linux-android
#1271
Comments
To build it, we have to checkout v8 source and copy missing files. name: CI
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo fetch
# symlink `v8_src` to rusty_v8
- run: cargo metadata | node get_v8_path.js
# FIXME: we have to checkout v8 source, because there is missing files in rusty_v8
#### start checkout v8 source
- run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git --single-branch --depth=1
- run: export PATH=$(pwd)/depot_tools:$PATH && echo $PATH && mkdir v8
# https://v8.dev/docs/source-code
- run: export PATH=$(pwd)/depot_tools:$PATH && cd v8 && gclient
- run: export PATH=$(pwd)/depot_tools:$PATH && cd v8 && fetch v8
# https://v8.dev/docs/cross-compile-arm
- run: echo "target_os = ['android']" >> v8/.gclient
- run: cat v8/.gclient
- run: export PATH=$(pwd)/depot_tools:$PATH && cd v8 && gclient sync
#### done checkout v8 source
# copy missing files
- run: cp -rn v8/v8/build/android v8_src/build || true
# build
- run: cd v8_src && rustup target add aarch64-linux-android
- run: cd v8_src && V8_FROM_SOURCE=1 cargo build -vv --release --target aarch64-linux-android
- uses: actions/upload-artifact@v3
with:
name: librusty_v8_release_aarch64-linux-android.a
path: v8_src/target/aarch64-linux-android/release/gn_out/obj/librusty_v8.a |
|
@afalon44 |
我尝试编译 v0.83.2 成功了,但是我在使用时遇到了一些问题,使用 deno_core 运行例子时会报空指针错误,请问你成功运行了吗 |
以前的版本是可以的, 最新的版本有点问题, 还没成功. |
我还以为是我编译v8出现问题了呢,我现在在尝试重新编译了🤦♂️ |
以前的版本确实是可以的我也一直在用,我之前用的就是 v0.64.0,只是最近我想升级就挑了 v0.83.2,没想到就遇到一些麻烦了 |
我刚测试分别运行 v8 和 deno_core 的 hello_world 例子 v8 运行结果
deno_core 主机运行结果(预期结果)
deno_core 运行结果(实际结果)
crash log
个人对v8研究不是特别深入,看字面意思似乎是字符串相关问题导致的?看来只能换个版本了 |
最新版 deno (aarch64-linux-gnu) 使用 proot 是可以在 Android 正常运行的, 所以这确实是个奇怪的 BUG. |
根据堆栈信息我翻看了一下 deno_core 源码 bindings.rs
bindings.rs
v8/string.rs
然后在 v8 会使用这个 |
Sorry for bumbling into this thread but the timing seemed serendipitous, since I was also trying to get some Android Deno builds off the ground. I ran exactly into the:
I'm not sure if you folks already have a plan of action but wouldn't it be possible to tweak the "gn gen" incantation to exclude all the testonly targets? Presumably we don't care about test targets for rusty_v8 or Deno. Ideally, this wouldn't only solve the issue at hand but also slim builds? |
This can be close now. |
Build command:
got error:
It seems that some files is missing at
build/android/pylib
The text was updated successfully, but these errors were encountered: