Commit f31dc5a5 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'libboost_cleanup' into 'develop'

Libboost cleanup

See merge request oai/cn5g/oai-cn5g-amf!30
parents df4d2ee8 a2414a08
......@@ -32,45 +32,6 @@ THIS_SCRIPT_PATH=`dirname $SCRIPT`
source $THIS_SCRIPT_PATH/build_helper
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 $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)
......@@ -297,9 +258,7 @@ install_nlohmann_from_git() {
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
check_install_amf_deps(){
var_ubuntu_18_04=0
if [ $1 -gt 0 ]; then
OPTION="-y"
else
......@@ -370,8 +329,7 @@ check_install_amf_deps(){
# We need at least 1.66
# PPA has 1.67
$SUDO add-apt-repository ppa:mhier/libboost-latest --yes
$SUDO $INSTALLER update
#var_ubuntu_18_04=1
$SUDO $INSTALLER update
if [ $IS_CONTAINER -eq 0 ]; then
specific_packages="libconfig++-dev libasio-dev libboost-all-dev mysql-server"
else
......@@ -466,11 +424,6 @@ check_install_amf_deps(){
install_nlohmann_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
$SUDO ldconfig
return 0
......
......@@ -343,19 +343,6 @@ int amf_config::load(const std::string& config_file) {
std::string smf_fqdn = {};
smf_addr_item.lookupValue(AMF_CONFIG_STRING_FQDN_DNS, smf_fqdn);
smf_inst.fqdn = smf_fqdn;
/*
uint8_t addr_type = 0;
fqdn::resolve(smf_fqdn, smf_inst.ipv4, smf_port, addr_type);
if (addr_type != 0) { // IPv6: TODO
throw("DO NOT SUPPORT IPV6 ADDR FOR SMF!");
} else { // IPv4
IPV4_STR_ADDR_TO_INADDR(
util::trim(smf_inst.ipv4).c_str(), smf_ipv4_addr,
"BAD IPv4 ADDRESS FORMAT FOR SMF !");
smf_inst.port = std::to_string(smf_port);
smf_inst.version = "v1"; // TODO: get API version
}
*/
}
smf_addr_item.lookupValue(
......@@ -558,12 +545,6 @@ void amf_config::display() {
Logger::config().info(
"- MySQL DB ................: %s", auth_para.mysql_db.c_str());
/* Logger::config().info(
"- operator key ............: %s", auth_para.operator_key.c_str());
Logger::config().info(
"- random ..................: %s", auth_para.random.c_str());
*/
Logger::config().info("- N2 Networking:");
Logger::config().info(" Iface .................: %s", n2.if_name.c_str());
Logger::config().info(" IP Addr ...............: %s", inet_ntoa(n2.addr4));
......
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