From acd2cc94e7b350ff934a36404b19e6e35c0c8d1f Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Wed, 30 Nov 2022 14:25:22 +0100 Subject: [PATCH] configure: handle lib64 for DPDK libdir When building with DPDK provided via --with-dpdk=/path/to/dpdk we need to guess the --libdir that was used when compiling DPDK. This is not a problem with system installed DPDK, as appropriate PKG_CONFIG_PATH for pkgconfig is already known. So it is possible to retrieve --libdir. Rather than just keeping it hardcoded to just 'lib', add second popular one 'lib64'. Signed-off-by: Tomasz Zawadzki Change-Id: Ic041289b326fb67f4f6fb5d5114c873ea513389e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15713 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris Reviewed-by: Konrad Sztyber --- configure | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 864f738c2..2a040d7ee 100755 --- a/configure +++ b/configure @@ -188,23 +188,28 @@ function check_dir() { # On x86_64 'clang -dumpmachine' produces x86_64-pc-linux-gnu # whereas the dpdk might be built with gcc and its libs lie in -# x86_64-linux-gnu. Let's find the right libdir for dpdkd libs. +# x86_64-linux-gnu. Let's find the right libdir for dpdk libs. function find_dpdk_arch_libdir() { - local dpdk_dir=$1 + local dpdk_libdir="$1/lib" + + # Use libdir with 'lib' or 'lib64' + if [[ ! -d "$dpdk_libdir" ]]; then + dpdk_libdir+="64" + fi # Checking first what we have with $arch, then clang # variant of arch. arches=("$arch" "$(echo $arch | sed 's/-pc//g')") for a in "${arches[@]}"; do - local libdir="$dpdk_dir/lib/$a" - if [[ -d $libdir ]]; then - echo $libdir + local libdir_arch="$dpdk_libdir/$a" + if [[ -d "$libdir_arch" ]]; then + echo "$libdir_arch" return fi done # Fallback to the libdir without arch component - echo "$dpdk_dir/lib" + echo "$dpdk_libdir" } function check_IPSec_mb() {