build failure with new Xulrunner 8

Deepak Bhole dbhole at redhat.com
Tue Nov 8 14:33:56 PST 2011


* Andreas Radke <andyrtr at archlinux.org> [2011-11-08 16:15]:
> I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   \
>   -DXP_UNIX -I/usr/include/xulrunner-8.0   \
>   -fPIC -o /build/src/icedtea-web-1.1.4/plugin/icedteanp/IcedTeaNPPlugin.o -c /build/src/icedtea-web-1.1.4/plugin/icedteanp/IcedTeaNPPlugin.cc
> /build/src/icedtea-web-1.1.4/plugin/icedteanp/IcedTeaNPPlugin.cc: In function 'NPError plugin_start_appletviewer(ITNPPluginData*)':
> /build/src/icedtea-web-1.1.4/plugin/icedteanp/IcedTeaNPPlugin.cc:1597:118: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> /build/src/icedtea-web-1.1.4/plugin/icedteanp/IcedTeaNPPlugin.cc: In function 'char* NP_GetMIMEDescription()':
> /build/src/icedtea-web-1.1.4/plugin/icedteanp/IcedTeaNPPlugin.cc:2266:24: error: new declaration 'char* NP_GetMIMEDescription()'
> /usr/include/xulrunner-8.0/npfunctions.h:303:24: error: ambiguates old declaration 'const char* NP_GetMIMEDescription()'
> make: ***
> [/build/src/icedtea-web-1.1.4/plugin/icedteanp/IcedTeaNPPlugin.o] Error 1
> 
> 
> checking for MOZILLA... no
> checking for MOZILLA... yes
> checking for xulrunner version... 8000000
> 
> Do you have a fix for this?
> 

Fedora upgraded to xulrunner 8 today and I just spotted it this
afternoon too. 

I need some time to think about a proper fix. The npapi-sdk guys have
are refusing to back the change out[1] and have ignored a request to
allow version detection so that code can be conditionally compiled[2].

They advocate copying the npapi headers into the source tree which is
unfeasible.

I am working on some autotools magic to allow us to continue using
system npapi.

I am attaching a patch that you can use in the mean time.

Note: It seems that with Arch linux, version detection will work (as it
is detecting 8000000). However Fedora has the last proper xulrunner
version (2) so it will not work there. There may be other distros doing
the same too.

Cheers,
Deepak

1: http://code.google.com/p/npapi-sdk/issues/detail?id=9
2: http://code.google.com/p/npapi-sdk/issues/detail?id=10
-------------- next part --------------
diff -up ./plugin/icedteanp/IcedTeaNPPlugin.cc.sav ./plugin/icedteanp/IcedTeaNPPlugin.cc
--- ./plugin/icedteanp/IcedTeaNPPlugin.cc.sav	2011-11-08 17:27:29.046520865 -0500
+++ ./plugin/icedteanp/IcedTeaNPPlugin.cc	2011-11-08 17:27:40.469611421 -0500
@@ -2262,7 +2262,7 @@ NP_Initialize (NPNetscapeFuncs* browserT
 
 // Returns a string describing the MIME type that this plugin
 // handles.
-char*
+const char*
 NP_GetMIMEDescription ()
 {
   PLUGIN_DEBUG ("NP_GetMIMEDescription\n");


More information about the distro-pkg-dev mailing list