Fedora16下载编译android源码4.0

本文记录了在64位Fedora 16系统上编译Android ICS源码过程中遇到的问题及解决方案,包括配置JDK 1.6、解决glibc32库缺失、安装32位zlib库等。
            google不断的升级android, 主流的操作系统也在不断的升级,32到64位,版本1.0到2.0,到3.0......, 其实这背后也是这些软件供应商在不断的角力, 在这个迭代的年代,却苦了程序员。最近把Fedora升级到 16, 64bit系统,编译android ICS源码。过程中会遇到不少问题,先总结如下:

           1. 先需要配置安装JDK, 务必下载安装JDK1.6版本,否者编译会遇到意向不到的问题,还是需要按照google官方文档会省不少力气,可惜google官方文档是基于Ubantu

           2. 按照官方文档开始编译

               # cd android_src

               # . build/setenv.sh

               #lunch

               #make

            3. 编译错误解决

               3.1 glibc 32库

                 In file included from /usr/include/features.h:387:0,
                 from /usr/include/stdlib.h:25,
                 from build/tools/acp/acp.c:11:
                 /usr/include/gnu/stubs.h:7:27: 致命错误:gnu/stubs-32.h:没有那个文件或目录

                 #yum install glibc-devel.i686

               3.2  缺少32位的zlib库

                host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
                /usr/bin/ld: skipping incompatible /usr/lib64/libz.so when searching for -lz
                /usr/bin/ld: cannot find -lz
                collect2: ld 返回 1

                #yum install zlib.i686 zlib-devel.i686
               

              host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
              host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
              /usr/bin/ld: skipping incompatible /usr/lib64/libtinfo.so when searching for -ltinfo
              /usr/bin/ld: cannot find -ltinfo
              collect2: ld 返回 1


             #yum install ncurses-devel.i686 ncurses-libs.i686

            host SharedLib: libOpenglRender (out/host/linux-x86/obj/lib/libOpenglRender.so)
            /usr/bin/ld: skipping incompatible /usr/lib64/libX11.so when searching for -lX11
            /usr/bin/ld: cannot find -lX11
            /usr/bin/ld: skipping incompatible /usr/lib64/libX11.so when searching for -lX11
            /usr/bin/ld: cannot find -lX11
           collect2: ld 返回 1
           make: *** [out/host/linux-x86/obj/lib/libOpenglRender.so] 错误 1

          #yum install libX11.i686 libX11-devel.i686

          host StaticLib: libGLcommon (out/host/linux-x86/obj/STATIC_LIBRARIES/libGLcommon_intermediates/libGLcommon.a)
          host SharedLib: libGLES_CM_translator (out/host/linux-x86/obj/lib/libGLES_CM_translator.so)
          /usr/bin/ld: skipping incompatible /usr/lib64/libGL.so when searching for -lGL
         /usr/bin/ld: cannot find -lGL
         collect2: ld 返回 1
         make: *** [out/host/linux-x86/obj/lib/libGLES_CM_translator.so] 错误 1



         #yum install libgle.i686 libgle-devel.i686
         #yum install libGLEW.i686 libGLEWmx.i686
         #ln -sf /usr/lib/libGL.so.1.2 /usr/lib/libGL.so


      
        sh: gperf: 未找到命令
        calling gperf failed: 32512 at ./makeprop.pl line 140.
        make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSPropertyNames.h] 错误 25
        make: *** 正在删除文件“out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSPropertyNames.h”

        target Generated: libwebcore <= external/webkit/Source/WebCore/html/DocTypeStrings.gperf
        Can't locate Switch.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5  /usr/share/perl5 .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
         BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.


        #yum search perl|grep switch
        #yum install perl-Switch.noarch
        原因是fedora16缺省安装的perf-5.14拿掉了switch.pm模块,所以需要重新安装一下

        顺利打完,收工,分析原因在64bit系统中编译android, 部分代码需要32位的一些库支持,才能顺利编译,因为目标平台现在arm都是32bit.



/root/.cache/JetBrains/RemoteDev/dist/4301d48e0f61a_CLion-252.23309.24/bin/cmake/linux/x64/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/root/.cache/JetBrains/RemoteDev/dist/4301d48e0f61a_CLion-252.23309.24/bin/ninja/linux/x64/ninja -DVP_SDK_PLATFORM=VP_SDK_PLATFORM_LINUX -G Ninja -S /home/dong/vp_cloud -B /home/dong/vp_cloud -- Current build platform is [Linux] use host -- vp_context_1.0.0.12 Module Config: -- VP_SDK_OS_TYPE:VP_SDK_OS_VEEPAI -- VP_SDK_PLATFORM:VP_SDK_PLATFORM_LINUX -- VP_POWER_TYPE:VP_POWER_TYPE_LOW -- VP_NETWORK_MODE:VP_NETWORK_MODE_MOBILE -- VP_SOC_BRAND:VP_SOC_BRAND_JZ -- VP_SOC_MODEL:VP_SOC_MODEL_JZ_T41ZM -- VP_NIC_BRAND:VP_NIC_BRAND_HZ -- VP_NIC_MODEL:VP_NIC_MODEL_HZ_780E -- VP_DEVICE_TYPE:VP_DEVICE_TYPE_BW6 -- VP_MOBILE_DEVICE_TYPE:VP_MOBILE_DEVICE_TYPE_QG5 -- Current build Veepai OS -- Current build nic mode wifi:OFF mobile:ON wire:OFF -- vp_printf_1.0.0.4 Module Config: -- VP_PRINTF_ENABLE:0x01 -- VP_PRINTF_LEVEL:VP_PRINTF_LEVEL_ALL -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'libavformat' CMake Error at /root/.cache/JetBrains/RemoteDev/dist/4301d48e0f61a_CLion-252.23309.24/bin/cmake/linux/x64/share/cmake-4.0/Modules/FindPkgConfig.cmake:934 (message): None of the required 'libavformat' found Call Stack (most recent call first): .dependencies/vp_cmake_1.0.0.8/vp_cmake/src/CMakeLists.txt:256 (pkg_search_module) .dependencies/vp_platform_1.0.0.19/vp_platform/CMakeLists.txt:16 (add_pkg_library) -- vp_platform not found libavformat -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'libavcodec' CMake Error at /root/.cache/JetBrains/RemoteDev/dist/4301d48e0f61a_CLion-252.23309.24/bin/cmake/linux/x64/share/cmake-4.0/Modules/FindPkgConfig.cmake:934 (message): None of the required 'libavcodec' found Call Stack (most recent call first): .dependencies/vp_cmake_1.0.0.8/vp_cmake/src/CMakeLists.txt:256 (pkg_search_module) .dependencies/vp_platform_1.0.0.19/vp_platform/CMakeLists.txt:17 (add_pkg_library) -- vp_platform not found libavcodec -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'libswresample' CMake Error at /root/.cache/JetBrains/RemoteDev/dist/4301d48e0f61a_CLion-252.23309.24/bin/cmake/linux/x64/share/cmake-4.0/Modules/FindPkgConfig.cmake:934 (message): None of the required 'libswresample' found Call Stack (most recent call first): .dependencies/vp_cmake_1.0.0.8/vp_cmake/src/CMakeLists.txt:256 (pkg_search_module) .dependencies/vp_platform_1.0.0.19/vp_platform/CMakeLists.txt:18 (add_pkg_library) -- vp_platform not found libswresample -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'libavfilter' CMake Error at /root/.cache/JetBrains/RemoteDev/dist/4301d48e0f61a_CLion-252.23309.24/bin/cmake/linux/x64/share/cmake-4.0/Modules/FindPkgConfig.cmake:934 (message): None of the required 'libavfilter' found Call Stack (most recent call first): .dependencies/vp_cmake_1.0.0.8/vp_cmake/src/CMakeLists.txt:256 (pkg_search_module) .dependencies/vp_platform_1.0.0.19/vp_platform/CMakeLists.txt:19 (add_pkg_library) -- vp_platform not found libavfilter -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'libpostproc' CMake Error at /root/.cache/JetBrains/RemoteDev/dist/4301d48e0f61a_CLion-252.23309.24/bin/cmake/linux/x64/share/cmake-4.0/Modules/FindPkgConfig.cmake:934 (message): None of the required 'libpostproc' found Call Stack (most recent call first): .dependencies/vp_cmake_1.0.0.8/vp_cmake/src/CMakeLists.txt:256 (pkg_search_module) .dependencies/vp_platform_1.0.0.19/vp_platform/CMakeLists.txt:20 (add_pkg_library) -- vp_platform not found libpostproc -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'libswscale' CMake Error at /root/.cache/JetBrains/RemoteDev/dist/4301d48e0f61a_CLion-252.23309.24/bin/cmake/linux/x64/share/cmake-4.0/Modules/FindPkgConfig.cmake:934 (message): None of the required 'libswscale' found Call Stack (most recent call first): .dependencies/vp_cmake_1.0.0.8/vp_cmake/src/CMakeLists.txt:256 (pkg_search_module) .dependencies/vp_platform_1.0.0.19/vp_platform/CMakeLists.txt:21 (add_pkg_library) -- vp_platform not found libswscale -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'libavutil' CMake Error at /root/.cache/JetBrains/RemoteDev/dist/4301d48e0f61a_CLion-252.23309.24/bin/cmake/linux/x64/share/cmake-4.0/Modules/FindPkgConfig.cmake:934 (message): None of the required 'libavutil' found Call Stack (most recent call first): .dependencies/vp_cmake_1.0.0.8/vp_cmake/src/CMakeLists.txt:256 (pkg_search_module) .dependencies/vp_platform_1.0.0.19/vp_platform/CMakeLists.txt:22 (add_pkg_library) -- vp_platform not found libavutil platform_dir:LINUX -- vp_crypto_1.1.0.0 Module Config: -- VP_SSL_MBEDTLS:0x01 -- VP_SSL_WOLFSSL:0x00 -- VP_SSL_LIBRARY:0x01 -- Configuring incomplete, errors occurred! [无法重新加载]
最新发布
06-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值