Skip to content

Commit

Permalink
Fix llvm and clang version in INSTALL.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JadeFlute0127 authored and yonghong-song committed May 8, 2022
1 parent 0064feb commit 4145596
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ sudo apt-get -y install bison build-essential cmake flex git libedit-dev \
sudo apt install -y bison build-essential cmake flex git libedit-dev \
libllvm7 llvm-7-dev libclang-7-dev python zlib1g-dev libelf-dev libfl-dev python3-distutils
# For Hirsute (21.04) or Impish (21.10)
# For Hirsute (21.04) or Impish (21.10)
sudo apt install -y bison build-essential cmake flex git libedit-dev libllvm11 llvm-11-dev libclang-11-dev python zlib1g-dev libelf-dev libfl-dev python3-distutils
# For other versions
Expand Down Expand Up @@ -387,7 +387,7 @@ mkdir bcc-build
cd bcc-build/
## here llvm should always link shared library
cmake ../bcc -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_LLVM_SHARED=1
cmake ../bcc -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_LLVM_SHARED=1
make -j10
make install
Expand Down Expand Up @@ -501,23 +501,23 @@ sudo yum install -y luajit luajit-devel # for Lua support
You could compile LLVM from source code

```
curl -LO http:https://releases.llvm.org/7.0.1/llvm-7.0.1.src.tar.xz
curl -LO http:https://releases.llvm.org/7.0.1/cfe-7.0.1.src.tar.xz
tar -xf cfe-7.0.1.src.tar.xz
tar -xf llvm-7.0.1.src.tar.xz
curl -LO http:https://releases.llvm.org/10.0.0/llvm-10.0.0.src.tar.xz
curl -LO http:https://releases.llvm.org/10.0.0/cfe-10.0.0.src.tar.xz
tar -xf cfe-10.0.0.src.tar.xz
tar -xf llvm-10.0.0.src.tar.xz
mkdir clang-build
mkdir llvm-build
cd llvm-build
cmake3 -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \
-DCMAKE_BUILD_TYPE=Release ../llvm-7.0.1.src
-DCMAKE_BUILD_TYPE=Release ../llvm-10.0.0.src
make
sudo make install
cd ../clang-build
cmake3 -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \
-DCMAKE_BUILD_TYPE=Release ../cfe-7.0.1.src
-DCMAKE_BUILD_TYPE=Release ../cfe-10.0.0.src
make
sudo make install
cd ..
Expand All @@ -528,8 +528,8 @@ or install from centos-release-scl
```
yum install -y centos-release-scl
yum-config-manager --enable rhel-server-rhscl-7-rpms
yum install -y devtoolset-7 llvm-toolset-7 llvm-toolset-7-llvm-devel llvm-toolset-7-llvm-static llvm-toolset-7-clang-devel
source scl_source enable devtoolset-7 llvm-toolset-7
yum install -y devtoolset-7 llvm-toolset-10 llvm-toolset-10-llvm-devel llvm-toolset-10-llvm-static llvm-toolset-10-clang-devel
source scl_source enable devtoolset-7 llvm-toolset-10
```

For permanently enable scl environment, please check https://access.redhat.com/solutions/527703.
Expand Down

0 comments on commit 4145596

Please sign in to comment.