Skip to content
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

Problem with shared static variable between dll #6550

Closed
JacqKrol opened this issue May 21, 2019 · 3 comments
Closed

Problem with shared static variable between dll #6550

JacqKrol opened this issue May 21, 2019 · 3 comments
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@JacqKrol
Copy link

I installed the lib gtkmm and run asample program from the manual (base.cc). A run-time error occurred because the dll pangomm called the function wrap_register from glibmm which has a static variable wrap_func_table but because pangomm has its own copy not initialized a run-time error occurs when this variable is referenced in wrap_register.

How can I solve this problem ? I hoped vcpkg would solve these kind of linking issues automatically.

@PhoebeHui PhoebeHui added the category:port-bug The issue is with a library, which is something the port should already support label May 24, 2019
@NNemec
Copy link
Contributor

NNemec commented May 25, 2019

I think I have a fix already - going to prepare a PR

NNemec added a commit to NNemec/vcpkg that referenced this issue May 25, 2019
@JacqKrol
Copy link
Author

JacqKrol commented May 25, 2019 via email

@NNemec
Copy link
Contributor

NNemec commented May 25, 2019

The problem was that since #5937 glibmm could only be built as static library but atkmm, pangomm and gtkmm each can only be linked as dynamic libary, leading to up to three copies of the glibmm static data in one executable. My fix reverts that change so that glibmm is also built as dynamic libary.

@grdowns grdowns closed this as completed in 97d6a9b Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

No branches or pull requests

3 participants