mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-07 00:59:07 +08:00
The scripts in this directory rely on certain environment variables, so fail if they are not set in order to improve the debugging experience. The vmtest/ scripts already do it. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
27 lines
724 B
Bash
Executable File
27 lines
724 B
Bash
Executable File
#!/bin/bash
|
|
set -eux
|
|
|
|
RELEASE="bionic"
|
|
|
|
echo "deb-src http://archive.ubuntu.com/ubuntu/ $RELEASE main restricted universe multiverse" >>/etc/apt/sources.list
|
|
|
|
apt-get update
|
|
apt-get -y build-dep libelf-dev
|
|
apt-get install -y libelf-dev pkg-config
|
|
|
|
source "$(dirname $0)/travis_wait.bash"
|
|
|
|
cd $REPO_ROOT
|
|
|
|
CFLAGS="-g -O2 -Werror -Wall -fsanitize=address,undefined -Wno-stringop-truncation"
|
|
mkdir build install
|
|
cc --version
|
|
make -j$((4*$(nproc))) CFLAGS="${CFLAGS}" -C ./src -B OBJDIR=../build
|
|
ldd build/libbpf.so
|
|
if ! ldd build/libbpf.so | grep -q libelf; then
|
|
echo "FAIL: No reference to libelf.so in libbpf.so!"
|
|
exit 1
|
|
fi
|
|
make -j$((4*$(nproc))) -C src OBJDIR=../build DESTDIR=../install install
|
|
rm -rf build install
|