Commit 8aae1a3b authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Proper boost 1.67.0 installation (from spgwu)

parent 1c3b1e7d
......@@ -34,45 +34,6 @@ source $THIS_SCRIPT_PATH/build_helper.libconfig
source $THIS_SCRIPT_PATH/build_helper.fb_folly
#-------------------------------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_boost_1_66() {
if [ $1 -eq 0 ]; then
read -p "Do you want to install Boost version 1.66.0 ? <y/N> " prompt
OPTION=""
else
prompt='y'
OPTION="-y"
fi
if [ $2 -eq 0 ]; then
debug=0
else
debug=1
fi
if [[ $prompt =~ [yY](es)* ]]
then
BOOST_URL=https://boostorg.jfrog.io/artifactory/main/release/1.66.0/source/boost_1_66_0.tar.bz2
echo "Install Boost from $BOOST_URL"
pushd $OPENAIRCN_DIR/build/ext
echo "Downloading Boost 1.66.0"
if [[ $OPTION =~ -[yY](es)* ]]
then
$SUDO rm -rf boost
fi
#git clone $GIT_URL
wget --quiet --tries=3 --retry-connrefused $BOOST_URL
tar --bzip2 -xf boost_1_66_0.tar.bz2
cp -fR boost_1_66_0/boost /usr/include
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
return 0
}
#-------------------------------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
......@@ -334,8 +295,6 @@ install_nghttp2_from_git() {
#arg2 is debug (0 or 1) (install debug libraries)
check_install_smf_deps() {
var_ubuntu_18_04=0
if [ $1 -gt 0 ]; then
OPTION="-y"
else
......@@ -400,8 +359,12 @@ check_install_smf_deps() {
if [[ $OS_DISTRO == "ubuntu" ]]; then
case "$(get_distribution_release)" in
"ubuntu18.04")
var_ubuntu_18_04=1
specific_packages="libconfig++-dev"
# Currently Ubuntu18.04 has boost 1.65 as the latest
# We need at least 1.66
# PPA has 1.67
$SUDO add-apt-repository ppa:mhier/libboost-latest --yes
$SUDO $INSTALLER update
specific_packages="libconfig++-dev libboost1.67-dev"
;;
*)
specific_packages="libconfig++-dev libasio-dev libboost-all-dev"
......@@ -477,12 +440,7 @@ check_install_smf_deps() {
install_nghttp2_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
if [ $var_ubuntu_18_04 -ne 0 ]; then
install_boost_1_66 $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
fi
return 0
}
#-------------------------------------------------------------------------------
......
......@@ -36,6 +36,8 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && DEBIAN_FRONTEND=noninteractive apt-get install --yes \
psmisc \
software-properties-common \
gnupg \
git \
&& rm -rf /var/lib/apt/lists/*
......@@ -79,8 +81,8 @@ COPY --from=oai-smf-builder /openair-smf/build/smf/build/smf oai_smf
COPY --from=oai-smf-builder /openair-smf/scripts/entrypoint.sh entrypoint.sh
COPY --from=oai-smf-builder /usr/local/lib/libpistache.so /usr/local/lib/
COPY --from=oai-smf-builder /usr/local/lib/libnghttp2_asio.so.1 /usr/local/lib/
COPY --from=oai-smf-builder /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 /usr/lib/x86_64-linux-gnu/
COPY --from=oai-smf-builder /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 /usr/lib/x86_64-linux-gnu/
COPY --from=oai-smf-builder /usr/lib/libboost_system.so.1.67.0 /usr/local/lib/
COPY --from=oai-smf-builder /usr/lib/libboost_thread.so.1.67.0 /usr/local/lib/
COPY --from=oai-smf-builder /openair-smf/build/smf/build/nas/libNAS.so /usr/local/lib/
RUN ldconfig
......
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