首页 > 代码库 > chromium39.0.2132.2 for android 编译问题

chromium39.0.2132.2 for android 编译问题

用以前同事的一句话说,就是:chrome大神们飞起来了。

为啥这么说呢,查看下chromium的发行版本就知道。今年chromium发行了N多版本。PS:我今年3月份下载chromium34代码,现在更新到40了都(具体不是很清楚)。明年据说要41-47(具体记不住了),总之啊,chromium的发行版本愈加的频繁和活跃。


今天下载了chromium39.0.2132.2代码,接着需要把之前的工作移植上去。在下载(gclient runhooks期间)和执行ninja -C out/Release content_shell_apk的时候,遇到几个问题,之前是没遇到的,现在记录下来,供大家分享。


1. 问题:

Package xtst was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtst.pc‘
to the PKG_CONFIG_PATH environment variable No package ‘xtst‘ found
gyp: Call to ‘pkg-config --cflags xtst‘ returned exit status 1.

解决方式: sudo apt-get install libxtst-dev



2. 问题:

Package libexif was not found in the pkg-config search path.
Perhaps you should add the directory containing `libexif.pc‘
to the PKG_CONFIG_PATH environment variable
No package ‘libexif‘ found
gyp: Call to ‘pkg-config --cflags libexif‘ returned exit status 1.

ans: sudo apt-get install libexif-dev


3. 问题:

Updating projects from gyp files...
Package xscrnsaver was not found in the pkg-config search path.
Perhaps you should add the directory containing `xscrnsaver.pc‘
to the PKG_CONFIG_PATH environment variable
No package ‘xscrnsaver‘ found
gyp: Call to ‘pkg-config --cflags xscrnsaver‘ returned exit status 1.


ans : sudo apt-get install libxss-dev libxdg-basedir-dev libxinerama-dev libxft-dev libcairo2-dev  libdbusmenu-glib-dev

另:我在执行上面命令之前,现将sudo apt-get installxscrnsaver(tab提示键下所有库)都安装了


4.问题:

ninja: error: unknown target ‘content_shell_apk‘, did you mean ‘content_shell_pak‘?

解决方式:Google提供:
To set the OS=android gyp define:

* If you use different checkouts for android and non-android work, use a chromium.gyp_env in each of your chromium/android checkouts (https://code.google.com/p/chromium/wiki/CommonBuildTasks#chromium.gyp_env):

# Assuming your PWD is in “src”:
echo "{ ‘GYP_DEFINES‘: ‘OS=android‘, }" > ../chromium.gyp_env


* If you never build chromium for platforms other than android, you can alternatively set the GYP_DEFINES environment variable globally in your ~/.bashrc:

echo ‘GYP_DEFINES="OS=android $GYP_DEFINES"‘ >> ~/.bashrc


* If you use the same checkout for android and non-android work, manually set GYP_DEFINES to the right value before you run gyp

GYP_DEFINES=OS=android gclient runhooks


PS: 有时间的孩纸们,赶紧看看chromiumOS吧,预测要火,而且是大火!

chromium39.0.2132.2 for android 编译问题