【问题标题】:Errors when building AOSP using -make使用 -make 构建 AOSP 时出错
【发布时间】:2017-05-16 14:55:40
【问题描述】:

我正在尝试设置一个环境来构建 android 并在模拟器上运行它。我最近进入了 AOSP,目前正在阅读一些关于它的书。想自己弄乱它,我收到以下错误:

external/libcxx/include/cmath:1345:9: error: no member named 'llrint' in the global namespace; did you mean 'lrint'?
external/libcxx/include/cmath:1348:91: error: use of undeclared identifier 'llrintf'
external/libcxx/include/cmath:1349:91: error: use of undeclared identifier 'llrintl'
external/libcxx/include/cmath:1358:9: error: no member named 'llround' in the global namespace; did you mean 'lround'?

12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/hash.o] Error 1
make: *** Waiting for unfinished jobs....
12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/debug.o] Error 1
12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/random.o] Error 1
12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/algorithm.o] Error 1

总共有十二个错误,中间有文字,但我没有全部复制,因为它们完全相同。 (它们都是:错误没有名为“{double L}[SOMETHING]”的成员;您的意思是:{single L}[SOMETHING])

这是运行的结果: 1:source build/envsetup.sh 2:lunch 3:sudo make -j4

我正在使用 El Capitan 并已关注 the official instructions。我遇到的唯一问题是 XCode 没有创建包含正确 SDK 的 /developer/SDKs 文件夹,因此我从 Github 手动下载了 SDK 并将其放入 de SDKs 文件夹(我制作的)。有没有可能是这个问题?

我正在尝试构建的代码是未经修改的 android 6.0.1_r1。我尝试再次运行 repo-init 和 repo sync(以修复代码)但没有任何效果。

我意识到问这个问题有点牵强,但我不知道如何解决这个问题。提前致谢。

【问题讨论】:

    标签: android build android-source


    【解决方案1】:

    您可以尝试使用 MacOSX10.11.sdk 作为您的 MacOSX-SDK

    您可以从 GitHub 下载 MacOSX10.11.sdk:https://github.com/phracker/MacOSX-SDKs

    将 MacOSX10.11.sdk 复制到特定路径(例如 ~/lib)并创建指向 /Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs 的软链接

    $ ln -s ~/lib/MacOSX10.11.sdk /Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk

    (我也将 MacOSX10.11.sdk 复制到 /Developer/SDKs/)

    并修改文件int android源码:build/core/combo/mac_version.mk

    mac_sdk_versions_supported := 10.9 10.10 10.11

    完成! 尝试重新编译源代码!


    操作系统:macOS Sierra 10.12

    Android源码:android6.0.1_r1C

    XCode:版本 8.2.1

    JDK:java版本“1.8.0_101”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多