Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Seamonkey with oss support instead of alsa.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2622
Location: de

PostPosted: Sat Jan 14, 2012 4:16 pm    Post subject: [solved] Seamonkey with oss support instead of alsa. Reply with quote

Hi again,

To my desktop machine there's a cheap analog sound speaker system connected. And OSS4 gives me there a much better sound quality than alsa. Unfortunately there are projects or organizations that don't like OSS very much. One of them is the mozilla foundation (Firefox, Seamonkey, Xulrunner). Of course they support OSS on BSD, but they deny it on Linux. To replace alsa with OSS support it's only necessary to change two little characters in the source code and the alsa check in the configure scripts.

The whole patch:
Code:
diff -ur comm-release.orig/configure.in comm-release/configure.in
--- comm-release.orig/configure.in      2011-11-26 10:15:14.342075549 +0100
+++ comm-release/configure.in   2011-11-26 10:28:53.343758227 +0100
@@ -5227,15 +5227,6 @@
 dnl ========================================================
 
 dnl If using sydneyaudio with Linux, ensure that the alsa library is available
-if test -n "$MOZ_SYDNEYAUDIO"; then
-   case "$target_os" in
-linux*)
-      PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
-         [echo "$MOZ_ALSA_PKG_ERRORS"
-          AC_MSG_ERROR([Need alsa for Ogg or Wave decoding on Linux.  Disable with --disable-ogg --disable-wave.])])
-      ;;
-   esac
-fi
 AC_SUBST(MOZ_ALSA_LIBS)
 
 dnl ========================================================
Nur in comm-release: configure.in.orig.
diff -ur comm-release.orig/mozilla/configure comm-release/mozilla/configure
--- comm-release.orig/mozilla/configure 2011-11-26 10:14:01.832149648 +0100
+++ comm-release/mozilla/configure      2011-11-26 10:33:41.754531512 +0100
@@ -18320,14 +18320,14 @@
      fi
   fi
 
-  if test $succeeded = yes; then
-     :
-  else
-     if test "$COMPILE_ENVIRONMENT"; then
-       echo "$MOZ_ALSA_PKG_ERRORS"
-          { echo "configure: error: Need alsa for Ogg, Wave or WebM decoding on Linux.  Disable with --disable-ogg --disable-wave --disable-webm.  (On Ubuntu, you might try installing the package libasound2-dev.)" 1>&2; exit 1; }
-     fi
-  fi
+#  if test $succeeded = yes; then
+#     :
+#  else
+#     if test "$COMPILE_ENVIRONMENT"; then
+#       echo "$MOZ_ALSA_PKG_ERRORS"
+#          { echo "configure: error: Need alsa for Ogg, Wave or WebM decoding on Linux.  Disable with --disable-ogg --disable-wave --disable-webm.  (On Ubuntu, you might try installing the package libasound2-dev.)" 1>&2; exit 1; }
+#     fi
+#  fi
 
       ;;
    esac
diff -ur comm-release.orig/mozilla/configure.in comm-release/mozilla/configure.in
--- comm-release.orig/mozilla/configure.in      2011-11-26 10:14:10.453546344 +0100
+++ comm-release/mozilla/configure.in   2011-11-26 10:28:53.406753819 +0100
@@ -5943,15 +5943,7 @@
 dnl ========================================================
 
 dnl If using sydneyaudio with Linux, ensure that the alsa library is available
-if test -n "$MOZ_SYDNEYAUDIO"; then
-   case "$target_os" in
-linux*)
-      PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
-         [echo "$MOZ_ALSA_PKG_ERRORS"
-          AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux.  Disable with --disable-ogg --disable-wave --disable-webm.  (On Ubuntu, you might try installing the package libasound2-dev.)])])
-      ;;
-   esac
-fi
+AC_SUBST(MOZ_ALSA_LIBS)
 
 dnl ========================================================
 dnl Permissions System
Nur in comm-release/mozilla: configure.in.orig.
diff -ur comm-release.orig/mozilla/media/libsydneyaudio/src/Makefile.in comm-release/mozilla/media/libsydneyaudio/src/Makefile.in
--- comm-release.orig/mozilla/media/libsydneyaudio/src/Makefile.in      2011-11-26 10:15:08.749466912 +0100
+++ comm-release/mozilla/media/libsydneyaudio/src/Makefile.in   2011-11-26 10:28:53.406753819 +0100
@@ -57,7 +57,7 @@
                $(NULL)
 else ifeq ($(OS_ARCH),Linux)
 CSRCS          = \
-               sydney_audio_alsa.c \
+               sydney_audio_oss.c \
                $(NULL)
 endif

That worked perfect in Seamonkey until version 2.5.0. In Firefox and Xulrunner it's still working (two parts less to patch). But in Seamonkey I get in the configure stage:
Code:
 emerge -1u seamonkey
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) www-client/seamonkey-2.6.1
 * seamonkey-2.6.1.source.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                      [ ok ]
 * seamonkey-2.6.1-patches-01.tar.xz RMD160 SHA1 SHA256 size ;-) ...                                                                                   [ ok ]
 * enigmail-1.3.4.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                                                                               [ ok ]
 * seamonkey-2.6.1-de.xpi RMD160 SHA1 SHA256 size ;-) ...                                                                                              [ ok ]
>>> Unpacking source...
>>> Unpacking seamonkey-2.6.1.source.tar.bz2 to /var/tmp/portage/www-client/seamonkey-2.6.1/work
>>> Unpacking seamonkey-2.6.1-patches-01.tar.xz to /var/tmp/portage/www-client/seamonkey-2.6.1/work
>>> Unpacking enigmail-1.3.4.tar.gz to /var/tmp/portage/www-client/seamonkey-2.6.1/work
>>> Unpacking seamonkey-2.6.1-de.xpi to /var/tmp/portage/www-client/seamonkey-2.6.1/work
unpack seamonkey-2.6.1-de.xpi: file format not recognized. Ignoring.
 * Unpacking seamonkey-2.6.1-de.xpi to /var/tmp/portage/www-client/seamonkey-2.6.1/work
>>> Source unpacked in /var/tmp/portage/www-client/seamonkey-2.6.1/work
>>> Preparing source in /var/tmp/portage/www-client/seamonkey-2.6.1/work/comm-release ...
 * Applying various patches (bugfixes/updates) ...
 *   2000-seamonkey_gentoo_install_dirs.patch ...                                                                                                      [ ok ]
 *   2001_ldap_respect_cflags.patch ...                                                                                                                [ ok ]
 *   2002_fix-preferences-gentoo.patch ...                                                                                                             [ ok ]
 *   5000_gconf-config-update.patch ...                                                                                                                [ ok ]
 * Done with patching
 * Applying seamonkey_replace_alsa_with_oss.patch ...                                                                                                  [ ok ]
 * Applying various patches (bugfixes/updates) ...
...
checking for getaddrinfo... (cached) yes
checking for sasl_client_init in -lsasl2... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -pthread... yes
updating cache ../../.././config.cache
creating ./config.status
creating Makefile
creating config/Makefile
creating config/autoconf.mk
creating ldap/Makefile
creating ldap/clients/tools/Makefile
creating ldap/include/Makefile
creating ldap/libraries/Makefile
creating ldap/libraries/libldap/Makefile
creating ldap/libraries/libprldap/Makefile
creating ldap/libraries/libldif/Makefile
creating ldap/libraries/liblber/Makefile
creating ldap/libraries/libiutil/Makefile
creating ldap/libraries/libssldap/Makefile
creating ldap/libraries/libutil/Makefile
>>> Source configured.
>>> Compiling source in /var/tmp/portage/www-client/seamonkey-2.6.1/work/comm-release ...
make -j3
make -C mozilla default
make[1]: Entering directory `/var/tmp/portage/www-client/seamonkey-2.6.1/work/comm-release/mozilla'
STOP!  configure.in has changed, and your configure is out of date.
Please rerun autoconf and re-configure your build directory.
To ignore this message, touch 'configure' in the source directory,
but your build might not succeed.
make[1]: *** [configure] Error 1
make[1]: Leaving directory `/var/tmp/portage/www-client/seamonkey-2.6.1/work/comm-release/mozilla'
make: *** [default] Error 2
emake failed
 * ERROR: www-client/seamonkey-2.6.1 failed (compile phase):
 *   (no error message)


Any ideas in which configure script I can deactivate that boring "STOP! configure.in has changed, and your configure is out of date." check? It seems the guys from mozilla build in every new version an additional check in, that makes it harder to replace alsa by oss.


Last edited by musv on Thu Feb 23, 2012 10:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
Wormo
Retired Dev
Retired Dev


Joined: 29 Nov 2004
Posts: 526
Location: SB County California

PostPosted: Sun Jan 15, 2012 7:36 am    Post subject: Reply with quote

Is that really your whole build log?

The weird thing about it is that there are no messages from eautoreconf, even though I see it being called from prepare stage in seamonkey-2.6.1.ebuild. I would have expected to see messages like "* Running autoconf" after the patches were applied but before the configure stage.

Also note that your configure script really is outdated if eautoreconf is indeed not running, so the build would have a right to complain.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2622
Location: de

PostPosted: Sun Jan 15, 2012 9:32 am    Post subject: Reply with quote

Wormo wrote:
Is that really your whole build log?

I copied only the first and the last part of the configure phase. See the "..." below "Applying various patches"

Wormo wrote:
Also note that your configure script really is outdated if eautoreconf is indeed not running, so the build would have a right to complain.

It's the current seamonkey ebuild. I just included my patch into the original ebuild. Portage is up to date.

Complete files:
build.log
modified seamonkey-2.6.1.ebuild
seamonkey_replace_alsa_with_oss.patch
Back to top
View user's profile Send private message
Wormo
Retired Dev
Retired Dev


Joined: 29 Nov 2004
Posts: 526
Location: SB County California

PostPosted: Sun Jan 15, 2012 6:52 pm    Post subject: Reply with quote

The full log does show autoconf being run. Check the timestamps for configure.in and configure in that build directory -- did autoconf fail to update configure for some reason? If so, try running autoconf manually and see whether that updates configure script.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2622
Location: de

PostPosted: Sun Jan 15, 2012 9:29 pm    Post subject: Reply with quote

Sorry for another question, but I don't have any experience with the autotools. Where do I have to execute which command?

I tried in /var/tmp/portage/www-client/seamonkey-2.6.1/work/comm-release autoconf and got:
Code:
mozilla/build/autoconf/acwinpaths.m4:44: error: defn: undefined macro: AC_OUTPUT_FILES
mozilla/build/autoconf/acwinpaths.m4:44: the top level
autom4te-2.68: /usr/bin/m4 failed with exit status: 1


Timestamps:
Code:
-rwxr-xr-x 1 portage portage 566059 15. Jan 22:07 configure
-rw-r--r-- 1 portage portage 242328 15. Jan 22:07 configure.in
Back to top
View user's profile Send private message
Wormo
Retired Dev
Retired Dev


Joined: 29 Nov 2004
Posts: 526
Location: SB County California

PostPosted: Sun Jan 15, 2012 9:40 pm    Post subject: Reply with quote

You can run it from the same dir as the configure.in, but it looks like you need to run a different version of autoconf. According to seamonkey ebuild they are using a very old version of autoconf: WANT_AUTOCONF="2.1"

Try running autoconf-2.13 instead
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2622
Location: de

PostPosted: Sun Jan 22, 2012 8:30 pm    Post subject: Reply with quote

Tried without success.

Code:
emerge -1u seamonkey
...
STOP!  configure.in has changed, and your configure is out of date.
Please rerun autoconf and re-configure your build directory.
...
cd /var/tmp/portage/www-client/seamonkey-2.6.1/work/comm-release/
/usr/bin/autoreconf-2.13

and got:
Code:
/usr/bin/autoheader-2.13: Symbol `XP_WIN' is not covered by /usr/share/autoconf/acconfig.h
/usr/bin/autoheader-2.13: Symbol `XP_WIN32' is not covered by /usr/share/autoconf/acconfig.h
ls: Zugriff auf ./acinclude.m4 nicht möglich: Datei oder Verzeichnis nicht gefunden
aclocal.m4:14: error: this file was generated for autoconf 2.61.
You have another version of autoconf.  If you want to use that,
you should regenerate the build system entirely.
aclocal.m4:14: the top level
autom4te-2.68: /usr/bin/m4 failed with exit status: 63
automake-1.10: autoconf failed with exit status: 63
FATAL ERROR: Autoconf version 2.60 or higher is required for this script
FATAL ERROR: Autoconf version 2.60 or higher is required for this script

ok, the let's try 2.68
Code:
/usr/bin/autoreconf-2.68
mozilla/build/autoconf/acwinpaths.m4:44: error: defn: undefined macro: AC_OUTPUT_FILES
mozilla/build/autoconf/acwinpaths.m4:44: the top level
autom4te-2.68: /usr/bin/m4 failed with exit status: 1
mozilla/build/autoconf/acwinpaths.m4:44: error: defn: undefined macro: AC_OUTPUT_FILES
mozilla/build/autoconf/acwinpaths.m4:44: the top level
autom4te-2.68: /usr/bin/m4 failed with exit status: 1
autoreconf-2.68: /usr/bin/autoconf-2.68 failed with exit status: 1

Seems autoreconf-2.13 does not imply the automatic use of autom4te-2.13. *hmpf*
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2622
Location: de

PostPosted: Sun Jan 22, 2012 9:33 pm    Post subject: Reply with quote

Ok, I'm a step in another direction. Don't know if it's a progress.

I removed the part in the patch where I modified: comm-release/mozilla/configure. Now I get in the configure stage:
Code:
checking _GTKCHECK_LIBS... -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 
checking for gio-2.0 >= 2.18... yes
checking MOZ_GIO_CFLAGS... -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include 
checking MOZ_GIO_LIBS... -pthread -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 
checking for dbus-1 >= 0.60... yes
checking MOZ_DBUS_CFLAGS... -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include 
checking MOZ_DBUS_LIBS... -ldbus-1 -lpthread -lrt 
checking for dbus-glib-1 >= 0.60... yes
checking MOZ_DBUS_GLIB_CFLAGS... -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 
checking MOZ_DBUS_GLIB_LIBS... -pthread -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 
checking __attribute__ ((aligned ())) support... trying 64
64
checking for vpx/vpx_decoder.h... yes
checking for vpx_codec_dec_init_ver in -lvpx... yes
checking for alsa... Package alsa was not found in the pkg-config search path.
Perhaps you should add the directory containing `alsa.pc'
to the PKG_CONFIG_PATH environment variable
No package 'alsa' found
configure: error: Need alsa for Ogg, Wave or WebM decoding on Linux.  Disable with --disable-ogg --disable-wave --disable-webm.  (On Ubuntu, you might try installing the package libasound2-dev.)
configure: error: ./configure failed for mozilla

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/www-client/seamonkey-2.6.1/work/comm-release/config.log

I greped for alsa in any configure-scripts, but I don't find the point to remove the alsa check and keep the sound support at the same time. :evil:
Back to top
View user's profile Send private message
Wormo
Retired Dev
Retired Dev


Joined: 29 Nov 2004
Posts: 526
Location: SB County California

PostPosted: Sun Jan 22, 2012 11:02 pm    Post subject: Reply with quote

musv wrote:
Ok, I'm a step in another direction. Don't know if it's a progress.
I removed the part in the patch where I modified: comm-release/mozilla/configure.


Hm I thought you were modifying configure.in not configure directly?

musv wrote:

checking for alsa... Package alsa was not found in the pkg-config search path.
Perhaps you should add the directory containing `alsa.pc'
to the PKG_CONFIG_PATH environment variable
No package 'alsa' found
configure: error: Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)
configure: error: ./configure failed for mozilla

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/www-client/seamonkey-2.6.1/work/comm-release/config.log[/code]
I greped for alsa in any configure-scripts, but I don't find the point to remove the alsa check and keep the sound support at the same time. :evil:


If you have alsa-lib installed, alsa.pc should exist in /usr/lib/pkgconfig -- does it?
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2622
Location: de

PostPosted: Mon Jan 23, 2012 7:56 am    Post subject: Reply with quote

Wormo wrote:
If you have alsa-lib installed, alsa.pc should exist in /usr/lib/pkgconfig -- does it?

No and no.

The whole point of this is NOT to have any alsa libs installed on my box. As I wrote above, to get the mozilla projects (Xulrunner, Firefox, Seamonkey) with oss working, it's just necessary to replace sydney_audio_alsa.c with sydney_audio_oss.c in libsydneyaudio/src/Makefile.in. It works in Xulrunner and Firefox and worked in Seamonkey < 2.5. From version >=2.5 they included an additional alsa check. And that's the goal of this thread - remove all the alsa checks.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2622
Location: de

PostPosted: Thu Feb 23, 2012 10:01 pm    Post subject: Reply with quote

For some reason, I can compile Seamonkey-2.7.1 with oss sound support again. I just tried to play a youtube video in webm format and it works like a charm with sound. There are no alsa libs on my machine. If someone is interested. The Ebuild:
/usr/portage/www-client/seamonkey/seamonkey-2.7.1.ebuild:
...
src_prepare() {
        # Apply our patches
        EPATCH_SUFFIX="patch" \
        EPATCH_FORCE="yes" \
        epatch "${WORKDIR}/seamonkey"
        epatch "${FILESDIR}"/seamonkey_replace_alsa_with_oss.patch


        # browser patches go here
...


The Patch:
/usr/portage/www-client/seamonkey/files/seamonkey_replace_alsa_with_oss.patch:
diff -ur comm-release.orig/configure.in comm-release/configure.in
--- comm-release.orig/configure.in   2011-11-26 10:15:14.342075549 +0100
+++ comm-release/configure.in   2011-11-26 10:28:53.343758227 +0100
@@ -5227,15 +5227,6 @@
 dnl ========================================================
 
 dnl If using sydneyaudio with Linux, ensure that the alsa library is available
-if test -n "$MOZ_SYDNEYAUDIO"; then
-   case "$target_os" in
-linux*)
-      PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
-         [echo "$MOZ_ALSA_PKG_ERRORS"
-          AC_MSG_ERROR([Need alsa for Ogg or Wave decoding on Linux.  Disable with --disable-ogg --disable-wave.])])
-      ;;
-   esac
-fi
 AC_SUBST(MOZ_ALSA_LIBS)
 
 dnl ========================================================
diff -ur comm-release.orig/mozilla/configure.in comm-release/mozilla/configure.in
--- comm-release.orig/mozilla/configure.in   2011-11-26 10:14:10.453546344 +0100
+++ comm-release/mozilla/configure.in   2011-11-26 10:28:53.406753819 +0100
@@ -5943,15 +5943,7 @@
 dnl ========================================================
 
 dnl If using sydneyaudio with Linux, ensure that the alsa library is available
-if test -n "$MOZ_SYDNEYAUDIO"; then
-   case "$target_os" in
-linux*)
-      PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
-         [echo "$MOZ_ALSA_PKG_ERRORS"
-          AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux.  Disable with --disable-ogg --disable-wave --disable-webm.  (On Ubuntu, you might try installing the package libasound2-dev.)])])
-      ;;
-   esac
-fi
+AC_SUBST(MOZ_ALSA_LIBS)
 
 dnl ========================================================
 dnl Permissions System
Nur in comm-release/mozilla: configure.in.orig.
diff -ur comm-release.orig/mozilla/media/libsydneyaudio/src/Makefile.in comm-release/mozilla/media/libsydneyaudio/src/Makefile.in
--- comm-release.orig/mozilla/media/libsydneyaudio/src/Makefile.in   2011-11-26 10:15:08.749466912 +0100
+++ comm-release/mozilla/media/libsydneyaudio/src/Makefile.in   2011-11-26 10:28:53.406753819 +0100
@@ -57,7 +57,7 @@
       $(NULL)
 else ifeq ($(OS_ARCH),Linux)
 CSRCS      = \
-      sydney_audio_alsa.c \
+      sydney_audio_oss.c \
       $(NULL)
 endif
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum