* Deprecation message in Arch Linux.
@ 2019-08-28 9:41 Ergus
2019-08-28 17:19 ` Paul Eggert
0 siblings, 1 reply; 6+ messages in thread
From: Ergus @ 2019-08-28 9:41 UTC (permalink / raw)
To: Emacs developers
Hi:
When building emacs master in arch linux I am getting this warning
message:
In file included from ../../src/sound.c:78:
/usr/include/asoundlib.h:1:2: warning: #warning This header is deprecated, use <alsa/asoundlib.h> instead. [-Wcpp]
1 | #warning This header is deprecated, use <alsa/asoundlib.h> instead.
It shouldn't be an issue, but maybe we should fix it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Deprecation message in Arch Linux.
2019-08-28 9:41 Deprecation message in Arch Linux Ergus
@ 2019-08-28 17:19 ` Paul Eggert
2019-08-28 17:45 ` Sven Joachim
0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggert @ 2019-08-28 17:19 UTC (permalink / raw)
To: Ergus; +Cc: Emacs developers
Ergus wrote:
> In file included from ../../src/sound.c:78:
> /usr/include/asoundlib.h:1:2: warning: #warning This header is deprecated, use
> <alsa/asoundlib.h> instead. [-Wcpp]
> 1 | #warning This header is deprecated, use <alsa/asoundlib.h> instead.
>
>
> It shouldn't be an issue, but maybe we should fix it.
Sounds like a problem with your Arch Linux configuration. The command:
pkg-config --cflags "alsa >= 1.0.0"
should output something like "-I/usr/include/alsa" so that the "#include
<asoundlib.h>" grabs /usr/include/alsa/asoundlib.h instead of
/usr/include/asoundlib.h. You might look into that, and if you still think it's
an Emacs configure problem please file a bug report.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Deprecation message in Arch Linux.
2019-08-28 17:19 ` Paul Eggert
@ 2019-08-28 17:45 ` Sven Joachim
2019-08-28 18:38 ` Paul Eggert
0 siblings, 1 reply; 6+ messages in thread
From: Sven Joachim @ 2019-08-28 17:45 UTC (permalink / raw)
To: Paul Eggert; +Cc: Ergus, Emacs developers
On 2019-08-28 10:19 -0700, Paul Eggert wrote:
> Ergus wrote:
>> In file included from ../../src/sound.c:78:
>> /usr/include/asoundlib.h:1:2: warning: #warning This header is
>> deprecated, use <alsa/asoundlib.h> instead. [-Wcpp]
>> 1 | #warning This header is deprecated, use <alsa/asoundlib.h> instead.
>>
>> It shouldn't be an issue, but maybe we should fix it.
>
> Sounds like a problem with your Arch Linux configuration. The command:
>
> pkg-config --cflags "alsa >= 1.0.0"
>
> should output something like "-I/usr/include/alsa" so that the
> "#include <asoundlib.h>" grabs /usr/include/alsa/asoundlib.h instead
> of /usr/include/asoundlib.h. You might look into that, and if you
> still think it's an Emacs configure problem please file a bug report.
This was a deliberate change in alsa-lib 1.1.9, as "-I/usr/include/alsa"
is considered dangerous due to possible namespace conflicts[1]. Perhaps
Emacs' configure script should test for <alsa/asoundlib.h> first, and
only try <asoundlib.h> if that fails? Right now it's done the other way
around.
Cheers,
Sven
https://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=fc0e54c3cc6ad48d12d2cdad18df4473c559a448
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Deprecation message in Arch Linux.
2019-08-28 17:45 ` Sven Joachim
@ 2019-08-28 18:38 ` Paul Eggert
2019-08-28 18:49 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggert @ 2019-08-28 18:38 UTC (permalink / raw)
To: Sven Joachim; +Cc: Ergus, Emacs developers
[-- Attachment #1: Type: text/plain, Size: 414 bytes --]
Sven Joachim wrote:
> Perhaps
> Emacs' configure script should test for <alsa/asoundlib.h> first, and
> only try <asoundlib.h> if that fails?
Thanks for the suggestion. I looked into the history of this and the
configure-time test apparently is for pre-1.0.0 alsa-lib, which Emacs no longer
supports anyway. So I installed the attached obvious patch into master. Please
give it a try, as I don't use alsa-lib.
[-- Attachment #2: 0001-Don-t-worry-about-pre-1.0.0-alsa-lib-include.patch --]
[-- Type: text/x-patch, Size: 2279 bytes --]
From fdccab473e1f95dae5ee0f07a4531dd4e05b22dd Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 28 Aug 2019 11:34:48 -0700
Subject: [PATCH] Don't worry about pre-1.0.0 alsa-lib include
Problem reported by Ergus in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00563.html
* configure.ac (ALSA_SUBDIR_INCLUDE): Do not define.
* src/sound.c: Assume ALSA_SUBDIR_INCLUDE.
---
configure.ac | 20 --------------------
src/sound.c | 6 +-----
2 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6c83d61921..e39a438052 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1731,26 +1731,6 @@ AC_DEFUN
ALSA_MODULES="alsa >= $ALSA_REQUIRED"
EMACS_CHECK_MODULES([ALSA], [$ALSA_MODULES])
if test $HAVE_ALSA = yes; then
- SAVE_CFLAGS="$CFLAGS"
- SAVE_LIBS="$LIBS"
- CFLAGS="$ALSA_CFLAGS $CFLAGS"
- LIBS="$ALSA_LIBS $LIBS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <asoundlib.h>]], [[snd_lib_error_set_handler (0);]])],
- emacs_alsa_normal=yes,
- emacs_alsa_normal=no)
- if test "$emacs_alsa_normal" != yes; then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <alsa/asoundlib.h>]],
- [[snd_lib_error_set_handler (0);]])],
- emacs_alsa_subdir=yes,
- emacs_alsa_subdir=no)
- if test "$emacs_alsa_subdir" != yes; then
- AC_MSG_ERROR([pkg-config found alsa, but it does not compile. See config.log for error messages.])
- fi
- ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
- fi
-
- CFLAGS="$SAVE_CFLAGS"
- LIBS="$SAVE_LIBS"
LIBSOUND="$LIBSOUND $ALSA_LIBS"
CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.])
diff --git a/src/sound.c b/src/sound.c
index 4ba826e82c..44d4cbc6d5 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -72,12 +72,8 @@ Copyright (C) 1998-1999, 2001-2019 Free Software Foundation, Inc.
#include <soundcard.h>
#endif
#ifdef HAVE_ALSA
-#ifdef ALSA_SUBDIR_INCLUDE
#include <alsa/asoundlib.h>
-#else
-#include <asoundlib.h>
-#endif /* ALSA_SUBDIR_INCLUDE */
-#endif /* HAVE_ALSA */
+#endif
/* END: Non Windows Includes */
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Deprecation message in Arch Linux.
2019-08-28 18:38 ` Paul Eggert
@ 2019-08-28 18:49 ` Eli Zaretskii
2019-08-28 19:08 ` Sven Joachim
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-08-28 18:49 UTC (permalink / raw)
To: Paul Eggert; +Cc: spacibba, svenjoac, emacs-devel
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Wed, 28 Aug 2019 11:38:51 -0700
> Cc: Ergus <spacibba@aol.com>, Emacs developers <emacs-devel@gnu.org>
>
> diff --git a/src/sound.c b/src/sound.c
> index 4ba826e82c..44d4cbc6d5 100644
> --- a/src/sound.c
> +++ b/src/sound.c
> @@ -72,12 +72,8 @@ Copyright (C) 1998-1999, 2001-2019 Free Software Foundation, Inc.
> #include <soundcard.h>
> #endif
> #ifdef HAVE_ALSA
> -#ifdef ALSA_SUBDIR_INCLUDE
> #include <alsa/asoundlib.h>
> -#else
> -#include <asoundlib.h>
> -#endif /* ALSA_SUBDIR_INCLUDE */
> -#endif /* HAVE_ALSA */
> +#endif
This completely removes support for systems which don't have
alsa/asoundlib.h, but do have asoundlib.h, doesn't it? Are there no
such systems we care about anymore?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Deprecation message in Arch Linux.
2019-08-28 18:49 ` Eli Zaretskii
@ 2019-08-28 19:08 ` Sven Joachim
0 siblings, 0 replies; 6+ messages in thread
From: Sven Joachim @ 2019-08-28 19:08 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: spacibba, Paul Eggert, emacs-devel
On 2019-08-28 21:49 +0300, Eli Zaretskii wrote:
>> From: Paul Eggert <eggert@cs.ucla.edu>
>> Date: Wed, 28 Aug 2019 11:38:51 -0700
>> Cc: Ergus <spacibba@aol.com>, Emacs developers <emacs-devel@gnu.org>
>>
>> diff --git a/src/sound.c b/src/sound.c
>> index 4ba826e82c..44d4cbc6d5 100644
>> --- a/src/sound.c
>> +++ b/src/sound.c
>> @@ -72,12 +72,8 @@ Copyright (C) 1998-1999, 2001-2019 Free Software Foundation, Inc.
>> #include <soundcard.h>
>> #endif
>> #ifdef HAVE_ALSA
>> -#ifdef ALSA_SUBDIR_INCLUDE
>> #include <alsa/asoundlib.h>
>> -#else
>> -#include <asoundlib.h>
>> -#endif /* ALSA_SUBDIR_INCLUDE */
>> -#endif /* HAVE_ALSA */
>> +#endif
>
> This completely removes support for systems which don't have
> alsa/asoundlib.h, but do have asoundlib.h, doesn't it? Are there no
> such systems we care about anymore?
I think so. At least since ALSA 0.9.0 there has been alsa/asoundlib.h,
and Emacs already requires ALSA 1.0.0 or later.
Cheers,
Sven
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-28 19:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-28 9:41 Deprecation message in Arch Linux Ergus
2019-08-28 17:19 ` Paul Eggert
2019-08-28 17:45 ` Sven Joachim
2019-08-28 18:38 ` Paul Eggert
2019-08-28 18:49 ` Eli Zaretskii
2019-08-28 19:08 ` Sven Joachim
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).