In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to compile and install Clang on Linux CentOS". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
I. Environmental preparation before installing Clang in Minimal version of CentOS
1, install gcc:yum install gcc
2, install g++:yum install gcc-c++
3. Install cmake with source code:
The reason for using source code installation is that the default installation version of yum is too low, while Clang requires the version of cmake.
Source code download address: https://cmake.org/download/
Unzip it and execute it in the cmake directory in turn.
1). / bootstrap
2) gmake
3) make install
4) cmake-version
4Perl installation: yum install perl
Because the pod2html command is required during the installation of the Clang script, perl needs to be installed.
II. Clang installation (version 3.6.0)
1. Download the source code at http://llvm.org/releases/download.html
The main downloads are as follows:
2. Extract the four files after the download is completed.
1) rename clang-tools-extra-3.6.0.src.tar.xz to extra after decompression
2) rename cfe-3.6.0.src.tar.xz to clang after decompression
3) rename llvm-3.6.0.src.tar.xz to llvm after decompression
4) after decompression, compiler-rt-3.6.0.src.tar.xz is named compiler-rt.
Store the four files in the following directory structure:
That is, put compiler-rt under the projects directory under the llvm directory. And so on.
3Quinting Clang installation
1)
. / configure-- enable-optimized-- enable-targets=host-only-- prefix=/home/YouPathToInstall/ll
2) make
3) make install
4) clang-version
Note: Clang has version requirements for gcc,g++,cmake, etc., try not to install the version too low.
This is the end of "how to compile and install Clang on Linux CentOS". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.