Created
March 19, 2021 03:39
-
-
Save KuanYuChang/436800efbb5f1a043f36e3a5249aa63e to your computer and use it in GitHub Desktop.
Tested on Giselle
This file contains hidden or 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
#!/usr/bin/env bash | |
# Cause the script to exit on any errors | |
# Reference: https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ | |
set -euo pipefail | |
# install dependencies | |
sudo apt install autoconf automake libtool curl make g++ unzip | |
# clone git repo | |
git clone https://github.com/protocolbuffers/protobuf.git | |
# cloned the submodules and generated the configure script | |
cd protobuf | |
git checkout v3.6.1 | |
git submodule update --init --recursive | |
./autogen.sh | |
# build and install | |
sed -i 's/\-DNDEBUG\"/\-DNDEBUG -fPIC\"/g' configure | |
./configure | |
make -j8 | |
make check -j8 | |
sudo make install | |
sudo ldconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment