-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Shehab7osny/patch-6
Update Installation Steps for grpc
- Loading branch information
Showing
2 changed files
with
51 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,29 @@ | ||
git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc grpc_base | ||
export GRPC_INSTALL_DIR=$HOME/.local | ||
mkdir -p $GRPC_INSTALL_DIR | ||
export PATH="$GRPC_INSTALL_DIR/bin:$PATH" | ||
|
||
sudo apt install -y cmake | ||
sudo apt install -y build-essential autoconf libtool pkg-config | ||
|
||
LATEST_VER=$(curl -L "https://api.github.com/repos/grpc/grpc/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') | ||
git clone --recurse-submodules -b $LATEST_VER https://github.com/grpc/grpc grpc_base | ||
|
||
cd grpc_base | ||
git submodule update --init | ||
mkdir -p cmake/build | ||
pushd cmake/build | ||
cmake -DgRPC_INSTALL=ON \ | ||
-DgRPC_BUILD_TESTS=OFF \ | ||
-DCMAKE_INSTALL_PREFIX=$GRPC_INSTALL_DIR \ | ||
../.. | ||
make -j4 | ||
sudo make install | ||
popd | ||
|
||
make | ||
mkdir -p third_party/abseil-cpp/cmake/build | ||
pushd third_party/abseil-cpp/cmake/build | ||
cmake -DCMAKE_INSTALL_PREFIX=$GRPC_INSTALL_DIR \ | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ | ||
../.. | ||
make -j4 | ||
sudo make install | ||
sudo ldconfig | ||
popd |