-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BugFix] Fix the thrift library conflict in some cases by linking the required cachelib dependencies statically #16674
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
#ifndef JEMALLOC_NO_RENAME | ||
#define JEMALLOC_NO_RENAME 1 | ||
#endif | ||
|
||
#include <cachelib/allocator/CacheAllocator.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'cachelib/allocator/CacheAllocator.h' file not found [clang-diagnostic-error]
#include <cachelib/allocator/CacheAllocator.h>
^
run starrocks_admit_test image |
run starrocks_admit_test image |
run starrocks_be_unittest |
run starrocks_admit_test |
… required cachelib dependencies statically.
… has been removed.
run starrocks_fe_unittest |
run starrocks_fe_unittest |
run starrocks_admit_test |
[FE PR Coverage Check]😍 pass : 0 / 0 (0%) |
Kudos, SonarCloud Quality Gate passed!
|
hi @GavinMar I'm trying to customize a cachelib for our own purpose, but not knowing how to build a static cachelib so that it can still integrate into SR. I'm using this version of cachelib: https://github.com/facebook/CacheLib/releases/tag/v2023.01.30.00, my libs: libcachelib_allocator.a 48M cdn-thirdparty: libcachelib_allocator.a 170M am I doing it correctly ? can you please share some notes on how to build the cachelib? thanks! |
|
hi @GavinMar thanks for the reply. |
I used the version v2023.01.23 and I think your version is also ok. And you'd better build the cachelib with the same toolkits, such as g++ version, to avoid some abi compatibility problems. |
thank you so much for the tips! I'll give another shot |
What type of PR is this:
Which issues of this PR fixes :
Fixes #
Problem Summary(Required) :
When linking the cachelib dynamically by
find_package
, all related libraries will be linked. While some of them are not required in our usage scenarios, and even lead to dependency conflicts in some environments.So, we choose to only link the required cachelib dependencies statically to avoid unnecessary conflicts. Also, with this change, it is no need to package lots of dynamic libraries in our be output.
Checklist:
Bugfix cherry-pick branch check: