Installing Bazel (syntaxnet dependent tools)

Source: Internet
Author: User

1. Introduction

Bazel, a tool similar to make, is a tool that Google has tailored to the features of its in-house software development, which is now used by Google to build most of the software inside. Its features have many highlights:

    • Multi-language support: Currently Bazel supports Java, objective-c, and C + + by default, but can be extended to any other language.
    • Advanced Build Description Language: A project is described using a language called build, which is a concise text language that treats a project as a collection that consists of a number of interrelated libraries, binaries, and test cases. Instead, tools like make need to describe how each file invokes the compiler.
    • Multi-platform support: the same set of tools and the same build file can be used to build software for different architectures, even different platforms. The Google,bazel is used in both server applications and mobile applications in the data center system.
    • Repeatability: In the build file, each library, test case, and binary file needs to explicitly specify their dependencies. When a source file is modified, Bazel relies on these dependencies to determine which parts need to be rebuilt and which tasks can be performed in parallel. This means that all builds are incremental, and the same build always produces the same result.
    • Scalability: Bazel can handle large projects; in Google, a server software has 100,000 lines of code is very common, in the premise of nothing change to rebuild such a project, probably only 200 milliseconds.

The final result depends entirely on the developer's ability to write the rules correctly for why you should reinvent a build tool instead of using make,google to think that make controls are too thin. A long time ago, Google used the auto-generated bloated makefile to build their software, which was slow and unreliable, ultimately impacting the efficiency of developers and the agility of the company. So they made a bazel. Bazel has a higher level of rules, such as "Java testing", "C + + binaries," which have well-defined built-in rules that have been proven to be correct and stable by countless tests.

2. Installation

(1) Installing JDK 8

If the environment is Ubuntu15.10, skip this step. But in Ubuntu14.04, perform this step to install the Oracle JDK 8.***

If you do not have the Add-apt-repository command installed, you need to execute the sudo apt-get install software-properties-common command * * *

$ sudo add-apt-repository ppa:webupd8team/java$ sudo apt-get update$ sudo apt-get install Oracle-java8-installer

(2) Add Bazel package source

" Deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8 " | sudo tee/etc/apt/sources.list.d/bazel.list

If you do not install curl you need to execute the command: sudo apt-get Install curl * * *

$ Curl HTTPS://STORAGE.GOOGLEAPIS.COM/BAZEL-APT/DOC/APT-KEY.PUB.GPG | sudo apt-key add-

(3) Update installation Bazel

$ sudo apt-get update && sudo apt-get install Bazel
$ sudo apt-get upgrade Bazel

Reference: Https://www.bazel.io/versions/master/docs/install.html#ubuntu

http://blog.csdn.net/u010510350/article/details/52247972

Http://blog.sina.com.cn/s/blog_15856a0240102x7jv.html

Installing Bazel (syntaxnet dependent tools)

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.