linux mint 17编译android 2.3.1错误记录
有转载这里的也有添加的。
################# Fix 1 ##########################
Error:
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::sp<AaptDir> >’ are not found by unqualified lookup
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] Error 1
Fix:
vi frameworks/base/tools/aapt/Android.mk
Add '-fpermissive' to line 31:
LOCAL_CFLAGS += -Wno-format-y2k -fpermissive
################## Fix 2 ##########################
Error:
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::wp<android::AssetManager::SharedZip> >’ are not found by unqualified lookup
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/AssetManager.o] Error 1
Fix:
vi frameworks/base/libs/utils/Android.mk
Add '-fpermissive' to line 64:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
################## Fix 3 ##########################
Error:
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:11: note: use ‘this->SetState’ instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/grxmlcompile_intermediates/grxmlcompile.o] Error 1
Fix:
cd external/srec
wget "https://github.com/CyanogenMod/android_external_srec/commit/4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff"
patch -p1 < 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
rm -f 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
cd ../..
################## Fix 3.1 ##########################
Error:
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
host C: parseStringTest <= external/srec/tools/parseStringTest/parseStringTest.c
<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
frameworks/base/tools/obbtool/Main.cpp:1:0: 附注: 这是先前定义的位置
Fix:
Add -U_FORTIFY_SOURCE
Error:
development/tools/emulator/opengl/host/tools/emugen/main.cpp:79:9: error: ‘optind’ was not declared in this scope
development/tools/emulator/opengl/host/tools/emugen/main.cpp:92:45: error: ‘optind’ was not declared in this scope
make: *** [out/host/linux-x86/obj/EXECUTABLES/emugen_intermediates/main.o] Error 1
Fix:
vi development/tools/emulator/opengl/host/tools/emugen/main.cpp
Add '#include <getopt.h>' to list of includes:
#include <getopt.h>
################## Fix 5 ##########################
Error:
host C++: liboprofile_pp <= external/oprofile/libpp/arrange_profiles.cpp
In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0:
external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1
Fix:
vi external/oprofile/libpp/format_output.h
Remove 'mutable' from 'mutable counts_t & counts;' on line 94:
counts_t & counts;
################## Fix 6 ##########################
Error:
development/tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp:345:65: required from here
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<unsigned int, ShaderData*>’ are not found by unqualified lookup
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libOpenglCodecCommon_intermediates/GLSharedGroup.o] Error 1
Fix:
vi development/tools/emulator/opengl/Android.mk
Add '-fpermissive' to line 25:
EMUGL_COMMON_CFLAGS := -DWITH_GLES2 -fpermissive
################## Fix 7 ##########################
Error:
/usr/bin/ld: note: 'XInitThreads' is defined in DSO /lib/libX11.so.6 so try adding it to the linker command line
/lib/libX11.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer] Error 1
Fix:
vi development/tools/emulator/opengl/host/renderer/Android.mk
Add new entry 'LOCAL_LDLIBS += -lX11' after line 6 as shown:
LOCAL_SRC_FILES := main.cpp
LOCAL_CFLAGS += -O0 -g
LOCAL_LDLIBS += -lX11
#ifeq ($(HOST_OS),windows)
#LOCAL_LDLIBS += -lws2_32
################## Fix 8 ##########################
Error:
external/llvm/include/llvm/ADT/PointerUnion.h:56:10: error: enumeral mismatch in conditional expression: ‘llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::Stmt*, const clang::Type*> >::<anonymous enum>’ vs ‘llvm::PointerLikeTypeTraits<clang::ObjCInterfaceDecl*>::<anonymous enum>’ [-Werror]
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs.o] Error 1
Fix:
vi frameworks/compile/slang/Android.mk
Remove '-Werror' from line 22:
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
################## Fix 9 ##########################
Error:
frameworks/base/libs/rs/rsFont.cpp:224:76: required from here
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<unsigned int, android::renderscript::Font::CachedGlyphInfo*>’ are not found by unqualified lookup
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsFont.o] Error 1
Fix:
vi frameworks/base/libs/rs/Android.mk
Add '-fpermissive' to line 183
LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable -fpermissive
################## Fix 10 #########################
Error:
external/mesa3d/src/glsl/linker.cpp:1394:49: error: expected primary-expression before ‘,’ token
......
external/mesa3d/src/glsl/linker.cpp:1734:59: error: ‘offsetof’ was not declared in this scope
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1
Fix:
vi external/mesa3d/src/glsl/linker.cpp
Add '#include <stddef.h>' to list of includes as shown:
#include <climits>
#include <stddef.h>
#include <pixelflinger2/pixelflinger2_interface.h>
################## Fix 11 #########################
Error:
external/gtest/src/../include/gtest/gtest-param-test.h:287:58: note: ‘template<class Container> testing::internal::ParamGenerator<typename Container::value_type> testing::ValuesIn(const Container&)’ declared here, later in the translation unit
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtest-all.o] Error 1
Two fixes required:
1)
vi external/gtest/src/Android.mk
Add '-fpermissive' to lines 52 and 70 (both lines contain same info)
LOCAL_CFLAGS += -O0 -fpermissive
2)
vi external/gtest/include/gtest/internal/gtest-param-util.h
Add '#include <stddef.h>' to list of includes as shown:
#include <vector>
#include <cstddef>
#include <gtest/internal/gtest-port.h>
host Executable: test-librsloader (out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader)
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Signals.o):在函数‘PrintStackTrace’中:
/home/crow/works/Android_src/external/llvm/lib/Support/Unix/Signals.inc:219:对‘dladdr’未定义的引用
/home/crow/works/Android_src/external/llvm/lib/Support/Unix/Signals.inc:231:对‘dladdr’未定义的引用
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Threading.o):在函数‘llvm::llvm_execute_on_thread(void (*)(void*), void*, unsigned int)’中:
/home/crow/works/Android_src/external/llvm/lib/Support/Threading.cpp:96:对‘pthread_create’未定义的引用
/home/crow/works/Android_src/external/llvm/lib/Support/Threading.cpp:100:对‘pthread_join’未定义的引用
/home/crow/works/Android_src/external/llvm/lib/Support/Threading.cpp:91:对‘pthread_attr_setstacksize’未定义的引用
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o):在函数‘llvm::sys::MutexImpl::MutexImpl(bool)’中:
/home/crow/works/Android_src/external/llvm/lib/Support/Mutex.cpp:69:对‘pthread_mutexattr_init’未定义的引用
/home/crow/works/Android_src/external/llvm/lib/Support/Mutex.cpp:75:对‘pthread_mutexattr_settype’未定义的引用
/home/crow/works/Android_src/external/llvm/lib/Support/Mutex.cpp:80:对‘pthread_mutexattr_setpshared’未定义的引用
/home/crow/works/Android_src/external/llvm/lib/Support/Mutex.cpp:89:对‘pthread_mutexattr_destroy’未定义的引用
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o):在函数‘llvm::sys::MutexImpl::tryacquire()’中:
/home/crow/works/Android_src/external/llvm/lib/Support/Mutex.cpp:143:对‘pthread_mutex_trylock’未定义的引用
collect2: 错误: ld 返回 1
make: *** [out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader] 错误 1
Fix:
$vi external/llvm/llvm-host-build.mk +
LOCAL_LDLIBS := -lpthread -ldl
以上内容来自: http://blog.csdn.net/kangear/article/details/9565889
感谢作者分享.
out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o
Fix:
在dalvik/vm/native/dalvik_system_Zygote.cpp增加一个头文件定义#include <sys/resource.h>
-----------------------------------------------------------------------------------------------------------------------------
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
frameworks/base/tools/obbtool/Main.cpp:1:0: note: this is the location of the previous definition
/*
^
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1
Fix:
修改源码目录下/build/core/combo/HOST_linux-x86.mk文件:
将以下语句
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
修改为
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
linux mint 17编译android 2.3.1错误记录的更多相关文章
- Linux Mint 17 + 小米WIFI创建手机热点
转载:http://www.pppei.net/blog/post/690 亲测可行! 我的系统是linux mint 17.1 64位,所用wifi位小米WIFI. 以下是原文: 此方法在linux ...
- Linux Mint 17一周使用体验
1 Win7下安装Mint双系统 Linux Mint支持直接从Win7硬盘引导安装,非常方便,不用制作U盘引导,更不用刻盘安装了.Mint有Cinnamon和Mate两种桌面,听说Mate更加简洁节 ...
- Linux Mint 17使用小结
用过蛮多的linux系统 linux mint是我比较喜欢和常用的一个系统,装的是linux mint xfce 64位版本,在这里记录使用中遇到的一些问题及解决的方法,备忘,方便以后查看. 1.首先 ...
- Win7 下硬盘安装Linux Mint 17
下载Linux Mint 17镜像,放到C盘根目录:解压出mint.iso文件中casper目录下的vmliunz和initrd.lz两个文件,同样放在C盘的根目录里. 在Win7上安装EasyBCD ...
- 安装Linux Mint 17后要做的20件事
Linux Mint 17 Qiana Cinnamon Linux Mint 17已经发布,定名为Qiana.Mint是Linux最佳发行版之一,它定位于桌面用户,关注可用性和简洁.它携带了风格迥异 ...
- Linux Mint 17.1 安装全配置
Linux Mint 17.1 安装全配置 I. 前言 由于自己的本子出现了一些故障需要重新安装系统,就上网看看今年4,5月份发布的一些新的发行版来试试.原先电脑上安装的是opensuse13.2, ...
- 【原创】linux mint 17.3 kvm 安装windows7虚拟机
一.安装windows7虚拟机 linux mint 17.3是一个不错的桌面发行版本,我下载了 linux mint 17.3 for xfce 桌面版本,运行速度没得说,而且安装设置都挺简单,非常 ...
- Linux Mint下编译Bochs
我在Linux Mint命令行下输入sudo apt-get install bochs安装之后发现这个没有安装gui界面,使用也存在一些问题,所以直接删掉从官网下载代码自己编译安装. 给Linux ...
- Linux mint 17.3系统安装及常用开发办公软件部署
关于为什么选择linuxmint17.3作为个人办公开发系统的选择说明: 编者按]提起Linux系统,大家可能最先想到的就是 Linux Mint 和 Ubuntu 两个版本了.近来,开源界貌似激进了 ...
随机推荐
- Python基础 2-2 列表的实际应用场景
引言 本章主要介绍列表在实际应用中的使用场景,多维列表(嵌套列表) 如果你需要在列表保存每个人员的一些基本信息,使用列表嵌套来保存这种信息是个不错的主意. 多维列表 列表可以根据实际情况嵌套使用,比如 ...
- MSIL实用指南-加载int值
这一篇讲的是怎样加载整数值到运算栈上.这一类的指令都是以Ldc_I4开头. Ldc_I4类OpCodes的Ldc_I4字段的功能是把一个int值压入运算栈上.它的使用方法是ilGenerator.Em ...
- docker运行原理与使用总结
docker运行原理概述 Client-Server架构 docker守护进程运行在宿主机上systemctl start docker daemon进程通过socket从客户端(docker命令)接 ...
- Java深层复制方式
为什么需要深层复制 Object 的 clone() 方法是浅层复制(但是 native 很高效).另外,Java 提供了数组和集合的复制方法,分别是 Arrays.copy() 和 Collecti ...
- 2019NC#1
LINK B Integration 题意: 给定$a_1,a_2,...,a_n$, 计算 $$\frac{1}{π}\int_{0}^{\infty}\frac{1}{\prod\limits_{ ...
- 牛客20347 SDOI2011计算器(bsgs
https://ac.nowcoder.com/acm/problem/20347 这篇是为了补bsgs(北上广深算法). 题意: 1.给定y,z,p,计算Y^Z Mod P 的值: 2.给定y,z ...
- CF980B Marlin 构造 思维 二十四
Marlin time limit per test 1 second memory limit per test 256 megabytes input standard input output ...
- map + filter + reduce
map 是对 集合 里面的元素一个接一个的进行某种运算,常常与lambda 结合使用 #求平方: items = [1, 2, 3, 4, 5] squared = list(map(lambda ...
- 小白专场-树的同构-c语言实现.md
目录 一.题意理解 二.求解思路 2.1 二叉树表示 2.2 程序框架搭建 2.3 如何建二叉树 2.4 如何判别两二叉树同构 更新.更全的<数据结构与算法>的更新网站,更有python. ...
- 微信小程序集成腾讯云 IM SDK
微信小程序集成腾讯云 IM SDK 1.背景 因业务功能需求需要接入IM(即时聊天)功能,一开始想到的是使用 WebSocket 来实现这个功能,然天意捉弄(哈哈)服务器版本太低不支持 wx 协议(也 ...