码迷,mamicode.com
首页 > 移动开发 > 详细

android系统编译记录

时间:2015-10-23 18:19:48      阅读:323      评论:0      收藏:0      [点我收藏+]

标签:

问题一:

Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/emma_out/lib/classes-jarjar.jar
Install: out/host/linux-x86/framework/dx.jar
Install: out/host/linux-x86/bin/dx
host C++: aapt <= frameworks/base/tools/aapt/AaptAssets.cpp
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
In file included from frameworks/base/tools/aapt/AaptAssets.h:18:0,
                 from frameworks/base/tools/aapt/AaptAssets.cpp:5:
frameworks/base/tools/aapt/ZipFile.h:65:5: warning: ‘typedef’ was ignored in this declaration [enabled by default]
     };
     ^
In file included from frameworks/base/include/utils/AssetManager.h:25:0,
                 from frameworks/base/tools/aapt/AaptAssets.h:10,
                 from frameworks/base/tools/aapt/AaptAssets.cpp:5:
frameworks/base/include/utils/KeyedVector.h: In instantiation of ‘const VALUE& android::DefaultKeyedVector<KEY, VALUE>::valueFor(const KEY&) const [with KEY = android::String8; VALUE = android::sp<AaptSymbols>]’:
frameworks/base/tools/aapt/AaptAssets.h:419:59:   required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
     ssize_t i = indexOfKey(key);

  解决办法:

Fix:
vi frameworks/base/libs/utils/Android.mk

Add ‘-fpermissive‘ to line 64:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive

  

问题二:

external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:26: note: declarations in dependent base ‘fst::VectorFstBaseImpl<fst::CacheState<fst::GallicArc<fst::StdArc, (fst::StringType)0u> > >’ are not found by unqualified lookup
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:26: note: use ‘this->SetState’ instead
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:61: error: ‘SetState’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
           SetState(cache_first_state_id_, cache_first_state_);

  

fix-->
//方法为4.0版本源码问题的解决方法,用在了2.3上面
cd external/srec wget "https://github.com/CyanogenMod/android_external_srec/commit/4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff" patch -p1 < 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff rm -f 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff cd ../..

  

问题三:

dalvik/vm/native/dalvik_system_Zygote.c: In function ‘setrlimitsFromArray’:
dalvik/vm/native/dalvik_system_Zygote.c:191:19: error: storage size of ‘rlim’ isn’t known
     struct rlimit rlim;

fix-->
vim dalvik/vm/native/dalvik_system_Zygote.c 增加头文件:#include <sys/resource.h>

问题四:

Install: out/host/linux-x86/bin/mkyaffs2image
host Prebuilt: monkeyrunner (out/host/linux-x86/obj/EXECUTABLES/monkeyrunner_intermediates/monkeyrunner)
Install: out/host/linux-x86/bin/monkeyrunner
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0: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] 错误 1

  

fix-->
//gcc和g++版本太高了
gcc和g++版本太高了
sudo apt-get install gcc-4.4
sudo apt-get install g++-4.4
sudo rm -rf /usr/bin/gcc /usr/bin/g++
sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++

问题五:

host Prebuilt: mkuserimg.sh (out/host/linux-x86/obj/EXECUTABLES/mkuserimg.sh_intermediates/mkuserimg.sh)
Install: out/host/linux-x86/bin/mkyaffs2image
host Prebuilt: monkeyrunner (out/host/linux-x86/obj/EXECUTABLES/monkeyrunner_intermediates/monkeyrunner)
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
host Executable: obbtool (out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/obbtool)
g++: selected multilib ‘32‘ not installed
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/obbtool] 错误 1

  解决办法:sudo apt-get install g++-4.4-multilib

问题六:

  

android系统编译记录

标签:

原文地址:http://www.cnblogs.com/muyuzhanglao/p/4904762.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!