After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 572713 - build the core of totem as a shared library
build the core of totem as a shared library
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
: 574455 617258 (view as bug list)
Depends on:
Blocks: 551290
 
 
Reported: 2009-02-22 05:08 UTC by Shixin Zeng
Modified: 2011-12-02 19:57 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
2.28 Cygwin/MinGW patch (12.75 KB, patch)
2010-01-04 03:13 UTC, Yaakov Selkowitz
needs-work Details | Review
Cygwin patch for 3.2 (2.24 KB, patch)
2011-12-02 09:45 UTC, Yaakov Selkowitz
committed Details | Review

Description Shixin Zeng 2009-02-22 05:08:38 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.
Comment 1 Bastien Nocera 2009-03-08 22:36:38 UTC
*** Bug 574455 has been marked as a duplicate of this bug. ***
Comment 2 Yaakov Selkowitz 2010-01-04 03:12:44 UTC
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.
Comment 3 Yaakov Selkowitz 2010-01-04 03:13:27 UTC
Created attachment 150766 [details] [review]
2.28 Cygwin/MinGW patch
Comment 4 Philip Withnall 2010-06-27 17:00:15 UTC
There are a few commits related to this in my introspection branch:
http://git.gnome.org/browse/totem/log/?h=introspection
Comment 5 Philip Withnall 2010-06-27 17:12:12 UTC
*** Bug 617258 has been marked as a duplicate of this bug. ***
Comment 6 Philip Withnall 2010-06-30 18:28:41 UTC
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(-)
Comment 7 Philip Withnall 2010-06-30 18:29:28 UTC
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 8 Philip Withnall 2010-06-30 18:29:48 UTC
Comment on attachment 150766 [details] [review]
2.28 Cygwin/MinGW patch

Needs updating for the makefile churn on master.
Comment 9 Yaakov Selkowitz 2011-12-02 09:45:19 UTC
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 10 Philip Withnall 2011-12-02 11:30:57 UTC
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(-)
Comment 11 Yaakov Selkowitz 2011-12-02 19:16:56 UTC
That's all I needed for totem 3.2 on Cygwin.
Comment 12 Philip Withnall 2011-12-02 19:57:36 UTC
Great! Closing the bug then. Thanks.