Skip to content

Commit

Permalink
misc: Allow to install shared lib gflags on centos9 (#11889)
Browse files Browse the repository at this point in the history
Summary:
This pr just reverts one line of change by #10732. I think it is not necessary to fully align gflags build with velox build. It means we should set `BUILD_SHARED_LIBS=ON` for gflags when `VELOX_BUILD_SHARED=ON`, but it is not necessary to set `BUILD_SHARED_LIBS=OFF` for gflags when `VELOX_BUILD_SHARED=OFF`. We can just make the shared lib always be produced, as I also note `setup-ubuntu.sh` always installs shared gflags from package (see [link](https://github.com/facebookincubator/velox/blob/main/scripts/setup-ubuntu.sh#L120)). Another reason for this fix is, it is better to keep using same lib type (static or shared) for gflags and glog to avoid any potential issues.

Related discussion on this issue: #10732 (comment)

Pull Request resolved: #11889

Reviewed By: xiaoxmeng

Differential Revision: D67414560

Pulled By: pedroerp

fbshipit-source-id: a797f44c2b659ca680ac555928a9f9d64ac9c8f0
  • Loading branch information
PHILO-HE authored and facebook-github-bot committed Dec 18, 2024
1 parent e3f7c5f commit 4ffaf9c
Showing 1 changed file with 1 addition 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 @@ -90,7 +90,7 @@ function install_gflags {
# Remove an older version if present.
dnf remove -y gflags
wget_and_untar https://github.com/gflags/gflags/archive/v2.2.2.tar.gz gflags
cmake_install_dir gflags -DBUILD_SHARED_LIBS="$VELOX_BUILD_SHARED" -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DLIB_SUFFIX=64
cmake_install_dir gflags -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DLIB_SUFFIX=64
}

function install_glog {
Expand Down

0 comments on commit 4ffaf9c

Please sign in to comment.