Skip to content

Commit

Permalink
Install protobuf from setup script for Ubuntu (#11219)
Browse files Browse the repository at this point in the history
Summary:
Protobuf can be installed by setup-centos9.sh, but cannot by installed by
setup-ubuntu.sh. This pr simply copies the installation command. In addition,
`-fPIC` flag is added for build config.

Pull Request resolved: #11219

Reviewed By: kagamiori

Differential Revision: D64187062

Pulled By: kgpai

fbshipit-source-id: 74e265162eda521044bb0b95688457ce1e6bbbc2
  • Loading branch information
PHILO-HE authored and facebook-github-bot committed Oct 10, 2024
1 parent 5e4b35a commit 2fd894d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/setup-centos9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function install_protobuf {
wget_and_untar https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-all-21.8.tar.gz protobuf
(
cd ${DEPENDENCY_DIR}/protobuf
./configure --prefix=${INSTALL_PREFIX}
./configure CXXFLAGS="-fPIC" --prefix=${INSTALL_PREFIX}
make "-j${NPROC}"
make install
ldconfig
Expand Down
12 changes: 12 additions & 0 deletions scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@ function install_boost {
)
}

function install_protobuf {
wget_and_untar https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-all-21.8.tar.gz protobuf
(
cd ${DEPENDENCY_DIR}/protobuf
./configure CXXFLAGS="-fPIC" --prefix=${INSTALL_PREFIX}
make "-j${NPROC}"
make install
ldconfig
)
}

function install_folly {
wget_and_untar https://github.com/facebook/folly/archive/refs/tags/${FB_OS_VERSION}.tar.gz folly
cmake_install_dir folly -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON
Expand Down Expand Up @@ -238,6 +249,7 @@ function install_cuda {
function install_velox_deps {
run_and_time install_velox_deps_from_apt
run_and_time install_fmt
run_and_time install_protobuf
run_and_time install_boost
run_and_time install_folly
run_and_time install_fizz
Expand Down

0 comments on commit 2fd894d

Please sign in to comment.