From: Prafulla Giri <pratheblackdiamond@gmail.com>
To: 43628@debbugs.gnu.org
Subject: [bug#43628] Request for patch evaluation/review
Date: Sat, 26 Sep 2020 12:00:40 +0545 [thread overview]
Message-ID: <CAFw+=j3HG_a7f8R1p7C6izu+gAyeQ=uJVkijded881cTQcSnag@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2456 bytes --]
Esteemed maintainers (and contributors),
Attached is a patch which, as far as I can see, should work. But it does
not. I would like to submit it here for review. Please tell me what I am
doing wrong or what I am failing to do, so that I might clean up this patch
and submit a proper one.
1. The problem this patch is trying to solve:
Aegisub (guix install aegisub), as it currently is, does not give any sound
(at least on foreign distros). The terminal output reads as follows, when a
video file (with audio) is added into the program and an attempt is made at
playing it: (Video is added to aegisub by using 'Video > Open Video...')
```
ALSA lib conf.c:3683:(snd_config_hooks_call) Cannot open shared library
libasound_module_conf_pulse.so
(/gnu/store/zcjdb23gbhl0pcnvvm8rnlprkfl43cv5-alsa-lib-1.2.2/lib/alsa-lib/libasound_module_conf_pulse.so:
libasound_module_conf_pulse.so: cannot open shared object file: No such
file or directory)
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
```
The complaint being that it can't find libasound_module_conf_pulse.so. This
.so comes from the guix package `alsa-plugins:pulseaudio`. The /gnu/store
directory for it is something like
/gnu/store/...-alsa-plugins-1.2.2-pulseaudio/lib/alsa-lib/libasound_module_conf_pulse.so.
However, the .so file is being looked for inside of the /gnu/store path to
alsa-lib
(/gnu/store/...-alsa-lib-1.2.2/lib/alsa-lib/libasound_module_conf_pulse.so.
2. The Natural Solution:
Since libasound_module_conf_pulse.so is supplied by
`alsa-plugins:pulseaudio`, and the program is looking for it inside the
path to alsa-lib (supplied by `alsa-lib`), union-build is a logical
solution. This is what the patch implements.
3. Problem:
Despite this patch being applied, it continues to look for the .so file
inside the path to alsa-lib and not the union-alsa. What is more, alsa-lib
is not even in the inputs. Only union-alsa is. And yet, it seems to be
trying to use alsa-lib's /gnu/store path, which, the way I see it, violates
guix's functional package management.
4. It's not guix, it's me:
I'm sure this is some mistake on my part. Hence, I submit the diff here for
review.
P. S: The diff has changed a bit because I got this idea of moving
out/lib/alsa-lib/* into out/lib/ just to see if that makes any difference.
Only to realize a little too late that it doesn't. But I send the diff with
those changes included because I didn't stash the previous (cleaner) one.
[-- Attachment #1.2: Type: text/html, Size: 2771 bytes --]
[-- Attachment #2: aegisub_alsa_pulseaudio.diff --]
[-- Type: text/x-patch, Size: 1623 bytes --]
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 0f727a6e9e..0e037fb24b 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3836,7 +3836,41 @@ programmers to access a standard API to open and decompress media files.")
("hunspell" ,hunspell)
("mesa" ,mesa)
("libass" ,libass)
- ("alsa-lib" ,alsa-lib)
+ ("alsa-lib-with-pulseaudio-plugin"
+ ,(package
+ (inherit alsa-lib)
+ (name "alsa-lib-with-pulseaudio-plugin")
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build union)
+ (guix build utils))
+ #:builder
+ (begin
+ (use-modules (ice-9 match)
+ (guix build union)
+ (guix build utils))
+ (let ((out (assoc-ref %outputs "out")))
+ (match %build-inputs
+ (((names . directories) ...)
+ (union-build out
+ directories
+ #:create-all-directories? #f)
+ #t))
+ ;; do stuff here
+ (find-files (string-append out "/lib/alsa-lib/")
+ (lambda (found stat)
+ (symlink-relative
+ found
+ (string-append
+ out
+ "/lib/"
+ (basename found)))
+ #t)))
+ #t)))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("alsa-plugins:pulseaudio" ,alsa-plugins "pulseaudio")))))
("pulseaudio" ,pulseaudio)
("libx11" ,libx11)
("freetype" ,freetype)
next reply other threads:[~2020-09-26 6:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-26 6:15 Prafulla Giri [this message]
2020-09-26 6:36 ` [bug#43628] Further Info Prafulla Giri
2020-09-26 7:31 ` Prafulla Giri
2020-09-26 9:43 ` Julien Lepiller
2020-09-26 9:57 ` Prafulla Giri
2020-09-26 12:07 ` Prafulla Giri
2020-09-26 14:35 ` Julien Lepiller
2020-09-26 20:46 ` Prafulla Giri
2020-09-26 21:15 ` Julien Lepiller
2020-09-27 5:56 ` Prafulla Giri
2020-09-27 11:09 ` Julien Lepiller
2020-09-28 14:43 ` Prafulla Giri
2020-09-28 15:20 ` Julien Lepiller
2020-09-26 9:51 ` [bug#43628] Progress (?) Prafulla Giri
2020-09-28 17:02 ` [bug#43628] Request for patch evaluation/review Leo Famulari
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFw+=j3HG_a7f8R1p7C6izu+gAyeQ=uJVkijded881cTQcSnag@mail.gmail.com' \
--to=pratheblackdiamond@gmail.com \
--cc=43628@debbugs.gnu.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 public inbox
https://git.savannah.gnu.org/cgit/guix.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).