Bug 274792 - audio/alsa-plugins-1.2.7.1 fails to build with poudriere when the JACK option set
Summary: audio/alsa-plugins-1.2.7.1 fails to build with poudriere when the JACK option...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-29 14:43 UTC by sven.a.jonsson
Modified: 2024-01-31 17:10 UTC (History)
2 users (show)

See Also:
jbeich: merge-quarterly+


Attachments
Poudriere build log. (36.76 KB, text/plain)
2023-10-29 14:43 UTC, sven.a.jonsson
no flags Details
audio/alsa-plugins: Fix build with JACK option set. (2.01 KB, patch)
2023-11-03 23:22 UTC, Florian Walpen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sven.a.jonsson 2023-10-29 14:43:33 UTC
Created attachment 245973 [details]
Poudriere build log.

As the title says. Without the JACK option it builds fine.
Comment 1 Florian Walpen 2023-11-03 23:22:03 UTC
Created attachment 246089 [details]
audio/alsa-plugins: Fix build with JACK option set.

Hi Sven, stumbled upon this PR as the maintainer of Jack. Could you try this patch? It's just a linuxism, looks like the option wasn't tested on recent updates.

I didn't run it to check the functionality, what's your use case for this BTW?

Apply patch with "git am".
Comment 2 sven.a.jonsson 2023-11-04 18:22:53 UTC
Hi Florian,
My use case is that I set JACK option globally in the hope that I 
sometime in a hopefully not so distant future pick up my old electric and make some noises with the help of my computer 
( see "https://www.pinterest.com/pin/384354149441461726/" ).
In the meantime I'm just happy a package builds, which I can confirm that it does.
Comment 3 Florian Walpen 2023-11-06 19:25:23 UTC
(In reply to sven.a.jonsson from comment #2)

> My use case is that I set JACK option globally in the hope that I 
sometime in a hopefully not so distant future pick up my old electric and make some noises with the help of my computer

Best use case I've heard in a long time :)

If you want live effects for playing, my own hope is to improve the Jack OSS backend for low latency (https://github.com/jackaudio/jack2/pull/943), bring USB audio latency down (https://reviews.freebsd.org/D41942), and make the HDSPe driver more useful (https://github.com/0EVSG/snd_hdspe_alt) in the not so distant future.

So it's not mainstream yet, but definitely achievable with some tweaking and the right hardware. Feel free to contact me in private or on the multimedia@ mailing list if you need help.
Comment 4 Peter Much 2024-01-07 12:50:07 UTC
Affects me too. Patch helps to build. Not sure where this is used, but I want JACK everywhere (I want mixer and tape pluggable into my stereo).
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-01-30 16:53:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=609ec25809c7d1571a758ad09832fd6f6e1bc188

commit 609ec25809c7d1571a758ad09832fd6f6e1bc188
Author:     Florian Walpen <dev@submerge.ch>
AuthorDate: 2023-11-03 22:48:48 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-01-30 16:50:58 +0000

    audio/alsa-plugins: unbreak JACK=on build after 6cd91556d4b8

    pcm_jack.c:606:23: error: use of undeclared identifier 'program_invocation_short_name'
                    const char *pname = program_invocation_short_name;
                                        ^

    ====> Checking for pkg-plist issues (check-plist)
    ===> Parsing plist
    ===> Checking for items in STAGEDIR missing from pkg-plist
    Error: Orphaned: etc/alsa/conf.d/50-jack.conf
    Error: Orphaned: share/alsa/alsa.conf.d/50-jack.conf

    PR:             274792

 audio/alsa-plugins/files/patch-jack_pcm__jack.c (new) | 11 +++++++++++
 audio/alsa-plugins/pkg-plist                          |  2 ++
 2 files changed, 13 insertions(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-01-30 16:53:21 UTC
A commit in branch 2024Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=48f6692e42a4d755db5cd8122a18e3bcb4e086b7

commit 48f6692e42a4d755db5cd8122a18e3bcb4e086b7
Author:     Florian Walpen <dev@submerge.ch>
AuthorDate: 2023-11-03 22:48:48 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-01-30 16:53:04 +0000

    audio/alsa-plugins: unbreak JACK=on build after 6cd91556d4b8

    pcm_jack.c:606:23: error: use of undeclared identifier 'program_invocation_short_name'
                    const char *pname = program_invocation_short_name;
                                        ^

    ====> Checking for pkg-plist issues (check-plist)
    ===> Parsing plist
    ===> Checking for items in STAGEDIR missing from pkg-plist
    Error: Orphaned: etc/alsa/conf.d/50-jack.conf
    Error: Orphaned: share/alsa/alsa.conf.d/50-jack.conf

    PR:             274792
    (cherry picked from commit 609ec25809c7d1571a758ad09832fd6f6e1bc188)

 audio/alsa-plugins/files/patch-jack_pcm__jack.c (new) | 11 +++++++++++
 audio/alsa-plugins/pkg-plist                          |  2 ++
 2 files changed, 13 insertions(+)
Comment 7 Jan Beich freebsd_committer freebsd_triage 2024-01-30 17:19:26 UTC
Thanks. Landed after adjusting commit message to avoid paraphasing the diff. To be upstreamed via https://github.com/alsa-project/alsa-plugins/pull/48

See also review D43667 which moves JACK=on to alsa-plugins-jack package.
Does anyone know why JACK option needs SAMPLERATE? Seems to build fine without it.
Comment 8 Florian Walpen 2024-01-31 11:00:26 UTC
(In reply to Jan Beich from comment #7)

> Does anyone know why JACK option needs SAMPLERATE? Seems to build fine without it.

Having a sample rate converter is certainly handy, to use the fixed rate Jack server as a general purpose ALSA sink. But there may be other options, I have no experience with ALSA.

Does the build correctly omit the rate plugin with JACK=on and SAMPLERATE=off? Jack depends on libsamplerate anyway, so it could be a case of "builds rate plugin whenever libsamplerate is present, make it explicit"?
Comment 9 Jan Beich freebsd_committer freebsd_triage 2024-01-31 17:10:46 UTC
(In reply to Florian Walpen from comment #8)
Thanks for checking, see ports 14b194a6952f. --disable-samplerate predates the port, see https://github.com/alsa-project/alsa-plugins/commit/8e4cd0e52ced