Skip to content

Installing Libtrace

Shane Alcock edited this page May 14, 2019 · 2 revisions

Installing via binary package

Debian / Ubuntu

Run the following commands:

sudo apt-get install apt-transport-https curl
echo "deb https://dl.bintray.com/wand/general $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/wand.list
echo "deb https://dl.bintray.com/wand/libtrace $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/wand.list
curl --silent "https://bintray.com/user/downloadSubjectPublicKey?username=wand" | sudo apt-key add -
sudo apt-get update

sudo apt-get install libtrace4-dev libtrace4-tools

Centos / RHEL

Run the following commands:

cat << EOF > /etc/yum.repos.d/bintray-wand-general-rpm.repo
#bintray-wand-general-rpm - packages by wand from Bintray
[bintray-wand-general-rpm]
name=bintray-wand-general-rpm
baseurl=https://dl.bintray.com/wand/general-rpm/centos/\$releasever/\$basearch/
gpgkey=https://bintray.com/user/downloadSubjectPublicKey?username=wand
gpgcheck=0
repo_gpgcheck=1
enabled=1
EOF

cat << EOF > /etc/yum.repos.d/bintray-wand-libtrace-rpm.repo
#bintray-wand-libtrace-rpm - packages by wand from Bintray
[bintray-wand-libtrace-rpm]
name=bintray-wand-libtrace-rpm
baseurl=https://dl.bintray.com/wand/libtrace-rpm/centos/\$releasever/\$basearch/
gpgkey=https://bintray.com/user/downloadSubjectPublicKey?username=wand
gpgcheck=0
repo_gpgcheck=1
enabled=1
EOF

sudo yum install libtrace4-devel libtrace4-tools

Fedora

Run the following commands:

cat << EOF > /etc/yum.repos.d/bintray-wand-general-rpm.repo
#bintray-wand-general-rpm - packages by wand from Bintray
[bintray-wand-general-rpm]
name=bintray-wand-general-rpm
baseurl=https://dl.bintray.com/wand/general-rpm/fedora/\$releasever/\$basearch/
gpgkey=https://bintray.com/user/downloadSubjectPublicKey?username=wand
gpgcheck=0
repo_gpgcheck=1
enabled=1
EOF

cat << EOF > /etc/yum.repos.d/bintray-wand-libtrace-rpm.repo
#bintray-wand-libtrace-rpm - packages by wand from Bintray
[bintray-wand-libtrace-rpm]
name=bintray-wand-libtrace-rpm
baseurl=https://dl.bintray.com/wand/libtrace-rpm/fedora/\$releasever/\$basearch/
gpgkey=https://bintray.com/user/downloadSubjectPublicKey?username=wand
gpgcheck=0
repo_gpgcheck=1
enabled=1
EOF

sudo dnf install libtrace4-devel libtrace4-tools

Building from source

Required Software:

Optional Software:

  • DAG libraries (required if you wish to capture using a DAG card)
  • llvm-dev, llvm-gcc-4.2 and libboost-dev (required for using the BPF-JIT code)
  • libncurses (for the tracetop tool)
  • libssl-dev (for the traceanon tool)
  • libwandder (required for ETSI LI decoding)
  • dpdk-dev and libnuma-dev (required to have DPDK support)

Compiling and Installing Libtrace

If you've cloned the libtrace repository on GitHub, you'll need to run ./bootstrap.sh before attempting to build libtrace.

The following sequence of commands will build and install libtrace on most systems:

    ./configure
    make
    sudo make install

By default, libtrace will install to /usr/local ; this can be changed by adding --prefix= to the configure line. Other configuration options, if required, can be viewed by running ./configure --help.

The BPF-JIT functionality is disabled by default - you will need to add --with-llvm to your configure line to enable it. Note that you will require llvm-dev, llvm-gcc-4.2 and libboost-dev. Even then, it may not work if these (particularly llvm-gcc-4.2) have been installed in unexpected locations.

Following installation, you may need to add the line '/usr/local/lib' to your /etc/ld.so.conf and run 'ldconfig' as root.

Known Issues

Building libtrace on older installs of Mac OS X (we observed this on 10.4.11) may produce the following error: ERROR: No debug map or DWARF data was found to link.

This appears to be due to a bug in the dsymutil linker. Upgrading the dev environment to Xcode 2.5 or later should fix this problem.

You can’t perform that action at this time.