博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【OSX】build AOSP 2.3.7时的build error解决
阅读量:6503 次
发布时间:2019-06-24

本文共 5180 字,大约阅读时间需要 17 分钟。

原始的error log:

1 ============================================ 2 PLATFORM_VERSION_CODENAME=REL 3 PLATFORM_VERSION=2.3.7 4 TARGET_PRODUCT=generic 5 TARGET_BUILD_VARIANT=eng 6 TARGET_SIMULATOR= 7 TARGET_BUILD_TYPE=release 8 TARGET_BUILD_APPS= 9 TARGET_ARCH=arm10 HOST_ARCH=x8611 HOST_OS=darwin12 HOST_BUILD_TYPE=release13 BUILD_ID=GWK7414 ============================================15 find: frameworks/base/frameworks/base/docs/html: No such file or directory16 find: out/target/common/docs/gen: No such file or directory17 find: frameworks/base/frameworks/base/docs/html: No such file or directory18 find: out/target/common/docs/gen: No such file or directory19 find: frameworks/base/frameworks/base/docs/html: No such file or directory20 find: out/target/common/docs/gen: No such file or directory21 find: frameworks/base/frameworks/base/docs/html: No such file or directory22 find: out/target/common/docs/gen: No such file or directory23 find: frameworks/base/frameworks/base/docs/html: No such file or directory24 find: out/target/common/docs/gen: No such file or directory25 host C: libclearsilver-jni <= external/clearsilver/java-jni/j_neo_util.c26 host C: libclearsilver-jni <= external/clearsilver/java-jni/j_neo_cs.c27 host C: libneo_util <= external/clearsilver/util/neo_files.c28 host StaticLib: libhost (out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a)29 echo out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.o | xargs ar cqs  out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a30 external/clearsilver/util/neo_files.c:219:12: error: expected expression31     return nerr_raise(NERR_ASSERT, "Invalid call to ne_listdir_fmatch");32            ^33 external/clearsilver/util/neo_err.h:88:69: note: expanded from macro34       'nerr_raise'35    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)36                                                                     ^37 1 error generated.38 host C: libneo_util <= external/clearsilver/util/ulist.c39 make: *** [out/host/darwin-x86/obj/SHARED_LIBRARIES/libneo_util_intermediates/neo_files.o] Error 140 make: *** Waiting for unfinished jobs....41 external/clearsilver/java-jni/j_neo_util.c:257:12: error: expected expression42     return nerr_raise(NERR_ASSERT,43            ^44 external/clearsilver/java-jni/../util/neo_err.h:88:69: note: expanded from macro45       'nerr_raise'46    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)47                                                                     ^48 external/clearsilver/java-jni/j_neo_util.c:268:12: error: expected expression49     return nerr_raise(NERR_ASSERT,50            ^51 external/clearsilver/java-jni/../util/neo_err.h:88:69: note: expanded from macro52       'nerr_raise'53    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)54                                                                     ^55 2 errors generated.56 make: *** [out/host/darwin-x86/obj/SHARED_LIBRARIES/libclearsilver-jni_intermediates/j_neo_util.o] Error 157 external/clearsilver/util/ulist.c:64:12: error: expected expression58     return nerr_raise(NERR_NOMEM, "Unable to create ULIST: Out of memory");59            ^60 external/clearsilver/util/neo_err.h:88:69: note: expanded from macro61       'nerr_raise'62    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)63                                                                     ^64 external/clearsilver/util/ulist.c:70:12: error: expected expression65     return nerr_raise(NERR_NOMEM, "Unable to create ULIST: Out of memory");66            ^67 external/clearsilver/util/neo_err.h:88:69: note: expanded from macro68       'nerr_raise'69    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)70                                                                     ^71 external/clearsilver/util/ulist.c:124:12: error: expected expression72     return nerr_raise(NERR_OUTOFRANGE, "uListPop: empty list");73            ^74 external/clearsilver/util/neo_err.h:88:69: note: expanded from macro75       'nerr_raise'76    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)77                                                                     ^78 3 errors generated.79 make: *** [out/host/darwin-x86/obj/SHARED_LIBRARIES/libneo_util_intermediates/ulist.o] Error 1

以“error: expected expression return nerr_raise(NERR_ASSERT,” 为keyword找到:

https://groups.google.com/forum/#!msg/android-building/Vhw56NONaAM/GLfo0yfnsB4J

这贴里面这位Josh老兄给出的解法:

The following should fix this:

1 $ sudo mv /usr/bin/cc /usr/bin/cc.bak2 $ sudo mv /usr/bin/c++ /usr/bin/c++.bak3 $ sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/cc4 $ sudo ln -s /usr/bin/llvm-g++-4.2 /usr/bin/c++

哦,原来是OSX下默认的compiler指向的问题, AOSP要使用gcc和g++,而原始的link指向是:

cc->clang

c++->clang++

(Clang: http://en.wikipedia.org/wiki/Clang)

所以我们需要将之前的link断开, 设置为gcc和g++。

1 $ sudo rm /usr/bin/cc /usr/bin/c++2 $ sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/cc3 $ sudo ln -s /usr/bin/llvm-g++-4.2 /usr/bin/c++

问题解决。

 

 

 

 

 

转载于:https://www.cnblogs.com/simov/p/3553971.html

你可能感兴趣的文章
mupdf不支持x64_Window权限维持(七):安全支持提供者
查看>>
cf修改游戏客户端是什么意思_瓦罗兰特很有可能取代cf成为国内最火的fps游戏...
查看>>
proto文件支持继承吗_JavaScript继承(一)——原型链
查看>>
labview如何弹出提示窗口_LabVIEW开发者必读的问答汇总,搞定疑难杂症全靠它了!...
查看>>
提取series中的数值_Python中None和numpy.nan的区别
查看>>
hikariconfig mysql_HikariConfig配置解析
查看>>
mysql批量数据多次查询数据库_mysql数据库批量操作
查看>>
jquery 乱码 传参_jquery获取URL中参数解决中文乱码问题的两种方法
查看>>
JDBC_MySQL_jdbc连接mysql_MySQL
查看>>
mysql cte的好处_Mysql 8 重要新特性 - CTE 通用表表达式
查看>>
zcu106 固化_xilinx zcu106 vcu demo
查看>>
java ftpclient 代码_java后台代码ftpclient下载文件
查看>>
java数据库生成model_继承BaseModelGenerator 生成Model时添加数据库表字段 生成代码示例...
查看>>
java面向对象的概念_java面向对象(上)-- 面向对象的概念
查看>>
java内部类访问外部类变量 final_Java内部类引用外部类中的局部变量为什么必须是final问题解析...
查看>>
java 栈帧与类的关系_深入理解Java虚拟机之类运行时栈帧结构
查看>>
php中删除评论怎么做的,详解PHP如何实现评论回复删除功能
查看>>
macports 安装php,「macports」MacOS 中 MacPorts 安装和使用 - 金橙教程网
查看>>
php 审计 for linux,for linux是什么意思
查看>>
matlab里面连接器是什么,Oops - an error has occurred
查看>>