Commit c1016471 authored by Raphael Defosseux's avatar Raphael Defosseux

fix(build): changes after merge-request code reviews

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@openairinterface.org>
parent ed2d865d
......@@ -31,58 +31,6 @@ SCRIPT=$(readlink -f ${BASH_SOURCE})
THIS_SCRIPT_PATH=`dirname $SCRIPT`
source $THIS_SCRIPT_PATH/build_helper
#-------------------------------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_cpprestsdk_from_git() {
echo "Starting to install cpprestsdk"
if [ $1 -eq 0 ]; then
read -p "Do you want to install C++ REST SDK ? <y/N> " prompt
OPTION="-y"
else
prompt='y'
OPTION="-y"
fi
if [ $2 -eq 0 ]; then
debug=0
else
debug=1
fi
if [[ $prompt =~ [yY](es)* ]]
then
GIT_URL=https://github.com/Microsoft/cpprestsdk.git
echo "Install C++ REST SDK from $GIT_URL"
pushd $OPENAIRCN_DIR/build/ext
echo "Downloading C++ REST SDK"
if [[ $OPTION =~ -[yY](es)* ]]
then
$SUDO rm -rf cpprestsdk
fi
git clone $GIT_URL
cd cpprestsdk
git submodule update --init
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
mkdir _build && cd _build
$CMAKE -G Ninja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
case "$(get_distribution_release)" in
"ubuntu22.04")
sed -i -e "s#-Werror ##" ./build.ninja
;;
esac
$SUDO ninja install
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
$SUDO ldconfig -v
popd
rm -Rf $OPENAIRCN_DIR/build/ext/cpprestsdk/_build
fi
echo "cpprestsdk installation complete"
return 0
}
#-------------------------------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
......@@ -385,16 +333,16 @@ check_install_amf_deps(){
$SUDO add-apt-repository ppa:mhier/libboost-latest --yes
$SUDO $INSTALLER update
if [ $IS_CONTAINER -eq 0 ]; then
specific_packages="libconfig++-dev libasio-dev libboost-all-dev mysql-server"
specific_packages="libconfig++-dev libasio-dev libboost-all-dev mysql-server libasan4"
else
specific_packages="libconfig++-dev libasio-dev libboost-all-dev"
specific_packages="libconfig++-dev libasio-dev libboost-all-dev libasan4"
fi
;;
"ubuntu20.04")
specific_packages="libconfig++-dev libasio-dev libboost-all-dev"
specific_packages="libconfig++-dev libasio-dev libboost-all-dev libasan5"
;;
"ubuntu22.04")
specific_packages="libconfig++-dev libasio-dev libboost-all-dev"
specific_packages="libconfig++-dev libasio-dev libboost-all-dev libasan6"
;;
esac
# removed libspdlog-dev
......@@ -414,8 +362,7 @@ check_install_amf_deps(){
libcurl4 \
net-tools \
pkg-config \
ninja-build \
libasan?"
ninja-build"
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
PACKAGE_LIST="\
mysql \
......@@ -457,18 +404,6 @@ check_install_amf_deps(){
ret=$?;[[ $ret -ne 0 ]] && return $ret
echo "distro libs installation complete"
# Ubuntu 18 --> cpprest shall be built from source
# Otherwise, we can just install from repo
# For the moment, not used.
#if [[ $OS_DISTRO == "ubuntu" ]]; then
# case "$(get_distribution_release)" in
# "ubuntu18.04")
# install_cpprestsdk_from_git $1 $2
# ret=$?;[[ $ret -ne 0 ]] && return $ret
# ;;
# esac
#fi
install_spdlog_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
......
......@@ -59,12 +59,17 @@ RUN apt-get update && \
psmisc \
net-tools \
bc \
libssh-? \
libssh-4 \
openssl \
libbrotli1 \
perl \
# Ubuntu 18 --> libasan4
# Ubuntu 20 --> libasan5
# Ubuntu 22 --> libasan6
libasan? \
libgssapi-krb5-2 \
# Ubuntu 18/20 --> libldap-2.4-2
# Ubuntu 22 --> libldap-2.5-0
libldap-2.?-? \
libconfig++9v5 \
libsctp1 \
......@@ -72,7 +77,7 @@ RUN apt-get update && \
libpsl5 \
# Ubuntu 18/20 --> mysqlclient20, Ubuntu22 --> mysqlclient21
libmysqlclient2? \
libsqlite3-? \
libsqlite3-0 \
libcurl4-gnutls-dev \
# Ubuntu 18 --> boost62/65 -> will remove both
# Ubuntu 20 --> boost67/71 -> will remove 67
......
......@@ -30,8 +30,6 @@
#---------------------------------------------------------------------
FROM registry.access.redhat.com/ubi8/ubi:latest AS oai-amf-builder
ARG NEEDED_GIT_PROXY
# Copy the entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement
......@@ -59,7 +57,6 @@ RUN rm -f /etc/rhsm-host && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
# Some GIT configuration command quite useful
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
RUN git config --global https.postBuffer 123289600 && \
git config --global http.sslverify false
......
......@@ -33,8 +33,6 @@
ARG BASE_IMAGE=ubuntu:bionic
FROM $BASE_IMAGE as oai-amf-base
ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
RUN apt-get update && \
......@@ -82,12 +80,17 @@ RUN apt-get update && \
psmisc \
net-tools \
bc \
libssh-? \
libssh-4 \
openssl \
libbrotli1 \
perl \
# Ubuntu 18 --> libasan4
# Ubuntu 20 --> libasan5
# Ubuntu 22 --> libasan6
libasan? \
libgssapi-krb5-2 \
# Ubuntu 18/20 --> libldap-2.4-2
# Ubuntu 22 --> libldap-2.5-0
libldap-2.?-? \
libconfig++9v5 \
libsctp1 \
......@@ -95,7 +98,7 @@ RUN apt-get update && \
libpsl5 \
# Ubuntu 18/20 --> mysqlclient20, Ubuntu22 --> mysqlclient21
libmysqlclient2? \
libsqlite3-? \
libsqlite3-0 \
libcurl4-gnutls-dev \
# Ubuntu 18 --> boost62/65 -> will remove both
# Ubuntu 20 --> boost67/71 -> will remove 67
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment