Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6565096
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: C/C++

2015-10-19 22:25:27


[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
-----------------------回答3
管理员在2009年8月13日编辑了该文章文章。
-->
阅读(1518) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~