Commit ee79f131 authored by Brenden Blanco's avatar Brenden Blanco

Merge pull request #112 from iovisor/weichunc_dev

llvm 3.7+ deb is broken
parents 06cfc59c ce094900
# Ubuntu - Docker edition
The build dependencies are captured in a [Dockerfile](Dockerfile.ubuntu), the
output of which is a .deb for easy installation.
* Start with a recent Ubuntu install (tested with 14.04 LTS)
* Install a [>= 4.2 kernel](http://kernel.ubuntu.com/~kernel-ppa/mainline/)
with headers
* Reboot
* Install [docker](https://docs.docker.com/installation/ubuntulinux/)
(`wget -qO- https://get.docker.com/ | sh`)
* Run the Dockerfile for Ubuntu - results in an installable .deb
* `git clone https://github.com/iovisor/bcc; cd bcc`
* `docker build -t bcc -f Dockerfile.ubuntu .`
* `docker run --rm -v /tmp:/mnt bcc sh -c "cp /root/bcc/build/*.deb /mnt"`
* `sudo dpkg -i /tmp/libbcc*.deb`
* Run the example
* `sudo python /usr/share/bcc/examples/hello_world.py`
# Fedora - Docker edition
The build dependencies are captured in a [Dockerfile](Dockerfile.fedora), the
......@@ -43,14 +24,16 @@ To build the toolchain from source, one needs:
* Clang 3.7, built from the same tree as LLVM
* cmake, gcc (>=4.7), flex, bison
* Add the [LLVM binary repo](http://llvm.org/apt/) to your apt sources
* `echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main" | sudo tee /etc/apt/sources.list.d/llvm.list`
* `wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -`
* `sudo apt-get update`
* Install build dependencies
* `sudo apt-get -y install bison build-essential cmake flex git libedit-dev python zlib1g-dev`
* Install LLVM and Clang development libs
* `sudo apt-get -y install libllvm3.7 llvm-3.7-dev libclang-3.7-dev`
* Build LLVM and Clang development libs
* `git clone http://llvm.org/git/llvm.git`
* `cd llvm/tools; git clone http://llvm.org/git/clang.git`
* `cd ..; mkdir -p build/install; cd build`
* `cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF" -DCMAKE_INSTALL_PREFIX=$PWD/install ..`
* `make -j4`
* `make install`
* `export PATH=$PWD/install/bin:$PATH`
* Install and compile BCC
* `git clone https://github.com/iovisor/bcc.git`
* `mkdir bcc/build; cd bcc/build`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment