all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Valtteri Vuorikoski <vuori@notcom.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: luangruo@yahoo.com, van.ly@sdf.org, eggert@cs.ucla.edu,
	64698@debbugs.gnu.org
Subject: bug#64698: 29.0.92; on netbsd 9.3, gmake and "gmake bootstrap" fail to proceed
Date: Sat, 22 Jul 2023 20:08:42 +0300	[thread overview]
Message-ID: <x4pmyfbxh4ucs63w4sadpwao4jdpcilqbwoktggrf4pxynkqid@oqmd2qdrabai> (raw)
In-Reply-To: <837cqt1q7m.fsf@gnu.org>

On Fri, Jul 21, 2023 at 02:03:41PM +0300, Eli Zaretskii wrote:
> > If you want to apply it for -30, this basically implements the
> > suggestion that was already dnl'd in configure.ac. Emacs will end up
> > using ossaudio even if the alsa-lib pkgsrc package is installed.
> 
> Thanks.  The comments say "NetBSD", but I don't quite see where this
> change affects only the *BSD systems, let alone NetBSD alone.  Maybe
> we should add that condition explicitly?  I'd hate to break some other
> system while fixing NetBSD.

Based on an investigation of source trees, libossaudio exists on
NetBSD and OpenBSD. Comments (diff below) have been updated to reflect
this. FreeBSD (going back from current to 4.x) and DragonflyBSD (from
current to 1.2) don't have it.

configure.ac --with-sound=yes cannot have picked bsd-ossaudio if
-lossaudio is not found, so this change should not have any effect on
FreeBSD/DragonflyBSD: LIBSOUND has always ended up empty on those and
hence the LIBSOUND=-lossaudio test will always fail.

Meanwhile OpenBSD appears to have behaved the same as NetBSD: use ALSA
if it exists, otherwise ossaudio. OpenBSD binary packages seem to be
built with --without-sound
(https://github.com/openbsd/ports/blob/master/editors/emacs/Makefile)
so this change won't affect their package builds in any case.

Updated diff (comment update only):

--- configure.ac.old     2023-07-22 16:27:51.312652423 +0000
+++ configure.ac        2023-07-22 16:30:58.860198891 +0000
@@ -1793,12 +1793,14 @@
     AC_MSG_ERROR([OSS sound support requested but not found.])

   if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
-    # Emulation library used on NetBSD.
+    # OSS emulation library used on NetBSD and OpenBSD.
     AC_CHECK_LIB([ossaudio], [_oss_ioctl], [LIBSOUND=-lossaudio], [LIBSOUND=])
     test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
       AC_MSG_ERROR([bsd-ossaudio sound support requested but not found.])
-    dnl FIXME?  If we did find ossaudio, should we set with_sound=bsd-ossaudio?
-    dnl Traditionally, we go on to check for alsa too.  Does that make sense?
+    # On {Net,Open}BSD use the system audio library instead of potentially switching
+    # to ALSA below, as ALSA on these appears to just wrap system libraries.
+    test "${with_sound}" = "yes" && test "$LIBSOUND" = "-lossaudio" && \
+      with_sound="bsd-ossaudio"
   fi
   AC_SUBST([LIBSOUND])

> > People who want alsa should be able to still get it with
> > --with-sound=alsa.
> 
> This should probably be mentioned in NEWS, then.

How about this for a NEWS entry:

  ** Emacs now always uses the ossaudio library for sound output on
  NetBSD and OpenBSD.
  Previously configure used ALSA libraries if installed on the
  system when --with-sound was set to "yes" (the default), with fallback to
  libossaudio. The libossaudio library included with the base system is now used even if
  ALSA is found to avoid relying on external packages and to resolve
  potential incompatibilities between Linux and BSD versions of ALSA.
  Set --with-sound=alsa to build with ALSA on these operating systems
  instead.

re Van's comment on the native sound API: it's true that ossaudio(3)
recommends using the native (lower-level?) API for new development,
but someone would have to implement support for it. Since there have
apparently been few complains wrt ossaudio, while ALSA on BSD on the
other hand seems slightly problematic (and is not the native API
either, but a wrapper similar to libossaudio), carrying on with
ossaudio seems reasonable from a development-effort perspective. But
I can't speak about the end-user perspective, since I don't have any
BSD boxen that are likely to output audio.

 -Valtteri
 





  parent reply	other threads:[~2023-07-22 17:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18  9:31 bug#64698: 29.0.92; on netbsd 9.3, gmake and "gmake bootstrap" fail to proceed Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-18 10:22 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-18 11:35   ` Eli Zaretskii
2023-07-19  3:10     ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-19 12:31       ` Eli Zaretskii
2023-07-19 21:01         ` Paul Eggert
2023-07-20  4:47           ` Eli Zaretskii
2023-07-20 10:13             ` Valtteri Vuorikoski
2023-07-20 16:12               ` Eli Zaretskii
2023-07-21 10:13                 ` Valtteri Vuorikoski
2023-07-21 11:03                   ` Eli Zaretskii
2023-07-21 12:12                     ` Valtteri Vuorikoski
2023-07-21 12:45                       ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-22 17:08                     ` Valtteri Vuorikoski [this message]
2023-07-26 14:05                       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x4pmyfbxh4ucs63w4sadpwao4jdpcilqbwoktggrf4pxynkqid@oqmd2qdrabai \
    --to=vuori@notcom.org \
    --cc=64698@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=van.ly@sdf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.