天天看點

chromium39.0.2132.2 for android 編譯問題

今年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