Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
8c8f3f86
Commit
8c8f3f86
authored
3 years ago
by
Robert Schmidt
Committed by
Manish
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Compiling protobuf-c requires protobuf, so add it
parent
df93c43e
No related branches found
No related tags found
3 merge requests
!1757
Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c
,
!1515
integration_2022_wk13b
,
!1507
Support Ubuntu 20.04, 22.04, Fedora 35 in build_oai, additional fixes, drop old distros
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake_targets/tools/build_helper
+38
-0
38 additions, 0 deletions
cmake_targets/tools/build_helper
with
38 additions
and
0 deletions
cmake_targets/tools/build_helper
+
38
−
0
View file @
8c8f3f86
...
@@ -252,6 +252,43 @@ compilations() {
...
@@ -252,6 +252,43 @@ compilations() {
# External packages installers
# External packages installers
############################################
############################################
install_protobuf_from_source(){
protobuf_install_log=$OPENAIR_DIR/cmake_targets/log/protobuf_install_log.txt
echo_info "\nInstalling Google Protobuf from sources. The log file for Protobuf installation is here: $protobuf_install_log "
(
cd /tmp
echo "Downloading protobuf"
#rm -rf /tmp/protobuf-2.6.1.tar.gz* /tmp/protobuf-2.6.1
#wget https://github.com/protocolbuffers/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
#tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner
#cd protobuf-2.6.1/
if [ $IS_CONTAINER -eq 0 ]
then
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
wget --tries=3 --retry-connrefused https://github.com/protocolbuffers/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $(id -u) --group $(id -g) --no-same-owner
cd protobuf-3.3.0/
else
export LD_LIBRARY_PATH=/usr/local/lib #protoc needs to know where toclook for shared libs
rm -rf /tmp/protobuf
git clone --depth=1 --branch=v3.3.0 https://github.com/protocolbuffers/protobuf.git /tmp/protobuf
cd /tmp/protobuf
git submodule update --init --recursive
./autogen.sh
fi
./configure
echo "Compiling protobuf"
make -j`nproc`
$SUDO make install
$SUDO ldconfig
if [[ -v CI_ENV ]]; then
cd /tmp
$SUDO rm -rf protobuf*
fi
) >& $protobuf_install_log
}
install_protobuf_c_from_source(){
install_protobuf_c_from_source(){
protobuf_c_install_log=$OPENAIR_DIR/cmake_targets/log/protobuf_c_install_log.txt
protobuf_c_install_log=$OPENAIR_DIR/cmake_targets/log/protobuf_c_install_log.txt
echo_info "\nInstalling Google Protobuf_C from sources. The log file for Protobuf_C installation is here: $protobuf_c_install_log "
echo_info "\nInstalling Google Protobuf_C from sources. The log file for Protobuf_C installation is here: $protobuf_c_install_log "
...
@@ -291,6 +328,7 @@ install_protobuf_c() {
...
@@ -291,6 +328,7 @@ install_protobuf_c() {
;;
;;
esac
esac
if [[ "$protobuf_packages" == "" ]]; then
if [[ "$protobuf_packages" == "" ]]; then
install_protobuf_from_source
install_protobuf_c_from_source
install_protobuf_c_from_source
else
else
$SUDO $INSTALLER -y install $protobuf_packages
$SUDO $INSTALLER -y install $protobuf_packages
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment