diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 12247681429f3e3da76c850143d83f132e914a2f..2db18176b4b57704315eb9ae1a3e1f3e334b5fe0 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -911,6 +911,7 @@ if (ENB_AGENT_SB_IF) add_library(ENB_AGENT ${OPENAIR2_DIR}/ENB_APP/enb_agent_handler.c ${OPENAIR2_DIR}/ENB_APP/enb_agent_common.c + ${OPENAIR2_DIR}/ENB_APP/enb_agent_common_internal.c ${OPENAIR2_DIR}/ENB_APP/enb_agent_mac.c ${OPENAIR2_DIR}/ENB_APP/enb_agent.c ${OPENAIR2_DIR}/ENB_APP/enb_agent_task_manager.c @@ -923,6 +924,13 @@ if (ENB_AGENT_SB_IF) set(PROTOBUF_LIB "protobuf-c") + FIND_PATH(LIBYAML_INCLUDE_DIR NAMES yaml.h) + FIND_LIBRARY(LIBYAML_LIBRARIES NAMES yaml libyaml) + + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(Yaml DEFAULT_MSG LIBYAML_LIBRARIES LIBYAML_INCLUDE_DIR) + MARK_AS_ADVANCED(LIBYAML_INCLUDE_DIR LIBYAML_LIBRARIES) + #set(PROTOBUF_LIB "protobuf") #for Cpp endif() @@ -1703,7 +1711,7 @@ target_link_libraries (lte-softmodem target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES}) -target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS}) +target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES}) target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES}) target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES}) @@ -1737,7 +1745,7 @@ target_link_libraries (lte-softmodem-nos1 -Wl,--end-group ) target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES}) -target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS}) +target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES}) @@ -1874,7 +1882,7 @@ target_link_libraries (oaisim_nos1 target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES}) target_link_libraries (oaisim_nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} - ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS}) + ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES}) #Force link with forms, regardless XFORMS option target_link_libraries (oaisim_nos1 forms) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 294c5006a5b45be147202a35cdee9731f9035e1d..498dfbe7a97963920a051fb02443edc1a3beffdc 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -146,6 +146,37 @@ install_nettle_from_source() { rm -rf /tmp/nettle-2.5.tar.gz /tmp/nettle-2.5 } + +install_protobuf_from_source(){ + cd /tmp + echo "Downloading protobuf" + rm -rf /tmp/protobuf-2.6.1.tar.gz* /tmp/protobuf-2.6.1 + wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz + tar -xzvf protobuf-2.6.1.tar.gz + cd protobuf-2.6.1/ + ./configure + echo "Compiling protobuf" + make -j`nproc` + $SUDO make install + rm -rf /tmp/protobuf-2.6.1.tar.gz /tmp/protobuf-2.6.1 + $SUDO ldconfig +} + +install_protobuf_c_from_source(){ + cd /tmp + echo "Downloading protobuf-c" + rm -rf /tmp/protobuf-c + git clone https://github.com/protobuf-c/protobuf-c.git + cd protobuf-c + ./autogen.sh + ./configure + echo "Compiling protobuf-c" + make -j`nproc` + $SUDO make install + rm -rf /tmp/protobuf-c + $SUDO ldconfig +} + install_gnutls_from_source(){ cd /tmp echo "Downloading gnutls archive" @@ -271,7 +302,8 @@ check_install_oai_software() { python-numpy \ sshpass \ libxslt1-dev \ - android-tools-adb + android-tools-adb \ + libyaml-dev $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so if [ `lsb_release -rs` = '12.04' ] ; then @@ -285,6 +317,8 @@ check_install_oai_software() { install_asn1c_from_source $SUDO rm -fr /opt/ssh $SUDO git clone https://gist.github.com/2190472.git /opt/ssh + install_protobuf_from_source + install_protobuf_c_from_source } install_asn1c_from_source(){