zoukankan      html  css  js  c++  java
  • (OK) 完整编译android 4.4源码—问题—CSSValueKeywords.cpp—CSSPropertyNames.cpp


    [root@localhost android4.4_source_code]# pwd
    /opt/cBPM-android/android4.4_source_code
    [root@localhost android4.4_source_code]# . /etc/profile
    [root@localhost android4.4_source_code]# java -version
    java version "1.6.0_45"
    Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
    [root@localhost android4.4_source_code]# . build/envsetup.sh
    [root@localhost android4.4_source_code]# chooseproduct
    [root@localhost android4.4_source_code]# m -j5
                                                    //Makes from the top of the tree.
                                                    //这个过程执行时间很长,大概2-8个小时,看机器配置
                                                    //不要轻易在 android源代码 根目录执行:make clean
    -----------------编译成功,最后的部分输出结果如下:
    Creating filesystem with parameters:
        Size: 576716800
        Block size: 4096
        Blocks per group: 32768
        Inodes per group: 7040
        Inode size: 256
        Journal blocks: 2200
        Label:
        Blocks: 140800
        Block groups: 5
        Reserved block group size: 39
    Created filesystem with 1263/35200 inodes and 81852/140800 blocks
    + '[' 0 -ne 0 ']'
    Install system fs image: out/target/product/generic/system.img
    out/target/product/generic/system.img+ maxsize=588791808 blocksize=2112 total=576716800 reserve=5947392
    make: 离开目录“/opt/cBPM-android/android4.4_source_code”
    [root@localhost android4.4_source_code]# du -hs .
    36G    .                                                                //编译完成后,整个大小为 36G
    [root@localhost android4.4_source_code]#
    -----------------

    注意:编译android中,linux内核之上的 程序之前,一定要先完整编译android 4.4源码。

    -----------------------------------------------------------问题如下
      File "scripts/make_css_value_keywords.py", line 177, in <module>
      File "scripts/make_css_property_names.py", line 238, in <module>
            in_generator.Maker(CSSValueKeywordsWriter).main(sys.argv)
    in_generator.Maker(CSSPropertiesWriter).main(sys.argv)
      File "/opt/cBPM-android/android4.4_source_code/external/chromium_org/third_party/WebKit/Source/core/scripts/in_generator.py", line 119, in main
      File "/opt/cBPM-android/android4.4_source_code/external/chromium_org/third_party/WebKit/Source/core/scripts/in_generator.py", line 119, in main
            writer.write_files(options.output_dir)
    writer.write_files(options.output_dir)
      File "/opt/cBPM-android/android4.4_source_code/external/chromium_org/third_party/WebKit/Source/core/scripts/in_generator.py", line 77, in write_files
      File "/opt/cBPM-android/android4.4_source_code/external/chromium_org/third_party/WebKit/Source/core/scripts/in_generator.py", line 77, in write_files
        self._write_file(output_dir, generator(), file_name)
        self._write_file(output_dir, generator(), file_name)
      File "scripts/make_css_property_names.py", line 233, in generate_implementation
      File "scripts/make_css_value_keywords.py", line 172, in generate_implementation
            gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
    gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
      File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
      File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
        errread, errwrite)
      File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child
        errread, errwrite)
      File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child
        raise child_exception
    OSError: [Errno 2] No such file or directory
        raise child_exception
    OSError: [Errno 2] No such file or directory
    make: *** [out/target/product/generic/obj/GYP/shared_intermediates/blink/CSSValueKeywords.cpp] 错误 1
    make: *** 正在等待未完成的任务....
    make: *** [out/target/product/generic/obj/GYP/shared_intermediates/blink/CSSPropertyNames.cpp] 错误 1
    make: 离开目录“/opt/cBPM-android/android4.4_source_code”

    -----------------------------------------------------------解决方法

    在我的系统,执行如下命令,解决了问题。
    [root@localhost android4.4_source_code]# yum install gperf

    注意:编译android中,linux内核之上的 程序之前,一定要先完整编译android 4.4源码。

    下面是参考资料
    -----------------------回答1

    http://forum.xda-developers.com/showthread.php?t=2481571&page=35
    it seems like you need to have the "gperf" package installed, or whatever package has the gperf binary.
    -----------------------回答2
    http://www.eoeandroid.com/forum.php?mod=viewthread&action=printable&tid=324565&_dsign=7b5d6c34
    应该是环境的问题,你看看python安装了没有。

    还有以下是所需要的环境:
    git gnupg flex bison gperf build-essential   zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev   libx11-dev:i386 libreadline6-dev:i386 g++-multilib mingw32 tofrodos   python-markdown libxml2-utils xsltproc zlib1g-dev:i386

    看看是不是都安装了

    你的答案有效,现在编了半个多小时,没报错了,我确认并安装了以下环境:
    git gnupg flex bison gperf build-essential   zip curl libc6-dev x11proto-core-dev   g++-multilib  tofrodos   python-markdown libxml2-utils xsltproc
    -----------------------回答3
    http://grokbase.com/p/gg/android-building/13bjxrp1er/facing-build-error-while-building-kitkat-for-emulator

           
        Magnus B?ck: It looks like you haven't installed gperf. Make sure you have installed all packages listed as required by the documentation. http://source.android.com/source/initializing.html

        Raja pavan: This issue got fixed when I installed all ubuntu 12 host packages . As suggested in developer android site. I am able to run system.img on emulator. I will try understanding the relationship between fix and the problem and enlighten myself Later.

        Benoit Fouet: Hi, Have you tried to trace 'gperf_args', above this line, to see what happens. Also, when you have issues, building with '-j1' is more readable.



    <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
    阅读(67) | 评论(0) | 转发(0) |
    给主人留下些什么吧!~~
    评论热议
  • 相关阅读:
    开源库dlib的安装与编译-CMake
    Python的zip函数
    matlab读写视频VideoReader/VideoWriter
    批量分割视频opencv
    批量重命名文件
    OpenCV代码提取:遍历指定目录下指定文件的实现
    第48课 函数设计原则(完)
    在Qt中如何使用QtDesigner创建的UI文件(一) (转)
    qt ui程序使用Linux的文件操作open、close (转)
    进程间通信IPC之--无名管道(pipe)和有名管道(fifo)(转)
  • 原文地址:https://www.cnblogs.com/ztguang/p/12649045.html
Copyright © 2011-2022 走看看