【问题标题】:MAKE for Android OS source code failsMAKE for Android OS 源代码失败
【发布时间】:2018-03-05 22:26:06
【问题描述】:

我正在尝试为 Android 构建自定义 ROM。 目前,我已经搭建好构建环境并下载了源代码。

我正在遵循https://source.android.com/source/building#build-the-code 的指示

执行source build/envsetup.shlunch时一切正常,但执行make时出现错误:

external/libcxx/include/cmath:679:9: note: using declaration
using ::acos;
        ^
external/libcxx/include/cmath:684:46: error: declaration conflicts with target of using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return acosl(__lcpp_x);}
                                             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:708:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return ::acosl(__lcpp_x);}
                                             ^
external/libcxx/include/cmath:679:9: note: using declaration
using ::acos;
        ^
external/libcxx/include/cmath:690:1: error: declaration conflicts with target of using declaration already in scope
acos(_A1 __lcpp_x) _NOEXCEPT {return acos((double)__lcpp_x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:714:1: note: target of using declaration
acos(_A1 __lcpp_x) _NOEXCEPT {return ::acos((double)__lcpp_x);}

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[  0% 163/43987] host C++: libprotobuf-cpp-full_32 <= external/protobuf/src/google/protobuf/descriptor.cc
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1

#### make failed to build some targets (27 seconds) ####

【问题讨论】:

  • 您找到解决方案了吗?

标签: android operating-system development-environment rom flashing


【解决方案1】:

好像是xcode 9引起的。见https://forums.developer.apple.com/thread/87814。我也遇到过这个问题。我打算切换到 xcode 8.3。我用 xcode 8.3 和 sdk 10.11 编译了 android 7.1.2,没问题。

【讨论】:

  • 今天验证了xcode 8.3.3,可以编译android 7.1.2了。祝你好运。
  • 你救了我的命。谢谢。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-07-27
  • 2020-01-23
  • 1970-01-01
  • 1970-01-01
  • 2016-01-22
  • 1970-01-01
相关资源
最近更新 更多