-
Notifications
You must be signed in to change notification settings - Fork 989
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
[question] Debug/Release compatibility for a shared library #15941
Comments
Hi @db4 Thanks for your question.
What fails? I guess it is a "missing binary", but can you please confirm? What combination do you really want? You want to depend on opencv as a shared library that links statically all its dependencies? Or would you like the dependencies to be shared as well? Do you want to link the dependencies in Debug mode or in Release mode? |
Yes, "missing binary".
I must not have been clear enough. I'm linking |
adding def package_id(self):
self.info.requires.patch_mode() resolves compatibility issues, but it's too broad. I would prefer to change package_id mode for embedded dependencies only, but how to do that? |
What would be the desired build type for dependencies? The main problem is that it is not univocally defined, because it depends on the consumer profile. Also, do you really plan to build a
I am not sure if I understand this, I thought you actually want to have dependencies always embedded, that is, always static libraries not shared? |
I have an application (conan package) that depends on some shared libraries (also conan packages). Everything can be built as Release or Debug except one shared library, which is Release-only. All this library's dependencies are statically linked (fully embedded), API is build_type agnostic, so there is no problem using it with everything else built as Debug. I just need to assure Conan that it's compatible with both Debug and Release build of the application. If this is still unclear, please let me know, I will create a standalone test case. |
I think for this case, the easiest might be to do "settings erasure" Maybe something like this: def build(self):
cmake = CMake(self)
cmake.configure(build_type="Release") # hardcode this
def package_id(self):
del self.info.settings.build_type Have you considered this approach? It will still need the settings.build_type defined, because of dependencies, and it might be necessary for |
Yes, I tried
due to that, def package_id(self):
self.info.requires.patch_mode() helps to get the same package_id, but it's too broad. Can I set |
And one more related question. Conan 1.x had |
Continued in #16114 |
What is your question?
For one my recipe I need to make Debug/Release packages compatible. It's a shared library, embedding some static ones. For simplicity, something like this:
The above doesn't work.
opencv
as an embedded dependency gets "full_mode" for itspackage_id
, which is different for Debug and Release packages. What can be done to avoid this? I think setting "patch_mode" for all embedded dependencies of the given recipes could help, but how to achieve that? There are a lot of dependencies, including transitive ones, so I don't like to or can't specifypackage_id
modes manually for all of them.Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: