【问题标题】:Cross compiling - V8 build for android on mac交叉编译 - 在 mac 上为 android 构建 V8
【发布时间】:2017-09-15 09:15:22
【问题描述】:

关于这个问题有一些问题。但答案没有帮助。我尝试为 android 生成 D8。 The v8 guide 表示不推荐使用 gyp。我的步骤在这里:

  1. git 克隆https://chromium.googlesource.com/chromium/tools/depot_tools.git
    1. 导出 PATH='pwd'/depot_tools:"$PATH"
    2. 下载ndk-r14b
    3. 获取 v8
    4. cd v8
    5. echo "target_os = ['android']" >> ../.gclient && gclient sync --nohooks
    6. tools/dev/v8gen.py arm.release
    7. gn gen out.gn/arm.release --args='android_ndk_root="/path/android-ndk-r14b" android_ndk_version="r14" v8_static_library=true android_sdk_root="/path/android-sdk-r25" target_os = "android" target_cpu = "arm" v8_target_cpu = "arm" is_component_build = false'
    8. ninja -C out.gn/arm.release d8

编译会引发一些错误。

In file included from ../../third_party/icu/source/common/unicode/unistr.h:33:0,
                 from ../../third_party/icu/source/common/unicode/locid.h:36,
                 from ../../third_party/icu/source/i18n/unicode/dcfmtsym.h:36,
                 from ../../third_party/icu/source/i18n/unicode/decimfmt.h:38,
                 from ../../third_party/icu/source/i18n/digitlst.h:32,
                 from ../../third_party/icu/source/i18n/visibledigits.cpp:18:
../../third_party/icu/source/common/unicode/std_string.h:35:18: fatal error: string: No such file or directory
 #include <string>
                  ^
compilation terminated.
[6/939] CC obj/third_party/icu/icui18n/utmscale.o
ninja: build stopped: subcommand failed.

我该如何解决?

【问题讨论】:

  • 您需要查看您的链接,您为链接指定了 4 v8 指南,但是没有 4,您的问题中有 1 和 2 .你能纠正他们吗?
  • 大概你需要指定一个STL来使用。不确定如何在 gn 中执行此操作,但在 ndk-build 中这将是 APP_STL

标签: android macos android-ndk cross-compiling v8


【解决方案1】:

你忘了

android_ndk_major_version=14

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-05
    • 1970-01-01
    • 2022-10-06
    • 1970-01-01
    • 1970-01-01
    • 2017-08-04
    相关资源
    最近更新 更多