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 <michalx.berger@intel.com>
Change-Id: I7b07ba8d1c3c6b97d6b114935dfe472cc7902bf6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9543
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Michal Berger 2021-09-17 15:49:38 +02:00 committed by Tomasz Zawadzki
parent f105046fe3
commit e2faef472b

View File

@ -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() {