Commit 45212d3b authored by Cedric Roux's avatar Cedric Roux

hotfix: protobuf-c compilation failure

protobuf-c does not compile anymore.

Let's handle this a bit better.

We now install protobuf and protobuf-c only for the
flexran agent. That is, if you want to use the flexran
agent, you need to install protobuf/protobuf-c and
you do it this way:

  ./build_oai -I -a

(you add -a)

Other targets don't need protobuf nor protobuf-c, so
it's not installed by the -I command of build_oai,
unless you pass -a with -I.

Also, we now use protobuf 3.3.0, not 2.6.1. The code
has been adapted, a quick test seems to indicate that
the system works, but it has not been intensively tested.
parent 076b2ed2
...@@ -448,6 +448,11 @@ function main() { ...@@ -448,6 +448,11 @@ function main() {
flash_firmware_bladerf flash_firmware_bladerf
fi fi
fi fi
if [ "$FLEXRAN_AGENT" == "1" ] ; then
echo_info "installing protobuf/protobuf-c for flexran agent support"
install_protobuf_from_source
install_protobuf_c_from_source
fi
fi fi
if [ "$INSTALL_OPTIONAL" = "1" ] ; then if [ "$INSTALL_OPTIONAL" = "1" ] ; then
......
...@@ -184,10 +184,14 @@ install_protobuf_from_source(){ ...@@ -184,10 +184,14 @@ install_protobuf_from_source(){
( (
cd /tmp cd /tmp
echo "Downloading protobuf" echo "Downloading protobuf"
rm -rf /tmp/protobuf-2.6.1.tar.gz* /tmp/protobuf-2.6.1 #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 #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 --owner $USER --group $USER --no-same-owner #tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner
cd protobuf-2.6.1/ #cd protobuf-2.6.1/
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
wget https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $USER --group $USER --no-same-owner
cd protobuf-3.3.0/
./configure ./configure
echo "Compiling protobuf" echo "Compiling protobuf"
make -j`nproc` make -j`nproc`
...@@ -410,8 +414,6 @@ check_install_oai_software() { ...@@ -410,8 +414,6 @@ check_install_oai_software() {
install_asn1c_from_source install_asn1c_from_source
$SUDO rm -fr /opt/ssh $SUDO rm -fr /opt/ssh
$SUDO git clone https://gist.github.com/2190472.git /opt/ssh $SUDO git clone https://gist.github.com/2190472.git /opt/ssh
install_protobuf_from_source
install_protobuf_c_from_source
} }
### Remove Nettle installation which was done from sources ### Remove Nettle installation which was done from sources
......
//'syntax = "proto2";' syntax = "proto2";
package protocol; package protocol;
// //
......
//'syntax = "proto2";' syntax = "proto2";
package protocol; package protocol;
import "config_common.proto"; import "config_common.proto";
......
//'syntax = "proto2";' syntax = "proto2";
package protocol; package protocol;
enum flex_control_delegation_type { enum flex_control_delegation_type {
......
syntax = "proto2";
package protocol; package protocol;
import "mac_primitives.proto"; import "mac_primitives.proto";
......
//'syntax = "proto2";' syntax = "proto2";
package protocol; package protocol;
import "stats_messages.proto"; import "stats_messages.proto";
...@@ -40,7 +40,7 @@ enum flexran_direction { ...@@ -40,7 +40,7 @@ enum flexran_direction {
} }
enum flexran_err { enum flexran_err {
option allow_alias = true; //option allow_alias = true;
// message errors // message errors
NO_ERR = 0; NO_ERR = 0;
MSG_DEQUEUING = -1; MSG_DEQUEUING = -1;
......
syntax = "proto2";
package protocol; package protocol;
message flex_header { message flex_header {
......
syntax = "proto2";
package protocol; package protocol;
// //
......
syntax = "proto2";
package protocol; package protocol;
// //
......
syntax = "proto2";
package protocol; package protocol;
//import "header.proto"; //import "header.proto";
......
syntax = "proto2";
package protocol; package protocol;
enum flex_harq_status { enum flex_harq_status {
......
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