[Linux] CentOS Minimal version installation clang

Source: Internet
Author: User

CentOS Minimal version installation clang

One, the minimal version of the CentOS installation clang before the environment preparation

1, installing Gcc:yum install GCC

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8A/18/wKioL1gmzEyTfd46AADFjtOls4Y850.png "title=" screen shot 2016-11-12 16.00.28.png "alt=" Wkiol1gmzeytfd46aadfjtols4y850.png "/>


2, installing G++:yum install gcc-c++

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8A/18/wKioL1gmzJzSTGh4AADWC4RLYBI994.png "title=" screen shot 2016-11-12 16.02.08.png "alt=" Wkiol1gmzjzstgh4aadwc4rlybi994.png "/>


3, source installation CMake:

The source installation is due to the fact that the Yum default installation version is too low and clang is required for the CMake version.

Source: https://cmake.org/download/

After decompression to the CMake directory to execute sequentially

1)./bootstrap

2) Gmake

3) make install

4) CMake--version

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8A/19/wKioL1gmzqnToE9SAAD4Fo8S-Vg059.png "title=" screen shot 2016-11-12 16.04.31.png "alt=" Wkiol1gmzqntoe9saad4fo8s-vg059.png "/>


4,perl Installation: Yum Install Perl

Because the pod2html command is required during the Clang script installation, Perl needs to be installed.

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8A/1D/wKiom1gm1dzCG1xxAAKnZIgFgCI962.png "title=" screen shot 2016-11-12 16.41.40.png "alt=" Wkiom1gm1dzcg1xxaaknzigfgci962.png "/>

II, clang installation (3.6.0 version)

1, source code download,: http://llvm.org/releases/download.html

The main downloads are four files:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/8A/1D/wKiom1gm11jBwQCYAADH8e_J3jE691.png "title=" screen shot 2016-11-12 16.47.42.png "alt=" Wkiom1gm11jbwqcyaadh8e_j3je691.png "/>


2, extract four files after download is complete

1) clang-tools-extra-3.6.0.src.tar.xz After decompression rename to extra

2) Cfe-3.6.0.src.tar.xz after decompression rename to Clang

3) Llvm-3.6.0.src.tar.xz After decompression rename to LLVM

4) Compiler-rt-3.6.0.src.tar.xz extracted after the name of Compiler-rt

Store four files in the following directory structure:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8A/1D/wKiom1gm2ybiJlTwAADHcD1f-68505.png "title=" screen shot 2016-11-12 17.04.06.png "alt=" Wkiom1gm2ybijltwaadhcd1f-68505.png "/>

The projects directory under the LLVM directory is placed under COMPILER-RT. In turn


3,clang Installation

1)

./configure--enable-optimized--enable-targets=host-only--PREFIX=/HOME/YOUPATHTOINSTALL/LLVM

2) Make

3) make install

4) Clang--version

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8A/1D/wKiom1gm3AyCKA1NAAEAUCUwf3k654.png "title=" screen shot 2016-11-06 23.09.15.png "alt=" Wkiom1gm3aycka1naaeaucuwf3k654.png "/>

Note: Clang for Gcc,g++,cmake and other version requirements, try to install the version should not be too low.


Reference: http://blog.csdn.net/u012675539/article/details/51489078























This article is from the "11988200" blog, please be sure to keep this source http://11998200.blog.51cto.com/11988200/1872107

[Linux] CentOS Minimal version installation clang

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.