• android编译遇到问题修改



    (注意要确定安装了jdk)

    第一步: cd  lichee; ./build.sh  -p sun5i_elite -k 3.0  (apt-get install uboot-mkimage需要安装mkimage工具)

    第二步: cd  android; source build/envsetup.sh

    第三步:  root@QinQi:/work/shenbao-new/wifi_DDR128X16_shenbao/android# lunch

    You're building on Linux

    Lunch menu... pick a combo:
         1. full-eng
         2. full_x86-eng
         3. vbox_x86-eng
         4. full_stingray-userdebug
         5. full_wingray-userdebug
         6. full_crespo4g-userdebug
         7. full_crespo-userdebug
         8. full_maguro-userdebug
         9. full_toro-userdebug
         10. full_tuna-userdebug
         11. apollo_mele-eng
         12. apollo_tvdevb-eng
         13. crane_evb_v12r-eng
         14. crane_evb-eng
         15. crane_m1003h6-eng
         16. elite_evb-eng
         17. elite_nm307_v11-eng
         18. elite_nm307-eng
         19. nuclear_12_evb-eng
         20. nuclear_evb-eng
         21. full_panda-eng

    Which would you like? [full-eng] 17

    第四步:android# extract-bsp


    第五步:make  -j8
    1)编译报错
    <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
    cc1plus: all warnings being treated as errors
    make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsAdapter.o] Error 1
    make: *** Waiting for unfinished jobs....
    make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsAllocation.o] Error 1

    解决:
    修改build/core/combo/HOST_linux-x86.mk61行,将
    HOST_GLOBAL_CFLAGS+= -D_FORTIFY_SOURCE=0
    修改成
    HOST_GLOBAL_CFLAGS+= -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

    2)编译报错
    /bin/bash: jar: command not found 
    其实就是jar这个命令在系统变量里找不到
    解决办法:
    cd /usr/bin 
    sudo ln -s -f /usr/lib/jvm/jdk1.6.0_26/bin/jar
    jdk安装目录按自己实际情况更改
    如果提示javah:commond not found,于是照葫芦画瓢,输入命令
    cd /usr/bin 
    ln -s -f /usr/lib/jvm/jdk1.6.0_26/bin/javah 
    如果提示javah:commond not found,于是照葫芦画瓢,输入命令
    cd /usr/bin
    ln -s -f /usr/lib/jvm/java/jdk1.6.0_26/bin/javah
    在编译sdk时,如果提示javadoc:commond not found,
    cd /usr/bin
    ln -s -f /usr/lib/jvm/java/jdk1.6.0_26/bin/javadoc


    3)编译报错
    sh: gperf: not found
    calling gperf failed: 32512 at ./makeprop.pl line 140.
    方法:sudo apt-get install gperf

    4)编译报错
    vim system/core/init/logo.c 修改

    cp   ./device/softwinner/common/hardware/include/drv_display_sun4i.h      bionic/libc/include/


    5)编译报错
    arm-linux-androideabi-g++: ./frameworks/base/media/CedarX-Projects/CedarX/../CedarAndroidLib/LIB_ICS_/libstagefright_httplive_opt.a: No such file or directory
    修改
    cp  -rf ./frameworks/base/media/CedarX-Projects/CedarAndroidLib/LIB_ICS_F23/ ./frameworks/base/media/CedarX-Projects/CedarAndroidLib/LIB_ICS_

    frameworks/compile/slang/slang_rs_export_foreach.cpp:249:23: error: variable 'ParamName' set but not used [-Werror=unused-but-set-variable 
    修改
    vi frameworks/compile/slang/Android.mk
    local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter

    6)编译报错
    home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:69: undefined reference to `pthread_mutexattr_init'
    /home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:75: undefined reference to `pthread_mutexattr_settype'
    /home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:80: undefined reference to `pthread_mutexattr_setpshared'
    /home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:89: undefined reference to `pthread_mutexattr_destroy'
    out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o): In function `llvm::sys::MutexImpl::tryacquire()':
    /home/yanfa/workspace/Android/shenbao-new/wifi_DDR128X16_shenbao/android/external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock'
    collect2: ld returned 1 exit status
    make: *** [out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader] Error 1
    修改
    vi external/llvm/llvm-host-build.mk 添加
    LOCAL_LDLIBS := -lpthread -ldl

    make: ***  [out/host/linux-x86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtest-all.o] Error 1
    修改:  vim external/gtest/include/gtest/internal/gtest-param-util.h 添加:
    #include <cstddef>


    make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1
    修改vim?external/mesa3d/src/glsl/linker.cpp?添加:

    #include?<cstddef>

    7)编译报错
    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
    解决办法:
    external/oprofile/libpp/format_output.h把:mutable counts_t & counts;
    改为:counts_t & counts;

    Copy: out/host/linux-x86/usr/share/zoneinfo/zoneinfo.idx
    Copy: out/host/linux-x86/usr/share/zoneinfo/zoneinfo.version
    target Prebuilt:  (out/target/product/generic/system/bin/monkey)
    target thumb C++: gatord <= system/core/gator-daemon/ConfigurationXML.cpp
    target thumb C++: gatord <= system/core/gator-daemon/StreamlineSetup.cpp
    target Executable: gatord (out/target/product/generic/obj/EXECUTABLES/gatord_intermediates/LINKED/gatord)
    target Symbolic: gatord (out/target/product/generic/symbols/system/bin/gatord)
    target Strip: gatord (out/target/product/generic/obj/EXECUTABLES/gatord_intermediates/gatord)
    target thumb C++: camera. <= device/softwinner/common/hardware/camera/PreviewWindow.cpp
    device/softwinner/common/hardware/camera/PreviewWindow.cpp:32:31: error: drv_display_sun5i.h: No such file or directory
    make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/camera._intermediates/PreviewWindow.o] Error 1
    root@ubuntu:/home/yanfa/workspace/Android/android_sdk/shenbao-new/wifi_DDR128X16_shenbao/android#
    修改:
    vim device/softwinner/common/hardware/camera/Android.mk

    LOCAL_C_INCLUDES +=                                
    38     external/jpeg                                  
    39     external/skia/include/core/                    
    40     frameworks/base/core/jni/android/graphics      
    41     frameworks/base/include/media/stagefright/openmax
    42     $(TOP)/frameworks/base/media/CedarX-Projects/CedarX/include/include_camera
    43     hardware/libhardware/include/hardware
    44     external/neven/FaceRecEm/common/src/b_FDSDK    
    45     device/softwinner/common/hardware/include      #add
    46     $(TARGET_HARDWARE_INCLUDE)

    v4l2_pix_size

    8)

    第六步:pack

  • 相关阅读:
    Web API 2 入门——使用ASP.NET Web API和Angular.js构建单页应用程序(SPA)(谷歌翻译)
    Web API 2 入门——创建ASP.NET Web API的帮助页面(谷歌翻译)
    Web API 2 入门——使用Web API与ASP.NET Web窗体(谷歌翻译)
    Web API 2 入门——Web API 2中的操作结果(谷歌翻译)
    Web API 2 入门——Web API 2(C#)入门(谷歌翻译)
    WebBrowser 中遍历所有的frames
    浏览器js console对象
    Vi Command 【转载】
    JS调用BHO
    iframe空文档中写入内容
  • 原文地址:https://www.cnblogs.com/xuyh/p/4184124.html
Copyright © 2020-2023  润新知