zoukankan      html  css  js  c++  java
  • android系统编译记录

    问题一:

    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

    问题六:

      

  • 相关阅读:
    数据结构与算法分析-二叉堆
    数据结构与算法分析-AVL树
    数据结构与算法分析-二叉查找树
    优秀程序员应具备的15个特性
    2016年1月22日 收盘后美加的走势
    2016年1月8日 12月非农数据
    Replace into 与Insert into on duplicate key update的区别
    MYSQL视图的学习笔记
    postgresql创建用户
    连接postgresql数据库
  • 原文地址:https://www.cnblogs.com/muyuzhanglao/p/4904762.html
Copyright © 2011-2022 走看看