简体   繁体   中英

MAKE for Android OS source code fails

I'm trying to build a custom ROM for Android. Currently, I've setup my build environment and downloaded the source code.

I'm following instructions at https://source.android.com/source/building#build-the-code

Everything works while executing source build/envsetup.sh and lunch , but errors arise when executing 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) ####

It seems that it is caused by xcode 9. see https://forums.developer.apple.com/thread/87814 . I encounted this problem too. I plan to switch to xcode 8.3. I had compiled android 7.1.2 with xcode 8.3 and sdk 10.11, that was ok, no problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM