SRCDIR="$WORKSPACE/src/babeltrace"
TMPDIR="$WORKSPACE/tmp"
PREFIX="/build"
+LIBDIR="lib"
+
+# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
+# site config that matches this.
+if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then
+ LIBDIR_ARCH="${LIBDIR}64"
+else
+ LIBDIR_ARCH="$LIBDIR"
+fi
# Create tmp directory
rm -rf "$TMPDIR"
# Set configure options and environment variables for each build
# configuration.
-CONF_OPTS=("--prefix=$PREFIX")
+CONF_OPTS=("--prefix=$PREFIX" "--libdir=$PREFIX/$LIBDIR_ARCH")
# -Werror is enabled by default in stable-2.0 but won't be in 2.1
# Explicitly disable it for consistency.
# Cleanup rpath in executables and shared libraries
find "$WORKSPACE/$PREFIX/bin" -type f -perm -0500 -exec chrpath --delete {} \;
-find "$WORKSPACE/$PREFIX/lib" -name "*.so" -exec chrpath --delete {} \;
+find "$WORKSPACE/$PREFIX/$LIBDIR_ARCH" -name "*.so" -exec chrpath --delete {} \;
# Remove libtool .la files
-find "$WORKSPACE/$PREFIX/lib" -name "*.la" -exec rm -f {} \;
+find "$WORKSPACE/$PREFIX/$LIBDIR_ARCH" -name "*.la" -exec rm -f {} \;
# Exit with failure if any of the tests failed
exit $failed_tests
return 0
fi
local IFS=.
+ # Ignore the shellcheck warning, we want splitting to happen based on IFS.
+ # shellcheck disable=SC2206
local i ver1=($1) ver2=($2)
# fill empty fields in ver1 with zeros
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do
SRCDIR="$WORKSPACE/src/liburcu"
TMPDIR="$WORKSPACE/tmp"
PREFIX="/build"
+LIBDIR="lib"
+
+# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
+# site config that matches this.
+if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then
+ LIBDIR_ARCH="${LIBDIR}64"
+else
+ LIBDIR_ARCH="$LIBDIR"
+fi
# Create tmp directory
rm -rf "$TMPDIR"
# Set configure options and environment variables for each build
# configuration.
-CONF_OPTS=("--prefix=$PREFIX")
+CONF_OPTS=("--prefix=$PREFIX" "--libdir=$PREFIX/$LIBDIR_ARCH")
case "$conf" in
static)
echo "Static lib only configuration"
# Cleanup rpath in executables and shared libraries
#find "$WORKSPACE/$PREFIX/bin" -type f -perm -0500 -exec chrpath --delete {} \;
-find "$WORKSPACE/$PREFIX/lib" -name "*.so" -exec chrpath --delete {} \;
+find "$WORKSPACE/$PREFIX/$LIBDIR_ARCH" -name "*.so" -exec chrpath --delete {} \;
# Remove libtool .la files
-find "$WORKSPACE/$PREFIX/lib" -name "*.la" -exec rm -f {} \;
+find "$WORKSPACE/$PREFIX/$LIBDIR_ARCH" -name "*.la" -exec rm -f {} \;
# Exit with failure if any of the tests failed
exit $failed_tests
return 0
fi
local IFS=.
+ # Ignore the shellcheck warning, we want splitting to happen based on IFS.
+ # shellcheck disable=SC2206
local i ver1=($1) ver2=($2)
# fill empty fields in ver1 with zeros
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do
cc=${cc:-}
test_type=${test_type:-}
+SRCDIR="$WORKSPACE/src/lttng-tools"
+TAPDIR="$WORKSPACE/tap"
+PREFIX="/build"
+LIBDIR="lib"
+
+# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
+# site config that matches this.
+if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then
+ LIBDIR_ARCH="${LIBDIR}64"
+else
+ LIBDIR_ARCH="$LIBDIR"
+fi
+
DEPS_INC="$WORKSPACE/deps/build/include"
-DEPS_LIB="$WORKSPACE/deps/build/lib"
+DEPS_LIB="$WORKSPACE/deps/build/$LIBDIR_ARCH"
DEPS_PKGCONFIG="$DEPS_LIB/pkgconfig"
DEPS_BIN="$WORKSPACE/deps/build/bin"
DEPS_JAVA="$WORKSPACE/deps/build/share/java"
export CPPFLAGS="-I$DEPS_INC"
export LDFLAGS="-L$DEPS_LIB"
-SRCDIR="$WORKSPACE/src/lttng-tools"
-TAPDIR="$WORKSPACE/tap"
-PREFIX="/build"
-
# Create tmp directory
TMPDIR="$WORKSPACE/tmp"
if command -v $PYTHON2 >/dev/null 2>&1; then
P2_VERSION=$($PYTHON2 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
- DEPS_PYTHON2="$WORKSPACE/deps/build/lib/python$P2_VERSION/site-packages"
+ DEPS_PYTHON2="$WORKSPACE/deps/build/$LIBDIR/python$P2_VERSION/site-packages"
+ if [ "$LIBDIR" != "$LIBDIR_ARCH" ]; then
+ DEPS_PYTHON2="$DEPS_PYTHON2:$WORKSPACE/deps/build/$LIBDIR_ARCH/python$P2_VERSION/site-packages"
+ fi
fi
P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
- DEPS_PYTHON3="$WORKSPACE/deps/build/lib/python$P3_VERSION/site-packages"
+ DEPS_PYTHON3="$WORKSPACE/deps/build/$LIBDIR/python$P3_VERSION/site-packages"
+ if [ "$LIBDIR" != "$LIBDIR_ARCH" ]; then
+ DEPS_PYTHON3="$DEPS_PYTHON3:$WORKSPACE/deps/build/$LIBDIR_ARCH/python$P3_VERSION/site-packages"
+ fi
# Most build configs require access to the babeltrace 2 python bindings.
# This also makes the lttngust python agent available for `agents` builds.
fi
# Most build configs require the python bindings
-CONF_OPTS=("--prefix=$PREFIX" "--enable-python-bindings")
+CONF_OPTS=("--prefix=$PREFIX" "--libdir=$PREFIX/$LIBDIR_ARCH" "--enable-python-bindings")
DIST_CONF_OPTS=()
find "$WORKSPACE/$PREFIX/bin" -type f -perm -0500 -exec chrpath --delete {} \;
# Some configs don't build liblttng-ctl
-if [ -d "$WORKSPACE/$PREFIX/lib" ]; then
+if [ -d "$WORKSPACE/$PREFIX/$LIBDIR_ARCH" ]; then
# Cleanup rpath in shared libraries
- find "$WORKSPACE/$PREFIX/lib" -name "*.so" -exec chrpath --delete {} \;
+ find "$WORKSPACE/$PREFIX/$LIBDIR_ARCH" -name "*.so" -exec chrpath --delete {} \;
# Remove libtool .la files
- find "$WORKSPACE/$PREFIX/lib" -name "*.la" -exec rm -f {} \;
+ find "$WORKSPACE/$PREFIX/$LIBDIR_ARCH" -name "*.la" -exec rm -f {} \;
fi
# Exit with failure if any of the tests failed
return 0
fi
local IFS=.
+ # Ignore the shellcheck warning, we want splitting to happen based on IFS.
+ # shellcheck disable=SC2206
local i ver1=($1) ver2=($2)
# fill empty fields in ver1 with zeros
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do
# Controls if the tests are run
LTTNG_UST_RUN_TESTS="${LTTNG_UST_RUN_TESTS:=yes}"
+SRCDIR="$WORKSPACE/src/lttng-ust"
+TMPDIR="$WORKSPACE/tmp"
+PREFIX="/build"
+LIBDIR="lib"
+
+# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
+# site config that matches this.
+if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then
+ LIBDIR_ARCH="${LIBDIR}64"
+else
+ LIBDIR_ARCH="$LIBDIR"
+fi
+
DEPS_INC="$WORKSPACE/deps/build/include"
-DEPS_LIB="$WORKSPACE/deps/build/lib"
+DEPS_LIB="$WORKSPACE/deps/build/$LIBDIR_ARCH"
DEPS_PKGCONFIG="$DEPS_LIB/pkgconfig"
#DEPS_BIN="$WORKSPACE/deps/build/bin"
#DEPS_JAVA="$WORKSPACE/deps/build/share/java"
export CPPFLAGS="-I$DEPS_INC"
export LDFLAGS="-L$DEPS_LIB"
-SRCDIR="$WORKSPACE/src/lttng-ust"
-TMPDIR="$WORKSPACE/tmp"
-PREFIX="/build"
-
# Create tmp directory
rm -rf "$TMPDIR"
mkdir -p "$TMPDIR"
# Set configure options and environment variables for each build
# configuration.
-CONF_OPTS=("--prefix=$PREFIX")
+CONF_OPTS=("--prefix=$PREFIX" "--libdir=$PREFIX/$LIBDIR_ARCH")
case "$conf" in
static)
echo "Static lib only configuration"
# Cleanup rpath in executables and shared libraries
#find "$WORKSPACE/$PREFIX/bin" -type f -perm -0500 -exec chrpath --delete {} \;
-find "$WORKSPACE/$PREFIX/lib" -name "*.so" -exec chrpath --delete {} \;
+find "$WORKSPACE/$PREFIX/$LIBDIR_ARCH" -name "*.so" -exec chrpath --delete {} \;
# Remove libtool .la files
-find "$WORKSPACE/$PREFIX/lib" -name "*.la" -exec rm -f {} \;
+find "$WORKSPACE/$PREFIX/$LIBDIR_ARCH" -name "*.la" -exec rm -f {} \;
# Exit with failure if any of the tests failed
exit $failed_tests