Skip to content

Commit

Permalink
llvm 3.7+ deb is broken
Browse files Browse the repository at this point in the history
https://llvm.org/bugs/show_bug.cgi?id=24154

Build from source until it's resolved. Another plan is to provide
binary package.

Signed-off-by: Wei-Chun Chao <[email protected]>
  • Loading branch information
weichunc committed Aug 4, 2015
1 parent 06cfc59 commit ce09490
Showing 1 changed file with 8 additions and 25 deletions.
33 changes: 8 additions & 25 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
# 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](https://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
Expand All @@ -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](https://llvm.org/apt/) to your apt sources
* `echo "deb https://llvm.org/apt/trusty/ llvm-toolchain-trusty main" | sudo tee /etc/apt/sources.list.d/llvm.list`
* `wget -O - https://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 https://llvm.org/git/llvm.git`
* `cd llvm/tools; git clone https://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`
Expand Down

0 comments on commit ce09490

Please sign in to comment.