GNOME Bugzilla – Bug 572713
build the core of totem as a shared library
Last modified: 2011-12-02 19:57:36 UTC
To build the plugins on windows, all symbols in the dll files must be resolved, which requires the core of totem must be in a shared library. On other systems, the symbols can be resolve in run-time, so this is not an issue. I had a look at the source, found that bindings, libtotem_player, libtotemmodule had cross-reference, so they had to put into one shared library. Also, to make the symbols in a dll library visible, the exported symbols should have G_MODULE_EXPORT specifier.
*** Bug 574455 has been marked as a duplicate of this bug. ***
This isn't going to be so simple. I tried to make the existing convenience libraries shared instead, but there were numerous undefined symbols. I can see two solutions: 1) Completely restructure the libraries into a single, lib_LTLIBRARIES libtotem.la; 2) For Cygwin/MinGW, create an import lib from the totem executable and use that to resolve symbols in the plugins. I'm attaching a patch for 2.28.3 which does the latter.
Created attachment 150766 [details] [review] 2.28 Cygwin/MinGW patch
There are a few commits related to this in my introspection branch: http://git.gnome.org/browse/totem/log/?h=introspection
*** Bug 617258 has been marked as a duplicate of this bug. ***
commit fea7f1b27ea17807f5a439676dfb63f93b5578e9 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Sat Jun 26 23:27:45 2010 +0100 Rename libtotem_main.la to libtotem.la libtotem.la is a more conventional name, and we don't need to leak the fact that Totem is built from an unholy mess of noinsted libraries into the set of installed libraries. docs/reference/Makefile.am | 2 +- src/Makefile.am | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) commit cfedb89b7f2d171ea7d4ad933213860f59d831f3 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Sat Jun 26 21:46:55 2010 +0100 Merge libtotemmodule.la with libtotem_main.la There's no need for the plugin module code to be compiled into a noinst library when it can just as easily be directly compiled into the main Totem library. src/Makefile.am | 10 ++++++++-- src/plugins/Makefile.am | 42 ------------------------------------------ 2 files changed, 8 insertions(+), 44 deletions(-)
The core of Totem is now built as a shared library — libtotem.so. As I understand it, this should make it easier to get things working on Windows, but this bug isn't fixed yet. ;-)
Comment on attachment 150766 [details] [review] 2.28 Cygwin/MinGW patch Needs updating for the makefile churn on master.
Created attachment 202577 [details] [review] Cygwin patch for 3.2 Here's a patch for 3.2.1. The totemPluginGlue.cpp hunk is Cygwin-specific, but the rest is necessary for both Cygwin and MinGW.
Comment on attachment 202577 [details] [review] Cygwin patch for 3.2 Committed to master with a minor change to make it apply cleanly. In future, could you please provide git-formatted patches? They're a lot easier to apply, and mean we don't have to make up the commit message. Is this bug fixed now, or is there still more work to do on Cygwin? commit 485f7897b69c9b1180da338c9cecaf9efb9c7d63 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Fri Dec 2 11:28:26 2011 +0000 Fix build on Cygwin Ensure libraries are built with -no-undefined and fix dynamically loading dbus-glib in the browser plugin on Cygwin. Helps: bgo#572713 browser-plugin/Makefile.am | 1 + browser-plugin/totemPluginGlue.cpp | 2 ++ src/Makefile.am | 3 ++- src/plugins/Makefile.plugins | 3 ++- src/plugins/zeitgeist-dp/Makefile.am | 5 ++++- 5 files changed, 11 insertions(+), 3 deletions(-)
That's all I needed for totem 3.2 on Cygwin.
Great! Closing the bug then. Thanks.