Fixing GRPC installation
Change-Id: I477e8e5103fe92d64359253ff12dbce3b767d1b7
diff --git a/Jenkinsfile b/Jenkinsfile
index 9ecad5f..9a2a13f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -32,6 +32,7 @@
sh returnStdout: true, script: 'cp -r ../../build-files/mkdebian .'
}
stage ('Build packages and libraries') {
+ sh returnStdout: true, script: '/bin/bash -c make prereq'
sh returnStdout: true, script: '/bin/bash -c make'
}
stage ('Copy ASFvOLT16 release file to mkdebian folder') {
diff --git a/Makefile b/Makefile
index 3a9a521..2d09e21 100644
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@
########################################################################
##
##
-## Check prerequisites
+## Install prerequisites
##
##
HOST_SYSTEM = $(shell uname | cut -f 1 -d_)
@@ -64,7 +64,7 @@
-ldl
endif
-check:
+prereq:
sudo apt-get -q -y install git pkg-config build-essential autoconf libtool libgflags-dev libgtest-dev clang libc++-dev
# Install GRPC plugins
@@ -74,8 +74,11 @@
make -C $(GRPC_DST)
sudo make -C $(GRPC_DST) install
# Install libprotobuf and protoc
- make -C /tmp/grpc/third_party/protobuf
- sudo make -C /tmp/grpc/third_party/protobuf install
+ cd $(GRPC_DST)/third_party/protobuf && ./autogen.sh
+ cd $(GRPC_DST)/third_party/protobuf && ./configure
+ make -C $(GRPC_DST)/third_party/protobuf
+ sudo make -C $(GRPC_DST)/third_party/protobuf install
+ sudo ldconfig
########################################################################
##
@@ -218,7 +221,7 @@
DEPS = $(SRCS:.cc=.d)
.DEFAULT_GOAL := all
all: $(BUILD_DIR)/openolt
-$(BUILD_DIR)/openolt: check openolt-api bal $(OBJS)
+$(BUILD_DIR)/openolt: openolt-api bal $(OBJS)
$(CXX) $(OBJS) $(LDFLAGS) $(OPENOLT_API_LIB) -o $@ -L$(BALLIBDIR) -l$(BALLIBNAME)
ln -s $(shell ldconfig -p | grep libgrpc.so.5 | tr ' ' '\n' | grep /) $(BUILD_DIR)/libgrpc.so.5
ln -s $(shell ldconfig -p | grep libgrpc++.so.1 | tr ' ' '\n' | grep /) $(BUILD_DIR)/libgrpc++.so.1