Chrome for Android Compilation

Source: Internet
Author: User
Tags gtk

Step 1: Get source code (http://dev.chromium.org/developers/how-tos/get-the-code#TOC-Windows)
The. gclient file content is:

solutions = [  { "name"        : "src",    "url"         : "https://src.chromium.org/chrome/trunk/src",    "deps_file"   : "DEPS",    "managed"     : True,    "custom_deps" : {        "src/content/test/data/layout_tests/LayoutTests": None,        "src/chrome/tools/test/reference_build/chrome_win": None,        "src/chrome_frame/tools/test/reference_build/chrome_win": None,        "src/chrome/tools/test/reference_build/chrome_linux": None,        "src/chrome/tools/test/reference_build/chrome_mac": None,        "src/third_party/hunspell_dictionaries": None,    },    "safesync_url": "",  },]target_os = ['android']

Step 2: first install the android compiling environment.

Step 3: Compile (https://code.google.com/p/chromium/wiki/AndroidBuildInstructions)

During compilation, the following error message may be displayed. For more information, see install. My host is (Ubuntu 12.04)
1) package NSS was not found in the PKG-config search path.
Perhaps you shoshould Add the directory containing 'nss. pc'
To the pkg_config_path environment variable
No package 'ns' found
Gyp: Call to 'pkg-config -- cflags nss' returned exit status 1. while loading dependencies of/home/blwang/dev/src/base. gyp while loading dependencies of/home/blwang/dev/src/build/All. gyp while trying to load/home/blwang/dev/src/build/All. gyp
Error: Command/usr/bin/Python src/build/gyp_chromium returned non-zero exit status 1 in/home/blwang/dev

Solution: sudo apt-Get install libnss3-dev libgconf2-dev

2) updating projects from Gyp files...
Package GTK +-2.0 was not found in the PKG-config search path.
Perhaps you shoshould Add the directory containing 'gtk +-2.0.pc'
To the pkg_config_path environment variable
No package 'gtk +-2.0 'Found

Solution: sudo apt-Get install libgtk2.0-Dev

3) package libpci was not found in the PKG-config search path.
Perhaps you shoshould Add the directory containing 'libpci. pc'
To the pkg_config_path environment variable
No package 'libpci 'Found
Gyp: Call to 'pkg-config -- cflags libpci 'returned exit status 1. while loading dependencies of/home/blwang/dev/src/base. gyp while loading dependencies of/home/blwang/dev/src/build/All. gyp while trying to load/home/blwang/dev/src/build/All. gyp

Solution: sudo apt-Get install libpci-Dev

4)/bin/sh: 1: libgcrypt-config: not found
Gyp: Call to 'libgcrypt-config -- cflags 'returned exit status 127. while loading dependencies of/home/blwang/dev/src/base. gyp while loading dependencies of/home/blwang/dev/src/build/All. gyp while trying to load/home/blwang/dev/src/build/All. gyp
Error: Command/usr/bin/Python src/build/gyp_chromium returned non-zero exit status 1 in/home/blwang/dev

Solution: sudo apt-Get install libgcrypt-Dev

5) package gnome-keyring-1 was not found in the PKG-config search path.
Perhaps you shoshould Add the directory containing 'gnome-keyring-1.pc'
To the pkg_config_path environment variable
No package 'gnome-keyring-1 'Found
Gyp: Call to 'pkg-config -- cflags gnome-keyring-1 'returned exit status 1. while loading dependencies of/home/blwang/dev/src/base. gyp while loading dependencies of/home/blwang/dev/src/build/All. gyp while trying to load/home/blwang/dev/src/build/All. gyp
Error: Command/usr/bin/Python src/build/gyp_chromium returned non-zero exit status 1 in/home/blwang/dev

Solution: sudo apt-Get install libgnome-keyring-Dev

6) Perhaps you shoshould Add the directory containing 'libudev. pc'
To the pkg_config_path environment variable
No package 'libudev' found
Gyp: Call to 'pkg-config -- cflags libudev 'returned exit status 1. while loading dependencies of/home/blwang/dev/src/base. gyp while loading dependencies of/home/blwang/dev/src/build/All. gyp while trying to load/home/blwang/dev/src/build/All. gyp
Error: Command/usr/bin/Python src/build/gyp_chromium returned non-zero exit status 1 in/home/blwang/dev

Solution: sudo apt-Get install libudev-Dev

7) Perhaps you shoshould Add the directory containing 'libulse. pc'
To the pkg_config_path environment variable
No package 'libulse' found
Gyp: Call to 'pkg-config -- cflags libpulse 'returned exit status 1. while loading dependencies of/home/blwang/dev/src/UI/surface. gyp while loading dependencies of/home/blwang/dev/src/GPU. gyp while loading dependencies of/home/blwang/dev/src/third_party/WebKit/source/CORE/core. gyp
While loading dependencies of/home/blwang/dev/src/third_party/WebKit/source/WebKit/chromium/WebKit. gyp while loading dependencies of/home/blwang/dev/src/third_party/WebKit/public/blink. gyp while loading dependencies of/home/blwang/dev/src/WebKit/support/webkit_support.gyp
While loading dependencies of/home/blwang/dev/src/Chrome/chrome_resources.gyp while loading dependencies of/home/blwang/dev/src/Chrome/chrome. gyp while loading dependencies of/home/blwang/dev/src/build/All. gyp while trying to load/home/blwang/dev/src/build/All. gyp
Error: Command/usr/bin/Python src/build/gyp_chromium returned non-zero exit status 1 in/home/blwang/dev

Solution: sudo apt-Get install libpulse-Dev

8)/bin/sh: 1: cups-config: not found
Gyp: Call to 'cups-config -- API-version' returned exit status 127. while loading dependencies of/home/blwang/dev/src/WebKit/support/webkit_support.gyp while loading dependencies of/home/blwang/dev/src/Chrome/chrome_resources.gyp while loading Dependencies
Of/home/blwang/dev/src/Chrome/chrome. gyp while loading dependencies of/home/blwang/dev/src/build/All. gyp while trying to load/home/blwang/dev/src/build/All. gyp
Error: Command/usr/bin/Python src/build/gyp_chromium returned non-zero exit status 1 in/home/blwang/dev

Solution: sudo apt-Get install libcupsys2-dev

9) package gconf-2.0 was not found in the PKG-config search path.
Perhaps you shoshould Add the directory containing 'gconf-2.0.pc'
To the pkg_config_path environment variable
No package 'gconf-2.0 'Found
Gyp: Call to 'pkg-config -- cflags gconf-2.0 'returned exit status 1. while loading dependencies of/home/blwang/dev/Chrome/src/base. gyp while loading dependencies of/home/blwang/dev/Chrome/src/Media/media. gyp while loading dependencies of/home/blwang/dev/Chrome/src/content. gyp
While loading dependencies of/home/blwang/dev/Chrome/src/build/all_android.gyp while trying to load/home/blwang/dev/Chrome/src/build/all_android.gyp
Error: Command/usr/bin/Python src/build/gyp_chromium returned non-zero exit status 1 in/home/blwang/dev/chrome

Solution: sudo aptitude install gconf2 libgconf2-dev

10)/usr/include/features. h: 324: 26: Fatal error: bits/predefs. h: no such file or directory
Compilation terminated.
[2, 338/9471] cxx obj. Host/V8/src/v8_base.arm.typing.o
Failed:/usr/bin/g ++-MMD-MF obj. host/V8/src/Embedded-modules = 64-embedded-modules-ddisable_nacl-dchromium_build-duse_lib1__turbo = 1-denable_webrtc = 1-embedded-denable_gpu = 1-duse_openssl = 1-External = 1
-Denable_autofill_dialog = 1-denable_incluage_detection = 1-denable_debugger_support-dv8_target_arch_arm-rule-darm_test-Rule = 1-rule-Rule = 0-dndebug-dnvalgrind-Rule =
-I .. /.. /V8/src-fstack-Protector -- Param = SSP-buffer-size = 4-pthread-fno-exceptions-fno-strict-aliasing-wno-unused-parameter-wno-Missing -Field-initializers-fvisibility = hidden-pipe-FPIC-wno-format-M32-fno-Ident-fdata-sections-ffunction-sections-fomit-frame-pointer
-Fdata-sections-ffunction-sections-O2-fno-rtti-fno-threadsafe-statics-fvisibility-inlines-hidden-wno-deprecated-C .. /.. /V8/src/typing. CC-O obj. host/V8/src/v8_base.arm.typing.o
In file encoded ded from/usr/include/stdio. h: 28: 0,
From.../V8/src/.../include/v8stdint. h: 34,
From ../V8/src/../include/v8.h: 41,
From.../../V8/src/v8.h: 52,
From.../../V8/src/typing. h: 31,
From.../../V8/src/typing. CC: 28:
/Usr/include/features. h: 324: 26: Fatal error: bits/predefs. h: no such file or directory
Compilation terminated.
[2, 338/9471] cc obj/third_party/expat/files/lib/expat. xmlparse. o
Ninja: Build stopped: subcommand failed.

Solution: sudo apt-Get install libc6-dev: i386 build-essential gcc-multilib

11) Chrome libstdc ++ 4.6 incompatiable.

Solution: sudo apt-Get install g ++-multilib

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.