Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.03 KB

building_kcov.rst

File metadata and controls

40 lines (27 loc) · 1.03 KB

Building kcov From Source

Ubuntu

As of this writing, the recommended way to get kcov is to build from upstream sources from GitHub. Ubuntu Xenial (for example) has packaged versions, but they have known problems not evident when using upstream.

Install the build dependencies:

sudo apt install binutils-dev libdw-dev libelf-dev libiberty-dev

To build from source, follow these steps:

git clone [email protected]:SimonKagstrom/kcov.git
cd kcov
mkdir build
cd build
cmake ..
cmake --build .

The resulting binary will be in kcov/build/src/kcov. Create a symbolic link to the binary from some directory on your $PATH.

macOS

A recent version of kcov is installed by the install_prereqs.sh script.

Be sure that your account has developer mode enabled, which gives you the privileges necessary to run debuggers and similar tools. If you are an administrator, use this command:

sudo /usr/sbin/DevToolsSecurity --enable