fix(build): Register /usr/local/lib64 with ldconfig after gflags install on CentOS 9#16817
fix(build): Register /usr/local/lib64 with ldconfig after gflags install on CentOS 9#16817Avinash-Raj wants to merge 9 commits intofacebookincubator:mainfrom
Conversation
✅ Deploy Preview for meta-velox canceled.
|
scripts/setup-centos9.sh
Outdated
| dnf remove -y gflags | ||
| wget_and_untar https://github.com/gflags/gflags/archive/"${GFLAGS_VERSION}".tar.gz gflags | ||
| cmake_install_dir gflags -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DLIB_SUFFIX=64 | ||
| echo "/usr/local/lib64" >/etc/ld.so.conf.d/local-lib64.conf && ldconfig |
There was a problem hiding this comment.
Nit: space between > and /etc.
There was a problem hiding this comment.
Initially I did the same, but the repo's pre-commit hook complains about the space which appears next to the > operator.
There was a problem hiding this comment.
I'm not familiar with the contents of /usr/local/lib64/ but could this create conflicts with other libraries that share the same soname?
Have we reviewed if any such conflicts are possible?
There was a problem hiding this comment.
What happens if we remove -DLIB_SUFFIX=64 from the above, and then remove this line? I believe that would make it install to /usr/local/lib instead of /usr/local/lib64. That might be cleaner overall.
There was a problem hiding this comment.
Validating the changes with a manual CI run using Presto master (2ff4adf2d3b1691947b16bcd7c41b3a87ce0bc9f) and this branch of Velox (a14663eaf90afa42be471907d402f2f8a4b614a4).
There was a problem hiding this comment.
I settled on a solution that calls ldconfig but doesn't use -DLIB_SUFFIX=64 anymore.
I accidentally rebased/force-pushed, then restored the history in a second force-push. Apologies for that. I'll approve the PR.
There was a problem hiding this comment.
There was a problem hiding this comment.
This worked. Let's get it merged. 👍
a14663e to
cc68f01
Compare
…stall on CentOS 9 gflags installs shared libraries to INSTALL_PREFIX/lib, which is not in the default ldconfig search path on CentOS Stream 9. This causes fbthrift's thrift1 compiler to fail at runtime with: error while loading shared libraries: libgflags.so.2.2 Also remove -DLIB_SUFFIX=64 so gflags installs to lib/ instead of lib64/, consistent with the INSTALL_PREFIX convention.
cc68f01 to
e4bdbb5
Compare
|
I've been seeing this error when starting presto_server which might be related. Have others seen this as well ? |
We discussed this internally. Aditi is seeing this issue on MacOS. Christian suggested the following fix
|
|
@aditi-pandit I think this is solving a different issue. We saw this kind of error when building the Presto native dependencies image: Full logs are in https://github.com/rapidsai/velox-testing/actions/runs/23355678278/job/67945776144. |
gflags installs to
/usr/local/lib64which is not in the defaultldconfigsearch path on CentOS Stream 9.This causes downstream builds (e.g. fbthrift's
thrift1compiler) to fail at runtime with:This moves gflags to
/usr/local/libto align with other dependency installation paths and registers that path withldconfig.