Bug 208535 - audio/pulseaudio: unrecognized m4 (?) macros in configuration files
Summary: audio/pulseaudio: unrecognized m4 (?) macros in configuration files
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: freebsd-desktop (Team)
Depends on:
Reported: 2016-04-04 22:45 UTC by Sylvain Garrigues
Modified: 2021-09-15 16:13 UTC (History)
4 users (show)

See Also:

proposed patch (1.89 KB, patch)
2020-06-23 06:57 UTC, Steve Wills
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain Garrigues 2016-04-04 22:45:37 UTC
pulseaudio server doesn't want to start:

# pulseaudio  --start
E: [(null)] conf-parser.c: [/usr/local/etc/pulse/daemon.conf:19] Missing '='.

Line 19 of said file:
changequote(`[', `]')dnl Set up m4 quoting

There are plenty of these in all configuration files.

Note: I am running on FreeBSD/arm.
Comment 1 Sylvain Garrigues 2016-04-05 12:12:56 UTC
Seems like an arm-specific bug since there is no problem on my amd64 box.
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-01-13 04:46:18 UTC
Is this still relevant.
Comment 3 Tobias Kortkamp freebsd_committer 2018-03-16 11:11:16 UTC
(In reply to w.schwarzenfeld from comment #2)
Comment 4 commit-hook freebsd_committer 2018-03-16 11:16:26 UTC
A commit references this bug:

Author: tobik
Date: Fri Mar 16 11:16:18 UTC 2018
New revision: 464674
URL: https://svnweb.freebsd.org/changeset/ports/464674

  audio/pulseaudio-module-sndio: Unbreak on armv6/armv7

  `pulseaudio --version` fails to run on armv6/armv7 because
  etc/pulse/daemon.conf generation fails and still has m4 macros
  embedded in it.

  Get the PulseAudio version from pkg-config instead.

  PR:		208535
  Reported by:	linimon

Comment 5 Walter Schwarzenfeld freebsd_triage 2018-10-07 14:14:11 UTC
Forget to close?
Comment 6 Tobias Kortkamp freebsd_committer 2018-10-07 15:30:23 UTC
(In reply to w.schwarzenfeld from comment #5)
Nope. The commit was for pulseaudio-module-sndio not pulseaudio.
Last time I checked this problem still exists.
Comment 7 Steve Wills freebsd_committer 2020-06-23 06:57:23 UTC
Created attachment 215873 [details]
proposed patch

I just ran into what I think is basically the same issue with the PulseAudioConfig.cmake building x11-wm/lxqt-panel on aarch64. I think this patch fixes both issues.
Comment 8 Adriaan de Groot freebsd_committer 2020-06-25 22:07:13 UTC
The configure script looks for gm4, m4, and assigns the first one found to $M4 .. and then doesn't use that variable  when invoking m4. So this fix looks good to me, although it might be even better if it used $M4 instead of hard-coding gm4 there. Then it might be upstreamable.

That said, I don't understand why this goes wrong: is there no m4 in base on arm64? Because that's the only way I can think of that this command goes wrong. The m4 constructs in the file are bog-standard and (amd64) base m4 can handle them no problem.
Comment 9 Steve Wills freebsd_committer 2020-07-03 12:56:43 UTC
(In reply to Adriaan de Groot from comment #8)
There is m4 in base. I think it's due to qemu-user-static magic. This patch is probably not really solving any underlying issue directly but rather avoiding it with code that happens to be correct.
Comment 10 commit-hook freebsd_committer 2021-09-15 15:43:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3c1f4f5c80627a368ea17fe0918e3623e1b10b84

commit 3c1f4f5c80627a368ea17fe0918e3623e1b10b84
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2021-09-15 12:44:58 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2021-09-15 15:43:24 +0000

    audio/pulseaudio: fix build on ARMv6 in QEMU

    Switches to using GNU m4 (gm4) for processing PA configuration
    files; regular m4 behaves oddly in some build situations.

    PR:             208535
    Submitted by:   swills

 audio/pulseaudio/Makefile                    |  4 ++--
 audio/pulseaudio/files/patch-configure (new) | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 2 deletions(-)
Comment 11 Adriaan de Groot freebsd_committer 2021-09-15 16:13:31 UTC
I've applied this under the heading "might as well". Thanks swills.