-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[package] glib: Can't have multiple dependencies linking against static glib in Windows #11022
Comments
that's true, in general you cannot have multiple instances of GLib in your address space, and it bites not only on Windows. |
Do you think making glib shared by default a good solution? Glib works correctly as shared in most configurations, while it fails if static on many configurations. |
if it's what upstream recommends, then yes. |
Can conan client recognize such static+shared dependencies problems? Maybe it would be a good feature to implement a warning? Version override is already logged as a warning, it could be the same. |
For all intents and purposes, static libraries with global state are generally broken in Windows.
If we have two shared libraries linking against a static library, then each one of these two libraries will get its own version of the global state. This is unlike on Linux.
The problem here is that
glib
relies heavily on global state, and many of the dependencies of gtk link against glib. If any of these dependencies is a shared library (which is actually the case with cairo and gdk-pixbuf), it will get its own version of glib separate from the others.conan-center-index/recipes/gtk/all/conanfile.py
Lines 64 to 69 in e94a759
I suggest that we make glib (and any other library with global state for that matter) shared by default on Windows.
This issue is a blocker for #11013. Sorry I'm not sure if this is the right repository for this issue.
Package and Environment Details (include every applicable attribute)
The text was updated successfully, but these errors were encountered: