From 4ffaf9c8ec15a96fd81efe1543b0e6031a42ce2c Mon Sep 17 00:00:00 2001 From: PHILO-HE Date: Wed, 18 Dec 2024 15:29:19 -0800 Subject: [PATCH] misc: Allow to install shared lib gflags on centos9 (#11889) Summary: This pr just reverts one line of change by https://github.com/facebookincubator/velox/issues/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: https://github.com/facebookincubator/velox/pull/10732#issuecomment-2295588282 Pull Request resolved: https://github.com/facebookincubator/velox/pull/11889 Reviewed By: xiaoxmeng Differential Revision: D67414560 Pulled By: pedroerp fbshipit-source-id: a797f44c2b659ca680ac555928a9f9d64ac9c8f0 --- scripts/setup-centos9.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup-centos9.sh b/scripts/setup-centos9.sh index a75bbb02596d..644f44e189ac 100755 --- a/scripts/setup-centos9.sh +++ b/scripts/setup-centos9.sh @@ -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 {