Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bcc build steps, 21-sep-2015
To get https://github.com/iovisor/bcc running (eBPF front-end)
# do a normal linux 4.3+ build, or get 4.3+ pkgs (https://github.com/iovisor/bcc/blob/master/INSTALL.md#ubuntu---binary)
sudo apt-get -y install bison build-essential cmake flex git libedit-dev python zlib1g-dev
# Build LLVM and Clang development libs
git clone --depth 1 http://llvm.org/git/llvm.git
cd llvm/tools; git clone --depth 1 http://llvm.org/git/clang.git
cd ..; mkdir -p build/install; cd build
cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install ..
make -j4
make install
export PATH=$PWD/install/bin:$PATH # and add this to ~/.bashrc
# Install and compile BCC
cd /mnt/src
git clone https://github.com/iovisor/bcc.git
mkdir bcc/build; cd bcc/build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
# test
cd ../examples
./hello_world.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment