-
Notifications
You must be signed in to change notification settings - Fork 13
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
Issue building couchbase-cxx-client in static #701
Comments
Hi @Thomas-Barbier-1A, thanks for the report. You are right. At this moment it is a limitation as I have not figured out how to export library targets, but keep dependencies hidden (as we statically link dependencies, and do not export their interfaces anyway). The "static build" right now works the best, when you use the SDK as subproject of your project. This way you can do This is what I'm doing right now in PHP SDK wrapper: |
Hi @avsej , thank you for your reply. Unfortunately we have a particular UseCase that prevent us to use the libcouchbase as a CMake subproject: |
To avoid issues with generation of cmake helper scripts the following changes has been made: * interface libraries that are used to carry compiler options and flags are declared as IMPORTED to avoid unnecessary INTERFACE_LINK dependencies for the static library * jsonsl, asio and couchbase_backtrace libraries are not linked as a targets, but rather as a object files directly. This is also done to avoid announcing them as a transitive dependencies. All these libraries are hidden and never exposed. * for other third-party dependencies do not disable install tasks, which generate export files This patch also removes some unused cmake files (of crypto, sasl and operations/management directories). Fixes couchbase#701
To avoid issues with generation of cmake helper scripts the following changes has been made: * interface libraries that are used to carry compiler options and flags are declared as IMPORTED to avoid unnecessary INTERFACE_LINK dependencies for the static library * jsonsl, asio and couchbase_backtrace libraries are not linked as a targets, but rather as a object files directly. This is also done to avoid announcing them as a transitive dependencies. All these libraries are hidden and never exposed. * for other third-party dependencies do not disable install tasks, which generate export files This patch also removes some unused cmake files (of crypto, sasl and operations/management directories). Fixes couchbase#701
To avoid issues with generation of cmake helper scripts the following changes has been made: * interface libraries that are used to carry compiler options and flags are declared as IMPORTED to avoid unnecessary INTERFACE_LINK dependencies for the static library * jsonsl, asio and couchbase_backtrace libraries are not linked as a targets, but rather as a object files directly. This is also done to avoid announcing them as a transitive dependencies. All these libraries are hidden and never exposed. * for other third-party dependencies do not disable install tasks, which generate export files This patch also removes some unused cmake files (of crypto, sasl and operations/management directories). Fixes couchbase#701
Hello,
I contact you because I am trying to build the client in static and I am facing some issues.
couchbase-cxx-client version 1.0.4 (tarball from https://github.com/couchbase/couchbase-cxx-client/releases/download/1.0.4/couchbase-cxx-client-1.0.4.tar.gz)
I am using the following cmake command
And I am getting the following errors:
If I build the client in shared it works fine
Maybe I am using the wrong flags to build in static but I have the feeling there is some issues in the cmake files for the static build.
What triggers the issue seems to be the usage of both
-DCOUCHBASE_CXX_CLIENT_INSTALL=ON
and-DCOUCHBASE_CXX_CLIENT_BUILD_STATIC=ON
Can you please confirm that the cmake command I am using is correct to build in static and install the couchbase-cxx-client?
Cheers
Thomas
Note: I am sorry for creating the issue on Github but I cannot create an account on your Couchbase JIRA, there is only the option to sign in and if I sign in with my company or my personal account I have not access to your board.
The text was updated successfully, but these errors were encountered: