Skip to content
This repository has been archived by the owner on Oct 8, 2023. It is now read-only.

Commit

Permalink
Support Rocky Linux 8
Browse files Browse the repository at this point in the history
This commit adds pkgdep_rocky8.sh for installing dependencies in Rocky Linux,
and fixes compile issues (which is mostly from using different version of gcc)
We tried not to break on Ubuntu environments and we tested on our machine.

Signed-off-by: Hyunseung Park <hspark0582@gluesys.com>
  • Loading branch information
hspark0582 authored and so931 committed Oct 4, 2022
1 parent dba9e4a commit b135c4c
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -35,6 +35,7 @@ CONFIG.local
.cproject
.settings
bin/
dep/
lib/spdk-19.01.1/mk/cc.mk
lib/spdk-19.01.1/mk/config.mk
lib/spdk-19.01.1/include/spdk/config.h
Expand Down
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -134,7 +134,7 @@ config_h="mk/ibof_config.h"
rm -rf ${config_h}; touch ${config_h}
echo "#pragma once" >> ${config_h}
echo "" >> ${config_h}
python script/genconfig.py >> ${config_h}
python3 script/genconfig.py >> ${config_h}


# On FreeBSD sed -i 'SUFFIX' - SUFFIX is mandatory. So no way but to delete the backed file.
Expand Down
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Expand Up @@ -340,7 +340,7 @@ ExternalProject_Add(opentelemetry-cpp
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_INSTALL ON
CONFIGURE_COMMAND cmake ${PROJ_ROOT}/lib/${POS_DEP_OTEL} -DBUILD_TESTING=OFF -DWITH_OTLP=ON -DWITH_ABSEIL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX:PATH=${PROJ_ROOT}/lib/${POS_DEP_OTEL}
CONFIGURE_COMMAND cmake ${PROJ_ROOT}/lib/${POS_DEP_OTEL} -DBUILD_TESTING=OFF -DWITH_OTLP=ON -DWITH_ABSEIL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX:PATH=${PROJ_ROOT}/lib/${POS_DEP_OTEL} -DCMAKE_INSTALL_LIBDIR=lib
BUILD_COMMAND cmake --build ${PROJ_ROOT}/lib/${POS_DEP_OTEL} --target all -- -j ${NUM_BUILD_CORE}
INSTALL_COMMAND make install
)
Expand Down
12 changes: 12 additions & 0 deletions lib/dpdk-20.08.patch
Expand Up @@ -11,3 +11,15 @@ index a2198abf4..a51ad0f88 100644
return 0;
}
/* device is valid, add in list (sorted) */
diff --git drivers/vdpa/ifc/base/ifcvf.h drivers/vdpa/ifc/base/ifcvf.h
index a288ce57d..3b9e4dee5 100644
--- drivers/vdpa/ifc/base/ifcvf.h
+++ drivers/vdpa/ifc/base/ifcvf.h
@@ -13,7 +13,6 @@
#define IFCVF_SUBSYS_DEVICE_ID 0x001A

#define IFCVF_MAX_QUEUES 1
-#define VIRTIO_F_IOMMU_PLATFORM 33

/* Common configuration */
#define IFCVF_PCI_CAP_COMMON_CFG 1
13 changes: 13 additions & 0 deletions lib/spdk-22.01.1.patch
Expand Up @@ -3882,6 +3882,19 @@ index b6573a237..0f1a8e119 100644
/* Create poll group threads, and send a message to each thread
* and create a poll group.
*/
diff --git scripts/pkgdep/rhel.sh scripts/pkgdep/rhel.sh
index d307d1bce..212b1e907 100755
--- scripts/pkgdep/rhel.sh
+++ scripts/pkgdep/rhel.sh
@@ -83,7 +83,7 @@ fi

yum install -y gcc gcc-c++ make cmake CUnit-devel libaio-devel openssl-devel \
libuuid-devel libiscsi-devel ncurses-devel json-c-devel libcmocka-devel
-if echo "$ID $VERSION_ID" | grep -E -q 'centos 8|rhel 8'; then
+if echo "$ID $VERSION_ID" | grep -E -q 'centos 8|rhel 8|rocky 8'; then
yum install -y python36
#Create hard link to use in SPDK as python
if [[ ! -e /usr/bin/python && -e /etc/alternatives/python3 ]]; then
diff --git scripts/rpc.py scripts/rpc.py
index ab034142b..3f3358a7a 100755
--- scripts/rpc.py
Expand Down
2 changes: 1 addition & 1 deletion script/build_ibofos.sh
Expand Up @@ -25,7 +25,7 @@ build_pos()
else
./configure --without-asan
fi
make -j 8
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig make -j 8
}

while getopts "i" opt
Expand Down
110 changes: 110 additions & 0 deletions script/pkgdep_rocky8.sh
@@ -0,0 +1,110 @@
# !/bin/sh
# Please run this script as root.

set -e # exit immediately on any fail

POS_ROOT=$(readlink -f $(dirname $0))/..

dnf install -y epel-release
crb enable

dnf -y install \
gcc gcc-c++ `# g++` make git \
rdma-core-devel `# libibverbs-dev librdmacm-dev` \
jsoncpp-devel `# libjsoncpp-dev` \
libpciaccess-devel `# libpciaccess-dev` \
python3-configshell `# "python-configshell*"` \
numactl-devel `# libnuma-dev` libuuid-devel `# uuid-dev` libibverbs-utils `# ibverbs-utils` perftest \
python3 python3-pip \
iperf \
cmake systemd-devel `# libsystemd-dev` \
jq rapidjson-devel `# rapidjson-dev` \
python3-psutil \
ccache \
libmnl-devel `# libmnl-dev` \
automake autoconf libtool bison flex python3-paramiko \
xfsprogs \
clang-tools-extra `# clang-format` \
libpmemblk-devel `# libpmemblk-dev` \
meson \
python3-pytz `# python3-tz` \
gdb \
`# libjsonrpccpp-dev does not exist` \
c-ares-devel `# libc-ares-dev` pkg-config cmake \
pigz \
mandoc \
yaml-cpp-devel `# libyaml-cpp-dev` \
numactl \
tbb-devel `# libtbb-dev` \
`# linux-modules-extra not needed` \
google-perftools-devel `# libgoogle-perftools-dev` \
rocksdb-devel `# librocksdb-dev` \
`# libisal-dev does not exist` \
`# libasan included in gcc?`

# Additional packages
dnf -y install patch wget tar openssl-devel

${POS_ROOT}/script/install_go.sh

# dir to build unsupported dependencies
rm -rf ${POS_ROOT}/dep
mkdir -p ${POS_ROOT}/dep

# libsonrpccpp
## libargtable
cd ${POS_ROOT}/dep
wget 'http://prdownloads.sourceforge.net/argtable/argtable2-13.tar.gz'
tar xf argtable2-13.tar.gz
cd argtable2-13
./configure
make -j 4
make install

## catch
cd /usr/include
wget 'https://github.com/catchorg/Catch2/releases/download/v1.12.2/catch.hpp'

## hiredis
cd ${POS_ROOT}/dep
git clone 'https://github.com/redis/hiredis.git'
cd hiredis
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j 4
make install

## other deps
dnf -y install libcurl-devel libmicrohttpd-devel jsoncpp-devel cmake

## finally itself
cd ${POS_ROOT}/dep
git clone 'https://github.com/cinemast/libjson-rpc-cpp.git'
cd libjson-rpc-cpp
git checkout v1.0.0
mkdir build
cd build
cmake ..
make -j 4
make install
ldconfig

# isa-l
cd ${POS_ROOT}/dep
dnf -y install nasm
git clone 'https://github.com/intel/isa-l.git'
cd isa-l
./autogen.sh
./configure
make
make install

python3 -m pip install py-markdown-table pyyaml

# jsoncpp-devel installed in different directory: link it
mkdir -p /usr/include/jsoncpp
ln -s /usr/include/json /usr/include/jsoncpp/json

# RHEL does not look for libraries in /usr/local/lib unlike Ubuntu
echo '/usr/local/lib' > /etc/ld.so.conf.d/pos-local-lib.conf

0 comments on commit b135c4c

Please sign in to comment.