#126 Failure to compile against Firefox 2.0.0.2

closed-fixed
Kevin DeKorte
Plugin (92)
5
2007-02-26
2007-02-25
skutnar
No

I'm running Gentoo. The relevant Gentoo Bugzilla bug is http://bugs.gentoo.org/show_bug.cgi?id=168275.

mplayerplug-in fails to compile because several header files cannot be located. The files that cannot be found reside in /usr/lib/mozilla-firefox/include/xpcom, which is not included in a "-I" parameter to the compiler.

Snippet of errors:

i686-pc-linux-gnu-g++ -c -o npn_gate.o -Wall -march=k8 -msse3 -O2 -pipe -fno-ident -fomit-frame-pointer -DXP_UNIX -DMOZ_X11 -I/usr/lib/mozilla-firefox/include/java -I/usr/lib/mozilla-firefox/include/plugin -I/usr/include/nspr -I/usr/lib/mozilla-firefox/include -Iinclude -fPIC -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DGTK_ENABLED plugingate/npn_gate.cpp
In file included from Source/nsScriptablePeer.h:48,
from Source/plugin.h:54,
from Source/plugin.cpp:37:
Source/nsIScriptableMplayerPlugin.h:10:25: error: nsISupports.h: No such file or directory
In file included from Source/plugin.h:54,
from Source/plugin.cpp:37:
Source/nsScriptablePeer.h:49:26: error: nsIClassInfo.h: No such file or directory
i686-pc-linux-gnu-g++ -c -o plugin-support.o -Wall -march=k8 -msse3 -O2 -pipe -fno-ident -fomit-frame-pointer -DXP_UNIX -DMOZ_X11 -I/usr/lib/mozilla-firefox/include/java -I/usr/lib/mozilla-firefox/include/plugin -I/usr/include/nspr -I/usr/lib/mozilla-firefox/include -Iinclude -fPIC -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DGTK_ENABLED Source/plugin-support.cpp
Source/plugin.cpp:38:31: error: nsIServiceManager.h: No such file or directory
Source/plugin.cpp:39:23: error: nsIMemory.h: No such file or directory
Source/plugin.cpp:40:74: error: nsISupportsUtils.h: No such file or directory
include/pluginbase.h:55: warning: ‘class nsPluginInstanceBase’ has virtual functions but non-virtual destructor

Discussion

  • Kevin DeKorte
    Kevin DeKorte
    2007-02-25

    Logged In: YES
    user_id=685413
    Originator: NO

    Looks like your mozilla development package is messed up. The files that are missing come from there. Your configure output would tell me what it is finding and using. If you have proper pkg-config files setup mplayerplug-in will compile successfully.

     
  • skutnar
    skutnar
    2007-02-25

    Logged In: YES
    user_id=1728577
    Originator: YES

    File Added: config.log

     
  • skutnar
    skutnar
    2007-02-25

    configure.log as requested

     
    Attachments
  • skutnar
    skutnar
    2007-02-25

    Logged In: YES
    user_id=1728577
    Originator: YES

    Note that firefox-plugin is being used. There is no mozilla-plugin. I am also attaching firefox-plugin.pc...
    File Added: firefox-plugin.pc

     
  • skutnar
    skutnar
    2007-02-25

    firefox-plugin.pc

     
    Attachments
  • Kevin DeKorte
    Kevin DeKorte
    2007-02-25

    Logged In: YES
    user_id=685413
    Originator: NO

    Yes, I'm pretty sure the provided MOZILLA flags are wrong...

    your output..

    MOZPLUG_CFLAGS='-I/usr/lib/mozilla-firefox/include/java -I/usr/lib/mozilla-firefox/include/plugin -I/usr/include/nspr -I/usr/lib/mozilla-firefox/include'
    MOZPLUG_LIBS='-Wl,-R/usr/lib/nspr -L/usr/lib/nspr -lplds4 -lplc4 -lnspr4 -lpthread -ldl '

    What my machine gives me..

    MOZPLUG_CFLAGS='-I/usr/include/firefox-2.0.0.1/java -I/usr/include/firefox-2.0.0.1/plugin -I/usr/include/firefox-2.0.0.1 -I/usr/include/firefox-2.0.0.1/xpcom -I/usr/include/firefox-2.0.0.1/string -I/usr/include/nspr4 -I/usr/include/firefox-2.0.0.1'
    MOZPLUG_LIBS='-L/usr/lib/firefox-2.0.0.1 -lxpcom -lplds4 -lplc4 -lnspr4 -lpthread -ldl '

    those values are set by running this command...

    pkg-config --cflags firefox-plugin

    And then actually one more command. So I think there is something wrong with your firefox-plugin.pc file.

     
  • Kevin DeKorte
    Kevin DeKorte
    2007-02-25

    Logged In: YES
    user_id=685413
    Originator: NO

    Ok, I do see one difference. In Fedora.. the firefox-plugin.pc requires firefox-xpcom.pc on your machine it seems to require nspr. So maybe it has something to do with the way Gentoo decided to layout the files. This does not appear to be an mplayerplug-in error. Since this probably cause several plugins to not compile.

     
  • skutnar
    skutnar
    2007-02-26

    Logged In: YES
    user_id=1728577
    Originator: YES

    You are showing flags from Firefox 2.0.0.1. My situation occurs with 2.0.0.2. I will retest against 2.0.0.1 at some point, possibly tomorrow. I think I recall reading that Mozilla changed some things in 2.0.0.2 wrt includes/libs, but I might be misunderstanding or mis-recalling.

     
  • skutnar
    skutnar
    2007-02-26

    Logged In: YES
    user_id=1728577
    Originator: YES

    More info... comment take from the Gentoo bug discussion:

    quote:
    That's because the pkgconfig file in firefox-2.0.0.2 has changed:

    --- mozilla-firefox-2.0.0.1/work/mozilla/build/unix/mozilla-plugin.pc.in
    2005-04-22 18:11:13.000000000 +0100
    +++ mozilla-firefox-2.0.0.2/work/mozilla/build/unix/mozilla-plugin.pc.in
    2007-02-04 11:45:24.000000000 +0100
    @@ -6,5 +6,5 @@
    Name: Mozilla Plug-In API
    Description: Mozilla Plug-In API
    Version: %MOZILLA_VERSION%
    -Requires: %MOZ_APP_NAME%-xpcom = %MOZILLA_VERSION%
    +Requires: %NSPR_NAME% >= %NSPR_VERSION%
    Cflags: -I${includedir}/java -I${includedir}/plugin

    Is due to https://bugzilla.mozilla.org/show_bug.cgi?id=366113 , so i guess you
    should poke mplayerplug-in upstream :)
    endquote

    Please see the Mozilla bug.

     
  • Kevin DeKorte
    Kevin DeKorte
    2007-02-26

    • status: open --> closed-fixed
     
  • Kevin DeKorte
    Kevin DeKorte
    2007-02-26

    Logged In: YES
    user_id=685413
    Originator: NO

    Ok, I see what they are saying, but at the same time this really is a change that should not go in a x.0.0.y release... It is easy enough to fix. But is is something that should have came in at a higher point release.

    In configure.in change this

    Index: configure.in

    RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/configure.in,v
    retrieving revision 1.75
    diff -r1.75 configure.in
    62c62
    < PKG_CHECK_MODULES(MOZPLUG,[firefox-plugin],[AC_SUBST(MOZPLUG_CFLAGS) MOZPLUG_CFLAGS="${MOZPLUG_CFLAGS} -I`$PKG_CONFIG --variable=includedir firefox-plugin`"
    ---
    > PKG_CHECK_MODULES(MOZPLUG,[firefox-plugin firefox-xpcom],[AC_SUBST(MOZPLUG_CFLAGS) MOZPLUG_CFLAGS="${MOZPLUG_CFLAGS} -I`$PKG_CONFIG --variable=includedir firefox-plugin`"

    I also fixed it in the mplayerplug-in CVS tree....