ELFCLASS64 on Suse 10.1

Help
2006-11-19
2013-05-13
  • Wolfgang Knauf
    Wolfgang Knauf
    2006-11-19

    Hi everybody,

    I cannot make MPlayerPlugin run on Suse Linux 10.1 (AMD64).

    If I start firefox by console and call about:plugins, I see those error messages in the console:

    LoadPlugin: failed to initialize shared library /usr/local/firefox/plugins/mplayerplug-in-dvx.so [/usr/local/firefox/plugins/mplayerplug-in-dvx.so: wrong ELF class: ELFCLASS64]
    LoadPlugin: failed to initialize shared library /usr/local/firefox/plugins/mplayerplug-in-qt.so [/usr/local/firefox/plugins/mplayerplug-in-qt.so: wrong ELF class: ELFCLASS64]
    LoadPlugin: failed to initialize shared library /usr/local/firefox/plugins/mplayerplug-in-rm.so [/usr/local/firefox/plugins/mplayerplug-in-rm.so: wrong ELF class: ELFCLASS64]
    LoadPlugin: failed to initialize shared library /usr/local/firefox/plugins/mplayerplug-in-wmp.so [/usr/local/firefox/plugins/mplayerplug-in-wmp.so: wrong ELF class: ELFCLASS64]
    LoadPlugin: failed to initialize shared library /usr/local/firefox/plugins/mplayerplug-in.so [/usr/local/firefox/plugins/mplayerplug-in.so: wrong ELF class: ELFCLASS64]

    It's firefox 2 (tar.gz-download from the mozilla page), Mplayer 1.0rc1 (self-built).

    I built the plugin with the standard options and Gecko SDK 1.8 Beta1 (the only one I found at the mozilla site):
    ./configure --with-gecko-sdk=...

    About the ELFCLASS64 I found this in the internet: http://forums.gentoo.org/viewtopic-t-454559.html
    But ./configure --enable-x86_64 --with-gecko-sdk=... does not compile. Make fails with this message:
    g++ -shared -o mplayerplug-in.so plugin.o nsScriptablePeer.o npp_gate.o np_entry.o npn_gate.o plugin-support.o plugin-setup.o plugin-list.o plugin-ui.o plugin-threads.o strlcpy.o strlcat.o  -Wall -g -O2  -I/usr/X11R6/include  -g -O2 -m32 -DXP_UNIX -DMOZ_X11 -I/home/knuffi/Desktop/gecko-sdk -I/home/knuffi/Desktop/gecko-sdk/include -Iinclude -fPIC -DXPCOM_GLUE -DMOZILLA_STRICT_API -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib64/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib64/glib-2.0/include   -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib64/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib64/glib-2.0/include   -pthread -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib64/glib-2.0/include   -DGTK_ENABLED  -melf_i386  -L/usr/X11/lib64/  -lX11   -lSM -lICE -lXext -lX11 -lXpm -lXt -L/usr/X11R6/lib64 -L/opt/gnome/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lfreetype -lfontconfig -lXrender -lX11 -lXext -lpng12 -lz -lglitz -lm   -L/usr/X11R6/lib64 -L/opt/gnome/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lfreetype -lfontconfig -lXrender -lX11 -lXext -lpng12 -lz -lglitz -lm   -pthread -L/opt/gnome/lib64 -lgthread-2.0 -lglib-2.0
    /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11/lib64//libX11.so when searching for -lX11
    /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11/lib64//libX11.a when searching for -lX11
    /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11R6/lib64/libX11.so when searching for -lX11
    /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11R6/lib64/libX11.a when searching for -lX11
    /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11R6/lib64/libX11.so when searching for -lX11
    /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11R6/lib64/libX11.a when searching for -lX11
    /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: cannot find -lX11
    collect2: ld returned 1 exit status
    make: *** [mplayerplug-in] Fehler 1

    Does anybody have an idea what to do ?

    Best regards

    Wolfgang

     
    • Kevin DeKorte
      Kevin DeKorte
      2006-11-19

      yeah, looks the enable-x86_64 option doesn't work properly, looks you are compiling against 64bit libs with 32bit code.. I don't have any 64bit hardware to test on so any tips you can provide would be helpful. Also I believe the firefox you have is 32bot code, so you should be able to grab mplayerplug-in from 32bit SUSE 10.1 and that should work as well. Also, you need to have 32bit mplayer as well.

       
    • Wolfgang Knauf
      Wolfgang Knauf
      2006-11-20

      Hi Kevin,

      thanks for the reply. Do you think building firefox myself could help ?

      I found an old 32 bit plugin 2.85 which I built a year ago on Suse 9.0, and this one works fine.

      Anyway, if I can help to solve this problem, just tell me what to do.

      Wolfgang

       
    • Wolfgang Knauf
      Wolfgang Knauf
      2006-11-21

      OK, after building a firefox I could use the MPlayerPlugin 3.31 build (created without any enable-x86_64 options, this seemed to have created a 64 bit build also).

      Problem is that now the flashplayer fails:
      LoadPlugin: failed to initialize shared library .../mozilla/dist/bin/plugins/libflashplayer.so [.../mozilla/dist/bin/plugins/libflashplayer.so: wrong ELF class: ELFCLASS32]

      So it seems I will have to make a 32 bit build of MPlayerPlugin. How do I do this ?

      Thanks

      Wolfgang

       
      • Kevin DeKorte
        Kevin DeKorte
        2006-11-21

        I would suggest getting the version for i586 from here http://packman.links2linux.org/package/mplayerplug-in

        If they don't have the latest version of mplayerplug-in then encourage them to upgrade.

         
    • Wolfgang Knauf
      Wolfgang Knauf
      2006-11-23

      Hooray, I got it !

      I think "configure --enable-x86_64" creates an invalid makefile.

      This is what comes out (omly the lines for CFLAGS/LDFLAGS) and which fails with the above linker error:
      CFLAGS= -Wall -g -O2  -I/usr/X11R6/include  -g -O2 -m32 -DXP_UNIX -DMOZ_X11 -I/home/.../Desktop/gecko-sdk -I/home/.../Desktop/gecko-sdk/include -Iinclude -fPIC -DXPCOM_GLUE -DMOZILLA_STRICT_API -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib64/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib64/glib-2.0/include   -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib64/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib64/glib-2.0/include   -pthread -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib64/glib-2.0/include   -DGTK_ENABLED

      LDFLAGS=   -melf_i386  -L/usr/X11R6/lib64  -lX11   -lSM -lICE -lXext -lX11 -lXpm -lXt -L/usr/X11R6/lib64 -L/opt/gnome/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lfreetype -lfontconfig -lXrender -lX11 -lXext -lpng12 -lz -lglitz -lm   -L/usr/X11R6/lib64 -L/opt/gnome/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lfreetype -lfontconfig -lXrender -lX11 -lXext -lpng12 -lz -lglitz -lm   -pthread -L/opt/gnome/lib64 -lgthread-2.0 -lglib-2.0 

      I changed the "lib64" paths to "lib":

      CFLAGS= -Wall -g -O2  -I/usr/X11R6/include  -g -O2 -m32 -DXP_UNIX -DMOZ_X11 -I/home/.../Desktop/gecko-sdk -I/home/.../Desktop/gecko-sdk/include -Iinclude -fPIC -DXPCOM_GLUE -DMOZILLA_STRICT_API -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib64/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib64/glib-2.0/include   -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib64/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib64/glib-2.0/include   -pthread -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib64/glib-2.0/include   -DGTK_ENABLED

      LDFLAGS=   -melf_i386  -L/usr/X11R6/lib  -lX11   -lSM -lICE -lXext -lX11 -lXpm -lXt -L/usr/X11R6/lib -L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lfreetype -lfontconfig -lXrender -lX11 -lXext -lpng12 -lz -lglitz -lm   -L/usr/X11R6/lib64 -L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lfreetype -lfontconfig -lXrender -lX11 -lXext -lpng12 -lz -lglitz -lm   -pthread -L/opt/gnome/lib -lgthread-2.0 -lglib-2.0 

      Now it worked. Actually it did not because I had to create a whole bunch of symlinks (Suse seems to prevent its users from compiling 32 bit):

      /opt/gnome/lib
      ln -s libgtk-x11-2.0.so.0 libgtk-x11-2.0.so
      ln -s libgdk-x11-2.0.so.0 libgdk-x11-2.0.so
      ln -s libatk-1.0.so.0 libatk-1.0.so
      ln -s libgdk_pixbuf-2.0.so.0 libgdk_pixbuf-2.0.so
      ln -s libpangocairo-1.0.so.0 libpangocairo-1.0.so
      ln -s libpango-1.0.so.0 libpango-1.0.so
      ln -s libgobject-2.0.so.0 libgobject-2.0.so
      ln -s libgmodule-2.0.so.0 libgmodule-2.0.so
      ln -s libglib-2.0.so.0 libglib-2.0.so
      ln -s libgthread-2.0.so.0 libgthread-2.0.so

      /usr/lib:
      ln -s libcairo.so.2 libcairo.so
      ln -s libfreetype.so.6 libfreetype.so
      ln -s libfontconfig.so.1 libfontconfig.so
      ln -s libz.so.1 libz.so
      ln -s libglitz.so.1 libglitz.so

      I still need to try whether I need a 32 bit Mplayer or whether the default MPlayer build is sufficient.

      For the records: I could build the 32 bit MPlayer with this configure command:

      ./configure --target=athlon_xp --cc="gcc -m32" --as="as --32" --enable-gui  --with-extralibdir=/opt/gnome/lib

      (the extralibdir is needed because otherwise GTK2 was not found).

      Wolfgang