Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 290318

Summary: media-video/vlc broken nsplugin support with xulrunner-1.9.2*
Product: Gentoo Linux Reporter: Jory A. Pratt <anarchy>
Component: Current packagesAssignee: Alexis Ballier <aballier>
Status: RESOLVED FIXED    
Severity: normal CC: asm64, brendlerjg, caster, chemoelectric, chris.c.hogan, chuck.wegrzyn, cornicx, eandry, eric, gef.kornflakes, iivanich, jlec, kdvgent, keenblade, lack, Manfred.Knick, mozilla, nik, niko.bockerman, patrizio.bassi, polidevk.polidevk, randy-andy-, rob, rose, safttuete, spatz, steffen.weber, thomas.jaeger, zeekec
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: check nspr system cflags/libs
/var/tmp/portage/media-video/vlc-1.0.4/temp/build.log
vlc-1.0.4-new-xulrunner.patch

Description Jory A. Pratt gentoo-dev 2009-10-24 00:58:15 UTC
This will need to be fixed soon, I plan to bring xulrunner-1.9.2 into the tree as soon as rc1 is released for arch testing. 

Making all in projects/mozilla
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -DSYS_LINUX -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DXP_UNIX -DOJI -DMOZ_X11 -DSYS_LINUX -fshort-wchar -I/usr/include/xulrunner-1.9.2 -I/usr/include/nspr -O0 -DDATA_PATH=\"/usr/share/vlc\" -O2 -march=native -msse3 -pipe -MT libvlcplugin_la-vlcplugin.lo -MD -MP -MF .deps/libvlcplugin_la-vlcplugin.Tpo -c vlcplugin.cpp  -fPIC -DPIC -o .libs/libvlcplugin_la-vlcplugin.o
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -DSYS_LINUX -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DXP_UNIX -DOJI -DMOZ_X11 -DSYS_LINUX -fshort-wchar -I/usr/include/xulrunner-1.9.2 -I/usr/include/nspr -O0 -DDATA_PATH=\"/usr/share/vlc\" -O2 -march=native -msse3 -pipe -MT libvlcplugin_la-vlcshell.lo -MD -MP -MF .deps/libvlcplugin_la-vlcshell.Tpo -c vlcshell.cpp  -fPIC -DPIC -o .libs/libvlcplugin_la-vlcshell.o
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -DSYS_LINUX -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DXP_UNIX -DOJI -DMOZ_X11 -DSYS_LINUX -fshort-wchar -I/usr/include/xulrunner-1.9.2 -I/usr/include/nspr -O0 -DDATA_PATH=\"/usr/share/vlc\" -O2 -march=native -msse3 -pipe -MT libvlcplugin_la-npolibvlc.lo -MD -MP -MF .deps/libvlcplugin_la-npolibvlc.Tpo -c control/npolibvlc.cpp  -fPIC -DPIC -o .libs/libvlcplugin_la-npolibvlc.o
In file included from control/npolibvlc.cpp:35:
./vlcplugin.h:85: error: 'uint16' has not been declared
./vlcplugin.h:138: error: 'uint16' does not name a type
control/npolibvlc.cpp: In member function 'void LibvlcPlaylistNPObject::parseOptions(const NPString&, int*, char***)':
control/npolibvlc.cpp:952: error: 'const struct _NPString' has no member named 'utf8length'
control/npolibvlc.cpp:964: error: 'const struct _NPString' has no member named 'utf8length'
make[2]: *** [libvlcplugin_la-npolibvlc.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from vlcshell.cpp:44:
vlcplugin.h:85: error: 'uint16' has not been declared
vlcplugin.h:138: error: 'uint16' does not name a type
In file included from vlcshell.cpp:45:
vlcshell.h:30: error: 'jref' does not name a type
vlcshell.h:33: error: 'uint16' has not been declared
vlcshell.h:33: error: 'int16' has not been declared
vlcshell.h:43: error: 'uint16' has not been declared
vlcshell.h:47: error: 'int32' does not name a type
vlcshell.h:48: error: 'int32' does not name a type
vlcshell.cpp:268: error: 'jref' does not name a type
vlcshell.cpp:278: error: 'uint16' has not been declared
vlcshell.cpp:278: error: 'int16' has not been declared
vlcshell.cpp: In function 'NPError NPP_SetWindow(NPP_t*, NPWindow*)':
vlcshell.cpp:534: warning: 'void libvlc_video_set_parent(libvlc_instance_t*, libvlc_drawable_t, libvlc_exception_t*)' is deprecated (declared at ../../include/vlc/deprecated.h:85)
vlcshell.cpp:534: warning: 'void libvlc_video_set_parent(libvlc_instance_t*, libvlc_drawable_t, libvlc_exception_t*)' is deprecated (declared at ../../include/vlc/deprecated.h:85)
vlcshell.cpp:558: warning: 'void libvlc_video_set_parent(libvlc_instance_t*, libvlc_drawable_t, libvlc_exception_t*)' is deprecated (declared at ../../include/vlc/deprecated.h:85)
vlcshell.cpp:558: warning: 'void libvlc_video_set_parent(libvlc_instance_t*, libvlc_drawable_t, libvlc_exception_t*)' is deprecated (declared at ../../include/vlc/deprecated.h:85)
vlcshell.cpp: At global scope:
vlcshell.cpp:582: error: 'uint16' has not been declared
vlcshell.cpp:611: error: 'int32' does not name a type
vlcshell.cpp:617: error: 'int32' does not name a type
In file included from vlcplugin.cpp:35:
vlcplugin.h:85: error: 'uint16' has not been declared
vlcplugin.h:138: error: 'uint16' does not name a type
vlcplugin.cpp:43: error: 'uint16' has not been declared
vlcplugin.cpp: In constructor 'VlcPlugin::VlcPlugin(NPP_t*, int)':
vlcplugin.cpp:44: error: class 'VlcPlugin' does not have any field named 'i_npmode'
vlcplugin.cpp: In member function 'NPError VlcPlugin::init(int, char* const*, char* const*)':
vlcplugin.cpp:230: error: 'struct NPString' has no member named 'utf8characters'
vlcplugin.cpp:231: error: 'struct NPString' has no member named 'utf8length'
vlcplugin.cpp:239: error: 'struct _NPString' has no member named 'utf8length'
vlcplugin.cpp:239: error: 'malloc' was not declared in this scope
vlcplugin.cpp:242: error: 'struct _NPString' has no member named 'utf8characters'
vlcplugin.cpp:242: error: 'struct _NPString' has no member named 'utf8length'
vlcplugin.cpp:243: error: 'struct _NPString' has no member named 'utf8length'
vlcplugin.cpp: In destructor 'virtual VlcPlugin::~VlcPlugin()':
vlcplugin.cpp:267: error: 'free' was not declared in this scope
vlcplugin.cpp: In member function 'char* VlcPlugin::getAbsoluteURL(const char*)':
vlcplugin.cpp:473: error: 'malloc' was not declared in this scope
vlcplugin.cpp:518: error: 'free' was not declared in this scope
vlcplugin.cpp: In member function 'void VlcPlugin::showToolbar()':
vlcplugin.cpp:616: warning: deprecated conversion from string constant to 'char*'
vlcplugin.cpp:623: warning: deprecated conversion from string constant to 'char*'
vlcplugin.cpp:632: warning: deprecated conversion from string constant to 'char*'
vlcplugin.cpp:640: warning: deprecated conversion from string constant to 'char*'
vlcplugin.cpp:648: warning: deprecated conversion from string constant to 'char*'
vlcplugin.cpp:656: warning: deprecated conversion from string constant to 'char*'
vlcplugin.cpp:664: warning: deprecated conversion from string constant to 'char*'
vlcplugin.cpp:671: warning: deprecated conversion from string constant to 'char*'
make[2]: *** [libvlcplugin_la-vlcshell.lo] Error 1
make[2]: *** [libvlcplugin_la-vlcplugin.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


utf8length was renamed to UTF8Length, These particular blocks can be ifdef'd to resolve the conflict and still support 1.9.1.x. If you need any assistance I will assist ya as time permits.
Comment 1 Alexis Ballier gentoo-dev 2009-12-15 10:51:26 UTC
(In reply to comment #0)
> utf8length was renamed to UTF8Length, These particular blocks can be ifdef'd to
> resolve the conflict and still support 1.9.1.x. If you need any assistance I
> will assist ya as time permits.

Yes I do need assistance :p
What is the correct variable to #if for this change?
Comment 2 Jory A. Pratt gentoo-dev 2009-12-24 15:17:20 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > utf8length was renamed to UTF8Length, These particular blocks can be ifdef'd to
> > resolve the conflict and still support 1.9.1.x. If you need any assistance I
> > will assist ya as time permits.
> 
> Yes I do need assistance :p
> What is the correct variable to #if for this change?
> 

We need to check for xulrunner version to maintain backward compatibility first and for most. From there we also need to update configure and makefile to properly utilize system nspr to include prtypes.h
Comment 3 Berend Dekens 2010-01-05 12:17:40 UTC
FYI: This also breaks vlc-1.0.4 with nsplugin support enabled... any eta for a fix? :)
Comment 4 Jory A. Pratt gentoo-dev 2010-01-17 18:47:10 UTC
Created attachment 216756 [details, diff]
check nspr system cflags/libs

This ensures we include proper support for nspr includes, as I said we will no longer patch xulrunners pkg-config files to pass the includes. I will work on the rest of the issues as time permits.
Comment 5 Alexis Ballier gentoo-dev 2010-01-18 09:46:49 UTC
(In reply to comment #4)
> Created an attachment (id=216756) [details]
> check nspr system cflags/libs
> 
> This ensures we include proper support for nspr includes, as I said we will no
> longer patch xulrunners pkg-config files to pass the includes. I will work on
> the rest of the issues as time permits.

This patch wont do anything: as soon as it finds one of the packages in that list, it stops. If it finds libxul, it won't do anything else. Moreover, at least for xulrunner 1.9.1.7, not patching the .pc to -I/usr/include/nspr is completely wrong as some .h files in /usr/include/xulrunner-1.9.1/stable/  #include "prtypes.h".
Comment 6 Jory A. Pratt gentoo-dev 2010-01-18 14:07:32 UTC
Comment on attachment 216756 [details, diff]
check nspr system cflags/libs

Actually I forgot libxul.pc has its requires line for nspr so your right patch is useless, the fact we do not build nspr in xulrunner as upstream expects is why we have to ensure we include proper nspr checks for prtype.h, upstream will not change this just as I wont change this.
Comment 7 hilander 2010-01-22 11:43:47 UTC
Hi,
Now that xulrunner 1.9.2 is out, after I upgraded to FF 3.6, I can no longer compile vlc 1.0.4. I gues that this will affect everyone with FF 3.6 ...
Comment 8 Rafał Mużyło 2010-01-22 13:56:25 UTC
*** Bug 301844 has been marked as a duplicate of this bug. ***
Comment 9 Andy Crook 2010-01-23 09:54:24 UTC
(In reply to comment #7)
> Now that xulrunner 1.9.2 is out, after I upgraded to FF 3.6, I can no longer
> compile vlc 1.0.4. I gues that this will affect everyone with FF 3.6 ...

Yes, it does affect.
The only way now to get vlc compiled is to emerge it with "-nsplugin", so we end up with no plugin.
Comment 10 Tobias Heinlein (RETIRED) gentoo-dev 2010-01-23 17:08:04 UTC
*** Bug 301918 has been marked as a duplicate of this bug. ***
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2010-01-23 19:14:58 UTC
Created attachment 217264 [details]
/var/tmp/portage/media-video/vlc-1.0.4/temp/build.log

build log for vlc-1.0.4 & xulrunner-1.9.2
Comment 12 Jory A. Pratt gentoo-dev 2010-01-24 00:57:47 UTC
Created attachment 217289 [details, diff]
vlc-1.0.4-new-xulrunner.patch

This will need to be applied based off of xulrunner installed version. If you do not want it you can take and ifdef a check to enable/disable code as you feel the need.
Comment 13 Jory A. Pratt gentoo-dev 2010-01-24 00:58:23 UTC
Comment on attachment 217264 [details]
/var/tmp/portage/media-video/vlc-1.0.4/temp/build.log

We are aware of the errors patch is avaliable to fix compilation issues with xulrunner-1.9.2.
Comment 14 Boney McCracker 2010-01-26 08:13:59 UTC
(In reply to comment #12)
> Created an attachment (id=217289) [details]
> vlc-1.0.4-new-xulrunner.patch
> 
> This will need to be applied based off of xulrunner installed version. If you
> do not want it you can take and ifdef a check to enable/disable code as you
> feel the need.

patch works for me thanks

Comment 15 Leonard Khoo 2010-01-27 19:21:44 UTC
Commit to unstable? Thanks.
Comment 16 Alexis Ballier gentoo-dev 2010-01-27 19:55:32 UTC
(In reply to comment #15)
> Commit to unstable? Thanks.

No, for two reasons:
1) the patch is messy and contains unrelated changes (wtf is that license header change?)
2) it'll break with xulrunner 1.9.1

On the other hand, there is a cleaner patch from kwizart:
http://cvs.rpmfusion.org/viewvc/rpms/vlc/devel/vlc-1.0.4-xulrunner-192.patch?revision=1.1&root=free&view=markup

The second point still stands for this patch too. Nothing has been pushed upstream so far and they are aware of the problem. If you wanna ask for more information I suggest you join #videolan @ freenode

I'm much more tempted to mask the nsplugin useflag than pushing an unreviewed patch to apply conditionally.
Comment 17 Boney McCracker 2010-01-28 01:46:46 UTC
(In reply to comment #16)

Both patches work for me.
Comment 18 Eric Siegel 2010-01-28 06:43:40 UTC
(In reply to comment #16) 
> On the other hand, there is a cleaner patch from kwizart:
> http://cvs.rpmfusion.org/viewvc/rpms/vlc/devel/vlc-1.0.4-xulrunner-192.patch?revision=1.1&root=free&view=markup

That patch worked fine for me
Comment 19 Pacho Ramos gentoo-dev 2010-01-29 23:05:27 UTC
*** Bug 302815 has been marked as a duplicate of this bug. ***
Comment 20 Roman Karshiev 2010-02-01 09:15:05 UTC
Same error in 1.0.5

vlc-1.0.4-new-xulrunner.patch not tested yet.
Comment 21 Eric Siegel 2010-02-01 16:32:52 UTC
I updated the bug report on the VLC Trac with the 2nd patch.
https://trac.videolan.org/vlc/ticket/3185
Comment 22 Patrizio Bassi 2010-02-01 17:55:02 UTC
can we add the patch to portage without waiting for upstream?
Comment 23 Boney McCracker 2010-02-11 23:58:05 UTC
(In reply to comment #20)
> Same error in 1.0.5
> 
> vlc-1.0.4-new-xulrunner.patch not tested yet.
> 

Patch works with vlc-1.0.5 as well.
Comment 24 Samuli Suominen (RETIRED) gentoo-dev 2010-02-12 15:55:05 UTC
*** Bug 303615 has been marked as a duplicate of this bug. ***
Comment 25 Samuli Suominen (RETIRED) gentoo-dev 2010-02-13 17:15:40 UTC
*** Bug 304905 has been marked as a duplicate of this bug. ***
Comment 26 Samuli Suominen (RETIRED) gentoo-dev 2010-02-13 17:16:18 UTC
(In reply to comment #25)
> *** Bug 304905 has been marked as a duplicate of this bug. ***
> 

Above bug mentioned,

http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/vlc/current/SOURCES/vlc-1.0.4-new-xulrunner.patch?view=co
Comment 27 Leif Walsh 2010-02-15 04:18:32 UTC
(In reply to comment #16)
> On the other hand, there is a cleaner patch from kwizart:
> http://cvs.rpmfusion.org/viewvc/rpms/vlc/devel/vlc-1.0.4-xulrunner-192.patch?revision=1.1&root=free&view=markup

Works for me, vlc-1.0.5
Comment 28 saft 2010-02-21 10:43:40 UTC
Hi, I have vlc-1.0.5 and xulrunner-1.9.1.8.
When I try to update from xulrunner-1.9.1 to 1.9.2-r2 it tells me that 1.9.2 is blocking 1.9.2-r2 

net-libs/xulrunner:1.9

  ('ebuild', '/', 'net-libs/xulrunner-1.9.2-r2', 'merge') conflicts with
    <net-libs/xulrunner-1.9.2 required by ('installed', '/', 'media-video/vlc-1.0.5', 'nomerge')
Comment 29 Boney McCracker 2010-02-21 12:51:25 UTC
(In reply to comment #28)

As you can see from looking at the vlc-1.0.5 ebuild, vlc with USE="nsplugin" depends on:
>=net-libs/xulrunner-1.8
<net-libs/xulrunner-1.9.2

As you can see from reading the entries here above yours, that is because vlc's nsplugin fails to build against the latest versions of xulrunner (1.9.2 and 1.9.2-r1).

There is a patch (attached above), which, when applied to vlc-1.04 or vlc-1.0.5, fixes vlc so it can build an nsplugin against the latest versions of of xulrunner.

You have the following options:

1. You can apply this patch yourself in a local overlay (there used to be a howto for this in the gentoo wiki, but the gentoo wiki got deleted -- oops, so you'll have to search the net or ask for help on how to do that in the forums, since this is not a help forum).

2. Mask xulrunner >=xulrunner 1.9.2 (and any versions of other applications which depend upon >=xulrunner 1.9.2, such as firefox-3.6-*), continue to use your old version of xulrunner and your old browser, and wait patiently until one of the following happens:

a) the gentoo maintainer of gentoo's vlc ebuild applies the patch
b) the vlc developers release a fixed version of vlc

I would suggest you do #2 because bugs with firefox-3.6 are still being smoothed out, it's easier than creating a custom ebuild, and I would expect (a) or (b) to happen fairly soon.
Comment 30 Alexis Ballier gentoo-dev 2010-02-24 13:14:06 UTC
since there seems to be no update upstream on this side i've added kwizart's patch, applied conditionaly for 1.0.x series; this sucks but that's life