-
Notifications
You must be signed in to change notification settings - Fork 1.6k
td doesn't install shared libraries despite configuring with TD_INSTALL_SHARED_LIBRARIES=ON #3325
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
Comments
|
The linked issue says that static libs are built for the sake of projects that embed tdlib. But on FreeBSD in the ports we avoid static libs because port/package dependencies are hard to track when they install static libs. Is there a way to add a non-default option to always build all shared libs? |
Removing the STATIC keywords from all add_library instructions and making BUILD_SHARED_LIBS to depend on the option TD_INSTALL_SHARED_LIBRARIES does the trick. |
Yes. You don't even need to make This works only because GCC/clang export everything from shared libraries by default, which significantly increase binary size, can expose some internal functions and data, and have no chance to work on Windows. In the case of TDLib having the libraries as shared libraries provides no advantages given that they don't have stable interface and can't be updated independently. But if installing of shared libraries only is a required policy and can't be avoided, then I can only point to https://lore.kernel.org/lkml/CAHk-=whs8QZf3YnifdLv57+FhBi5_WeNTG1B-suOES=RcUSmQg@mail.gmail.com/ and propose to patch all |
This doesn't work because every add_library instruction has the STATIC argument hardcoded. |
You said
I commented that the second part isn't needed. |
It only installs static libs, with one exception of libtdjson:
Version: 1.8.48 (hash b8b08b0)
FreeBSD 14.2
The text was updated successfully, but these errors were encountered: