Difference between revisions of "How to install and build C++ gRPC"
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
cd grpc | cd grpc | ||
mkdir -p cmake/build | mkdir -p cmake/build | ||
+ | push cmake/build | ||
cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$GRPC_INSTALL_DIR -DBUILD_SHARED_LIBS=ON ../.. | cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$GRPC_INSTALL_DIR -DBUILD_SHARED_LIBS=ON ../.. | ||
make -j 4 | make -j 4 | ||
make install | make install | ||
+ | pops | ||
</pre> | </pre> | ||
</blockquote> | </blockquote> | ||
</font> | </font> |
Revision as of 18:51, 16 December 2022
Here are the official instructions for downloading and building grpc
However, the following is a more relevant version of how grpc was installed on the ejfat nodes
- Setup some environmental variables (assuming bash)
export GRPC_INSTALL_DIR=/daqfs/gRPC/installation export PATH="$GRPC_INSTALL_DIR/bin:$PATH" export LD_LIBRARY_PATH="$GRPC_INSTALL_DIR/lib:$LD_LIBRARY_PATH"
- The alternative is to run a provided bash setup script which does the same thing
/daqfs/gRPC/setupgrpc
- Clone the repository
git clone --recurse-submodules -b v1.50 --depth 1 --shallow-submodules https://github.com/grpc/grpc
- Build the package
cd grpc mkdir -p cmake/build push cmake/build cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$GRPC_INSTALL_DIR -DBUILD_SHARED_LIBS=ON ../.. make -j 4 make install pops