From e2faef472b308b0532f753f6bb3e078342d2ec46 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Fri, 17 Sep 2021 15:49:38 +0200 Subject: [PATCH] pkgdep: Install liburing regardless if it's in the ld cache Some distros may already provide liburing (e.g. fedora34) as a package. In case given system has it installed, without the devel portion, we would skip building our own version leaving system without proper include files needed for the tests. Signed-off-by: Michal Berger Change-Id: I7b07ba8d1c3c6b97d6b114935dfe472cc7902bf6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9543 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki Reviewed-by: Aleksey Marchuk --- scripts/pkgdep/common.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/scripts/pkgdep/common.sh b/scripts/pkgdep/common.sh index 810bf531c..739d02ce8 100755 --- a/scripts/pkgdep/common.sh +++ b/scripts/pkgdep/common.sh @@ -4,21 +4,17 @@ install_liburing() { local GIT_REPO_LIBURING=https://github.com/axboe/liburing.git local liburing_dir=/usr/local/src/liburing - if [[ $(ldconfig -p) == *liburing.so* ]]; then - echo "liburing is already installed. skipping" + if [[ -d $liburing_dir ]]; then + echo "liburing source already present, not cloning" else - if [[ -d $liburing_dir ]]; then - echo "liburing source already present, not cloning" - else - mkdir -p $liburing_dir - git clone "${GIT_REPO_LIBURING}" "$liburing_dir" - fi - # Use commit we know we can compile against. See #1673 as a reference. - git -C "$liburing_dir" checkout liburing-2.0 - (cd "$liburing_dir" && ./configure --libdir=/usr/lib64 && make install) - echo /usr/lib64 > /etc/ld.so.conf.d/spdk-liburing.conf - ldconfig + mkdir -p $liburing_dir + git clone "${GIT_REPO_LIBURING}" "$liburing_dir" fi + # Use commit we know we can compile against. See #1673 as a reference. + git -C "$liburing_dir" checkout liburing-2.0 + (cd "$liburing_dir" && ./configure --libdir=/usr/lib64 && make install) + echo /usr/lib64 > /etc/ld.so.conf.d/spdk-liburing.conf + ldconfig } install_shfmt() {