Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
8c8f3f86
Commit
8c8f3f86
authored
Mar 26, 2022
by
Robert Schmidt
Committed by
Manish
Mar 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiling protobuf-c requires protobuf, so add it
parent
df93c43e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
cmake_targets/tools/build_helper
cmake_targets/tools/build_helper
+38
-0
No files found.
cmake_targets/tools/build_helper
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment