Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ To compile and install Clang 3.5.0 in Linux CentOS     - Java, on the dfile.encoding Systemproperty (Programming)

- The correct way to open Xcode - Debugging (Programming)

- CentOS7 installation GAMIT and GMT (Linux)

- Linux Command Study Notes (Linux)

- Linux boot process and run level (Linux)

- Simple RPM package production (Linux)

- Linux iptables port mapping settings (Server)

- Let Linux operating system more secure (Linux)

- php for Linux the MySQL extension module installation and configuration (Database)

- Linux system security configuration (Linux)

- Lazarus for Raspbian installation (Linux)

- Linux process group, session daemon (Linux)

- Convert MySQL date string to a NULL value exception handling (Database)

- Oracle archive log size than the size of the online journal of the much smaller (Database)

- Linux process stack and process function stack frame (Linux)

- PHP call a Python program (Programming)

- RHEL6 install Python and other packages from source (Linux)

- How to use the Linux command compress JPEG images (Linux)

- Linux user directory (Linux)

- Oracle user password problem (Database)

  To compile and install Clang 3.5.0 in Linux CentOS
  Add Date : 2018-11-21      
  CoreCLR need to compile Clang 3.5, which is installed on CentOS Clang 3.4.2 (yum repos is the latest version), can only own hand LLVM to compile the source code to install it.

(Note: CentOS version is 6.6)

First, install libstdc ++ 4.7

(Note: If this is CentOS 7.0, does not require this step)

wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c ++
ln -s / opt / rh / devtoolset-2 / root / usr / bin / * / usr / local / bin /
If you do not install, configure when compiling configuration options will appear the following error message:

We detected a missing feature in the standard C ++ library that was known to be
missing in libstdc ++ 4.6 and implemented in libstdc ++ 4.7. There are numerous
C ++ 11 problems with 4.6's library, and we do not support GCCs or libstdc ++ older
than 4.7.
Second, install Python 2.7.9

(Note: If this is CentOS 7.0, does not require this step)

CentOS 6.6 comes with it is Python 2.6.6, and compiled llvm need Python 2.7 or higher.

1) Install required to compile Python bag

yum install zlib-devel
yum install bzip2-devel
yum install openssl-devel
yum install ncurses-devel
yum install sqlite-devel
2) Download and extract the source code of Python 2.7.9

cd / opt
wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
tar xf Python-2.7.9.tar.xz
cd Python-2.7.9
3) compile and install Python 2.7.9

./configure --prefix = / usr / local
make && make altinstall
4) The python commands to the Python 2.7.9

ln -s /usr/local/bin/python2.7 / usr / local / bin / python
Third, add the swap partition

If you compile machine memory is relatively small, it is recommended to add swap partition. I was only testing machine 1G memory, there has been "c ++: internal compiler error: Killed (program cc1plus)" error during compilation.

1) Create and activate the swap file (for example, 2G):

dd if = / dev / zero of = / swapfile bs = 1k count = 2048000
mkswap / swapfile
swapon / swapfile
2) modify / etc / fstab file so that the swap file is loaded automatically at startup, add the following:

/ Swapfile swap swap defaults 0 0
Fourth, compile LLVM

1) Download the source code llvm

mv llvm-3.5.0.src llvm
2) Download the clang of the source code

cd llvm / tools
wget http://llvm.org/releases/3.5.0/cfe-3.5.0.src.tar.xz
tar xf cfe-3.5.0.src.tar.xz
mv cfe-3.5.0.src clang
3) Download the source code compiler-rt

cd ../projects
wget http://llvm.org/releases/3.5.0/compiler-rt-3.5.0.src.tar.xz
tar xf compiler-rt-3.5.0.src.tar.xz
mv compiler-rt-3.5.0.src compiler-rt
4) Configuring the Compile Options

cd ..
./configure --enable-optimized CC = gcc CXX = g ++
5) Compile llvm

make -j2
After a successful compilation tips:

llvm [0]: ***** Completed Release + Asserts Build
6) Install the compiled llvm

make install
It will be installed in / usr / local / bing in

7) Check the clang version

# Clang --version
clang version 3.5.0 (tags / RELEASE_350 / final)
Or if an older version, you need to / usr / bin / clang point clang 3.5.0:

ls -s / usr / local / bin / clang / usr / bin / clang
- Android shutdown (reboot) process (Programming)
- Linux network cut package is not fully defragment (Linux)
- ORA-28000 the account is locked fault simulation (Database)
- How to install Linux on a MacBook Pro Retina (Linux)
- Common DDOS attacks (Linux)
- Using Java arrays implement sequential stack (Programming)
- Understand ASP.NET 5 running the command: DNVM, DNX, and DNU (Server)
- Elaborate .NET Multithreading: Using Task (Programming)
- Using Java program determines whether it is a leap year (Programming)
- Upgrade to Linux Mint 16 petra Mint 17 Qiana (Linux)
- Git uses a small mind (Linux)
- Spark and Hadoop comparison (Server)
- Why I do not like the Go language style interface (ie Structural Typing) (Programming)
- Python substring format (Programming)
- Linux, grep, sed usage (Linux)
- CentOS / Linux kernel upgrade (Linux)
- Linux operating system, the internal and external security overview (Linux)
- Linux system firewall defense network attacks (Linux)
- RedHat virtual machine to install VMware Tools (Linux)
- Using Java to build micro-services (Server)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.