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 458324 - Browser plugin does not build with xulrunner/firefox 1.9 alpha 6
Browser plugin does not build with xulrunner/firefox 1.9 alpha 6
Status: RESOLVED OBSOLETE
Product: totem
Classification: Core
Component: Browser plugin (obsolete)
2.19.x
Other Linux
: Normal normal
: ---
Assigned To: totem-browser-maint
totem-browser-maint
Depends on:
Blocks:
 
 
Reported: 2007-07-19 15:29 UTC by Marco Pesenti Gritti
Modified: 2008-05-30 17:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add -fshort-wchar and -lxpcom (3.78 KB, patch)
2007-07-19 15:34 UTC, Marco Pesenti Gritti
needs-work Details | Review
Hacks to get it working with latest xulrunner (4.26 KB, patch)
2007-10-31 18:59 UTC, Marco Pesenti Gritti
needs-work Details | Review
totem-xul.patch (10.07 KB, patch)
2008-01-11 11:26 UTC, Bastien Nocera
none Details | Review
totem-xul-2.patch (10.04 KB, patch)
2008-01-11 15:40 UTC, Bastien Nocera
none Details | Review
totem-xul-3.patch (12.33 KB, patch)
2008-01-14 14:07 UTC, Bastien Nocera
none Details | Review
totem-xul-4.patch (14.63 KB, patch)
2008-01-18 17:14 UTC, Bastien Nocera
none Details | Review
Ubuntu Hardy Patch (6.02 KB, patch)
2008-03-21 11:14 UTC, Michael Monreal
none Details | Review
totem-xul-5.patch (13.63 KB, patch)
2008-05-09 15:13 UTC, Bastien Nocera
none Details | Review

Description Marco Pesenti Gritti 2007-07-19 15:29:07 UTC
The browser plugin does not build with xulrunner/firefox 1.9 alpha 6. I'm going to attach a patch.
Comment 1 Marco Pesenti Gritti 2007-07-19 15:34:58 UTC
Created attachment 91991 [details] [review]
Add -fshort-wchar and -lxpcom

The -fshort-wchar is taken from epiphany gecko.m4, with alpha 6 it's necessary for nsStringAPI.h to compile.

Also when linking to libxpcomglue_s you also need to link to xpcom. See:
http://developer.mozilla.org/en/docs/XPCOM_Glue

This adds more mess to the messy mozilla configuration... maybe totem should move to use gecko.m4.
Comment 2 Christian Persch 2007-07-19 16:04:08 UTC
We don't link to libxpcom on purpose (bug 354490)... shouldn't it be enough that the browser binary links xpcom? That works here...

The -fshort-wchar part of the patch is fine.
Comment 3 Marco Pesenti Gritti 2007-07-19 16:34:02 UTC
Christian, I don't know exactly why... but that's not enough here, I get missing symbols.
Comment 4 Marco Pesenti Gritti 2007-07-19 19:22:42 UTC
To clarify.  Without -lxpcom the plugin seem to be loaded fine (by looking at about:plugins). Though it dies for missing symbols in lib-totem-base-plugin.so when you actually try to open an ogg.
Comment 5 Bastien Nocera 2007-07-20 00:20:19 UTC
Did you build Totem against that specific version of Firefox, or was it built against a different version?
Comment 6 Marco Pesenti Gritti 2007-07-20 00:45:13 UTC
Same version of xulrunner. (1.9 pre6)
Comment 7 Christian Persch 2007-07-25 20:59:38 UTC
It works here in epiphany with only the -fshort-wchar fix. I compile xulrunner with --disable-libxul, could that make a difference ? And epiphany links explicitly to libxpcom itself too...

I guess I'm ok with linking the plugin to libxpcom in the xulrunner case; can you adapt the configure to only do that for gecko==xulrunner ?
Comment 8 Philip Withnall 2007-07-26 04:23:17 UTC
Marking patch as needs-work as per comment #7.
Comment 9 Bastien Nocera 2007-08-15 13:03:43 UTC
Marco, could you rework the patch before 2.20?
Comment 10 Marco Pesenti Gritti 2007-08-22 00:51:14 UTC
There has been changes on xulrunner head which obsolete my patch. I'll attach a new one at some point this week.
Comment 11 Marco Pesenti Gritti 2007-10-31 18:59:47 UTC
Created attachment 98260 [details] [review]
Hacks to get it working with latest xulrunner

I'm attaching this just for the record. I don't have the time do integrate it properly right now (and my head hurts at the idea of integrating yet another very different configuration inside the current code). If someone beats me at fixing this properly than great, otherwise I'll get at it, at some point :/
Comment 12 Christian Persch 2007-10-31 19:39:04 UTC
IMO, we should just drop support for non-xulrunner geckos as soon as 1.9 is released.
Comment 13 Philip Withnall 2007-11-25 14:19:36 UTC
Marking patch #2 as needs-work as per comment #11.
Comment 14 Bastien Nocera 2007-12-06 17:48:16 UTC
xulrunner-devel-1.9-0.beta1.1.fc9 has an xpcom pkgconfig file, and I've already done the necessary changes to trunk to build with xulrunner. Totem in F9/rawhide already builds against it (although the package has other bugs there).

Leaving on NEEDINFO until Marco has a chance to check it.
Comment 15 Christian Persch 2007-12-06 18:46:06 UTC
The -xpcom.pc file is a fedora addition, not available from upstream.
Comment 16 Bastien Nocera 2007-12-10 17:15:02 UTC
Chris, are the additional pkgconfig files in Fedora going upstream, or will they stay Fedora only?
Comment 17 Bastien Nocera 2008-01-11 11:26:23 UTC
Created attachment 102583 [details] [review]
totem-xul.patch

Patch for exclusive xulrunner usage. I'll commit that patch when xulrunner is considered stable. In the meanwhile, I'll be using that patch in packages. The configure.in is bad enough looking.
Comment 18 Christopher Aillon 2008-01-11 13:29:26 UTC
Comment on attachment 102583 [details] [review]
totem-xul.patch

>Index: configure.in


>@@ -627,8 +589,7 @@
> # separate vars
> if test "$enable_browser_plugins" = "yes" ; then
> 	PKG_CHECK_MODULES([MOZILLA_NOT_LINKED],
>-		[$MOZILLA-xpcom >= $MOZILLA_VERSION_MIN \
>-		 $MOZILLA-plugin],,
>+		[libxul >= 1.8],,

There really isn't a libxul 1.8 from upstream.  You want 1.9.


>@@ -675,24 +636,28 @@
> 
> # Sets some variables, and check for xpidl
> if test "$enable_browser_plugins" = "yes" ; then
>-	MOZILLA_PREFIX="`$PKG_CONFIG $MOZILLA-xpcom --variable=prefix`"
>-	MOZILLA_LIBDIR="`$PKG_CONFIG $MOZILLA-xpcom --variable=libdir`"
>-	MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $MOZILLA-xpcom`"
>-	MOZILLA_XPCOM_CFLAGS="-I`$PKG_CONFIG --variable=includedir $MOZILLA-xpcom`"
>+	LIBXUL_SDK_DIR=`$PKG_CONFIG --variable=sdkdir libxul`
>+	MOZILLA_PREFIX="`$PKG_CONFIG libxul --variable=prefix`"
>+	MOZILLA_LIBDIR="`$PKG_CONFIG libxul --variable=libdir`"
>+	MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir libxul`"
>+	MOZILLA_XPCOM_CFLAGS="`$PKG_CONFIG --cflags --define-variable=includetype=unstable libxul`"


This can simply use the new libxul-unstable.pc file which should have just got added to trunk a few days ago.  https://bugzilla.mozilla.org/show_bug.cgi?id=408062
Comment 19 Bastien Nocera 2008-01-11 15:40:18 UTC
Created attachment 102596 [details] [review]
totem-xul-2.patch

Updated patch, following Christian's comments
Comment 20 Bastien Nocera 2008-01-11 15:57:47 UTC
(In reply to comment #19)
<snip>
> Updated patch, following Christian's comments

Make that Christopher's comments :)

Comment 21 Bastien Nocera 2008-01-14 14:07:22 UTC
Created attachment 102815 [details] [review]
totem-xul-3.patch

Updated again, few fixes.
Comment 22 Christopher Aillon 2008-01-14 14:18:57 UTC
Since this patch is designed to only work with gecko 1.9 and up, one other thing you may wish to do is replace usage of NS_REINTERPRET_CAST and NS_STATIC_CAST throughout the totem codebase, with the respective C++ casts.  That macro is dead now.  No big deal though ;-)
Comment 23 Bastien Nocera 2008-01-18 17:14:15 UTC
Created attachment 103151 [details] [review]
totem-xul-4.patch

And link against libxpcom otherwise it fails building on x86-64. See:
http://koji.fedoraproject.org/koji/getfile?taskID=347419&name=build.log
Comment 24 Wade Menard 2008-02-05 21:13:52 UTC
I'm confused about the touch to totemGMPPlugin.cpp in totem-xul-4.patch as it causes totem to want to play adobe flash objects on many sites.

I also had to make a change to MOZILLA_PLUGINDIR= for it to install to ${libdir}/xulrunner-addons/plugins instead of mozilla/plugins. I'm not sure what the folder is supposed to be upstream or if there is some symlinking going on.

Your patch is much appreciated!
Comment 25 Christian Persch 2008-02-05 21:18:32 UTC
The change to totemGMPPlugin.cpp is not related to this patch, and bogus.
Comment 26 Bastien Nocera 2008-02-05 22:01:59 UTC
(In reply to comment #24)
> I'm confused about the touch to totemGMPPlugin.cpp in totem-xul-4.patch as it
> causes totem to want to play adobe flash objects on many sites.

I fail to remember for which website I wrote that patch, but it has nothing to do here.

> I also had to make a change to MOZILLA_PLUGINDIR= for it to install to
> ${libdir}/xulrunner-addons/plugins instead of mozilla/plugins. I'm not sure
> what the folder is supposed to be upstream or if there is some symlinking going
> on.

%{libdir/mozilla/plugins seems to work here, I'm not sure what the upstream is either.

Comment 27 Michael Monreal 2008-03-21 11:12:26 UTC
I just upgraded to Ubuntu Hardy and had to apply a patch from their totem package. Hardy does not seem to have any firefox3 dev packages (only dummies) so it has to link against xulrunner-dev, which does not contain any xpcom pc file.
Comment 28 Michael Monreal 2008-03-21 11:14:09 UTC
Created attachment 107734 [details] [review]
Ubuntu Hardy Patch

For reference, here is the patch from Ubuntu Hardy.
Comment 29 Bastien Nocera 2008-03-21 11:20:53 UTC
The patch in Ubuntu is far from sufficient.
Comment 30 Michael Monreal 2008-03-21 11:25:19 UTC
Well, it build just fine but I did not test the plugins after that. Just browsed the apple trailer page, the totem player controls show up but the movies never play...
Comment 31 Christian Fredrik Kalager Schaller 2008-05-09 15:02:48 UTC
Something weird is going on. I tried applying this patch to SVN head, but it fails to merge saying it looks like the patch is already merged. Yet when you try building it complains about not finding gecko. Build the version shipped with FC9 works fine, but there I get in trouble due to totem-pl-parser API change.
Comment 32 Bastien Nocera 2008-05-09 15:13:45 UTC
Created attachment 110647 [details] [review]
totem-xul-5.patch

One that applies cleanly to trunk
Comment 33 Bastien Nocera 2008-05-30 17:45:30 UTC
Totem doesn't use Mozilla specific APIs anymore.