Khvalovsky / gecko-mediaplayer

Automatically exported from code.google.com/p/gecko-mediaplayer
GNU General Public License v2.0
0 stars 0 forks source link

Build fails with Firefox 8.0 #158

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm trying to build GM 1.0.5_beta1. I have Firefox 8.0 installed (it's on 
Gentoo Linux, so all development headers are also installed.) It fails during 
configuration with:

checking for GECKO... no
configure: libxul >= 2 not found, trying another
checking for GECKO... no
configure: libxul >= 1.9.2 not found, trying another
checking for GECKO... no
configure: WARNING: libxul < 1.9.2 not found, trying another
checking for GECKO... no
configure: WARNING: libxul-unstable not found, trying another
checking for GECKO... no
configure: WARNING: mozilla-plugin not found, trying another
checking for GECKO... no
configure: WARNING: firefox-plugin not found, trying another
checking for GECKO... no
configure: WARNING: seamokey-plugin not found, trying another
checking for GECKO... no
configure: WARNING: xulrunner-plugin not found, trying another
checking for GECKO... no
configure: WARNING: iceape-plugin not found, trying another
checking for NSPR... yes
checking for DBUS... yes
checking for CURL... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gecko-mediaplayer.spec
config.status: creating src/Makefile
config.status: creating po/Makefile.in
config.status: WARNING:  'po/Makefile.in.in' seems to ignore the --datarootdir 
setting
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default-1 commands
>>> Source configured.
>>> Compiling source in 
/var/tmp/portage/www-plugins/gecko-mediaplayer-1.0.5_beta1/work/gecko-mediaplaye
r-1.0.5b1 ...
make -j4 
make  all-recursive
make[1]: Entering directory 
`/var/tmp/portage/www-plugins/gecko-mediaplayer-1.0.5_beta1/work/gecko-mediaplay
er-1.0.5b1'
Making all in src
make[2]: Entering directory 
`/var/tmp/portage/www-plugins/gecko-mediaplayer-1.0.5_beta1/work/gecko-mediaplay
er-1.0.5b1/src'
make[3]: Entering directory 
`/var/tmp/portage/www-plugins/gecko-mediaplayer-1.0.5_beta1/work/gecko-mediaplay
er-1.0.5b1/src'
  CXX    plugin_types_std.o
  CXX    plugin.o
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -fPIC 
-DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -DPACKAGE_SRC_DIR=\""."\" 
-DPACKAGE_DATA_DIR=\""/usr/share"\"  -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -I/usr/include/gmtk    -pthread 
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -DMOZILLA_STRICT_API -DXP_UNIX -DHAVE_CURL      
-pipe -mtune=core2 -march=native -O2 -c -o plugin_types_std.o 
plugin_types_std.cpp
  CXX    plugin_list.o
  CXX    memmem_compat.o
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -fPIC 
-DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -DPACKAGE_SRC_DIR=\""."\" 
-DPACKAGE_DATA_DIR=\""/usr/share"\"  -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -I/usr/include/gmtk    -pthread 
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -DMOZILLA_STRICT_API -DXP_UNIX -DHAVE_CURL      
-pipe -mtune=core2 -march=native -O2 -c -o plugin.o plugin.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -fPIC 
-DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -DPACKAGE_SRC_DIR=\""."\" 
-DPACKAGE_DATA_DIR=\""/usr/share"\"  -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -I/usr/include/gmtk    -pthread 
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -DMOZILLA_STRICT_API -DXP_UNIX -DHAVE_CURL      
-pipe -mtune=core2 -march=native -O2 -c -o memmem_compat.o memmem_compat.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -fPIC 
-DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -DPACKAGE_SRC_DIR=\""."\" 
-DPACKAGE_DATA_DIR=\""/usr/share"\"  -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -I/usr/include/gmtk    -pthread 
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -DMOZILLA_STRICT_API -DXP_UNIX -DHAVE_CURL      
-pipe -mtune=core2 -march=native -O2 -c -o plugin_list.o plugin_list.cpp
In file included from plugin.cpp:39:0:
plugin.h:40:19: fatal error: npapi.h: No such file or directory
compilation terminated.
make[3]: *** [plugin.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from plugin_types.h:41:0,
                 from plugin_types_std.cpp:38:
plugin.h:40:19: fatal error: npapi.h: No such file or directory
compilation terminated.

Original issue reported on code.google.com by rea...@gmail.com on 19 Nov 2011 at 10:14

GoogleCodeExporter commented 8 years ago
I'm guessing you need to install libxul-dev or xulrunner-dev as that is the 
normal cause of that error.

Original comment by kdeko...@gmail.com on 19 Nov 2011 at 4:12

GoogleCodeExporter commented 8 years ago
On Gentoo, you don't need -dev files.  All headers and libs are always 
installed.  Furthermore, xulrunner is provided by the Firefox package.  Here 
are all the files that belong to the Firefox 8.0 installation:

  http://pastebin.com/raw.php?i=43GTy4x1

All header files and libs seem to exist.

Original comment by rea...@gmail.com on 19 Nov 2011 at 4:24

GoogleCodeExporter commented 8 years ago
If pkg-config --cflags libxul

Doesn't give you something like this

-I/usr/include/xulrunner-sdk-2 -I/usr/include/nspr4  

The either your pkg-config path is incorrect or you need to point at files with

./configure --with-xulrunner-sdk=/usr/include/firefox  

That path may vary depending one how your files are arranged.

Original comment by kdeko...@gmail.com on 19 Nov 2011 at 4:29

GoogleCodeExporter commented 8 years ago
I think this assumes that you installed xulrunner seperately.  Here, Firefox is 
compiled with xulrunner built-in (as recommended by Mozilla.)

I'm going to try the --with-xulrunner-sdk option.

Original comment by rea...@gmail.com on 19 Nov 2011 at 4:33

GoogleCodeExporter commented 8 years ago
I tried with "-with-xulrunner-sdk=/usr/include/firefox" but it still uses wrong 
include paths.  The "npapi.h" header is in "/usr/include/firefox" but GM's 
build system uses "/usr/include/firefox/include" which is wrong.

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -fPIC 
-DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -DPACKAGE_SRC_DIR=\""."\" 
-DPACKAGE_DATA_DIR=\""/usr/share"\" -I/usr/include/firefox/include 
-I/usr/include/firefox/include/plugin -I/usr/include/firefox/include/nspr 
-I/usr/include/firefox/include/xpcom -I/usr/include/firefox/include/string 
-I/usr/include/firefox/include/java -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -I/usr/include/gmtk    -pthread 
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -DMOZILLA_STRICT_API -DXP_UNIX -DHAVE_CURL      
-pipe -mtune=core2 -march=native -O2 -c -o plugin_list.o plugin_list.cpp
In file included from plugin.cpp:39:0:
plugin.h:40:19: fatal error: npapi.h: No such file or directory

Original comment by rea...@gmail.com on 20 Nov 2011 at 3:48

GoogleCodeExporter commented 8 years ago
As a temporary workaround, I did:

  cd /usr/include/firefox
  ln -s . include

And that worked in letting GM find npapi.h and the rest of the headers. 
However, the build aborts with:

In file included from np_entry.cpp:44:0:
npupp.h:703:49: error: declaration of C function 'char* 
NP_GetMIMEDescription()' conflicts with
/usr/include/firefox/include/npfunctions.h:303:24: error: previous declaration 
'const char* NP_GetMIMEDescription()' here
np_entry.cpp:83:30: error: new declaration 'char* NPP_GetMIMEDescription()'
/usr/include/firefox/include/npapi.h:792:13: error: ambiguates old declaration 
'const char* NPP_GetMIMEDescription()'
np_entry.cpp: In function 'char* NP_GetMIMEDescription()':
np_entry.cpp:87:35: error: invalid conversion from 'const char*' to 'char*'

Original comment by rea...@gmail.com on 20 Nov 2011 at 3:51

GoogleCodeExporter commented 8 years ago
Please undo the ln for the include and try adding 

--enable-new-libxul to your configure command. Or save yourself sometime and 
install libxul. It will not matter if you build with libxul or with the 
xulrunner in firefox, they should be compatible.

Original comment by kdeko...@gmail.com on 21 Nov 2011 at 2:17

GoogleCodeExporter commented 8 years ago
I got it to work. I patched the sources to change the "char*" return types to 
"const char*" since it seems the xulrunner API changed that for the new 
version.  I'm attaching the patch.

Installing libxul is not the optimal solution, since it's a big package to 
compile and takes time. Also, Firefox 8 comes with the newest version of it 
included anyway, so I don't really see why I should have another, older version 
installed. And patch to fix it was trivial, so I think it's best if the support 
for the new xul API changes would be added to GM.

Original comment by rea...@gmail.com on 22 Nov 2011 at 2:09

Attachments:

GoogleCodeExporter commented 8 years ago
Patch applied, but probably compiling only stopped due to a strict compiler 
flag. Marking as fixed

Original comment by kdeko...@gmail.com on 22 Nov 2011 at 2:24

GoogleCodeExporter commented 8 years ago
Thanks. Though I didn't test if the patch breaks compilation against older 
versions of Firefox or Xulrunner.

About the compiler: I'm on GCC 4.5.3, but I'm using default compiler flags. 
AFAIK, this behavior was made the default (that is, without specifying some 
strict flag) since GCC 4.4.

Original comment by rea...@gmail.com on 22 Nov 2011 at 9:08

GoogleCodeExporter commented 8 years ago
Uhh I think I get to opposite error...

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -fPIC 
-DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -DPACKAGE_SRC_DIR=\""."\" 
-DPACKAGE_DATA_DIR=\""/usr/share"\" -fshort-wchar -I/usr/include/xulrunner-2.0 
-I/usr/include/nspr   -DMOZ_NO_MOZALLOC -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -I/usr/include/gmtk    -pthread 
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -DMOZILLA_STRICT_API -DXP_UNIX -DHAVE_CURL      
-march=native -O2 -pipe -fprefetch-loop-arrays -ftree-vectorize -c -o 
np_entry.o np_entry.cpp
In file included from np_entry.cpp:44:0:
npupp.h:711:55: error: declaration of C function ‘const char* 
NP_GetMIMEDescription()’ conflicts with
/usr/include/xulrunner-2.0/npfunctions.h:303:20: error: previous declaration 
‘char* NP_GetMIMEDescription()’ here
np_entry.cpp:88:36: error: new declaration ‘const char* 
NPP_GetMIMEDescription()’
/usr/include/xulrunner-2.0/npapi.h:788:7: error: ambiguates old declaration 
‘char* NPP_GetMIMEDescription()’
make[3]: *** [np_entry.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory 
`/var/tmp/portage/www-plugins/gecko-mediaplayer-1.0.5_beta1_p20111203/work/gecko
-mediaplayer-1.0.5_beta1_p20111203/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/var/tmp/portage/www-plugins/gecko-mediaplayer-1.0.5_beta1_p20111203/work/gecko
-mediaplayer-1.0.5_beta1_p20111203/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/var/tmp/portage/www-plugins/gecko-mediaplayer-1.0.5_beta1_p20111203/work/gecko
-mediaplayer-1.0.5_beta1_p20111203'
make: *** [all] Error 2

#  pkg-config --cflags libxul
-fshort-wchar -I/usr/include/xulrunner-2.0 -I/usr/include/nspr 

Original comment by weedy2...@gmail.com on 6 Dec 2011 at 11:25

GoogleCodeExporter commented 8 years ago
The latest SVN has patches that should correct this.

Original comment by kdeko...@gmail.com on 6 Dec 2011 at 11:34