Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 792570 - media-libs/alsa-lib-1.2.4 doesn't compile on musl
Summary: media-libs/alsa-lib-1.2.4 doesn't compile on musl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL: https://github.com/alsa-project/alsa-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-28 01:31 UTC by CFuga
Modified: 2021-05-28 01:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Upstream patch for undeclared snd_plugin_dir_set / snd_plugin_dir vars (ad8c8e5503980295dd8e5e54a6285d2d7e32eb1e.patch,961 bytes, patch)
2021-05-28 01:32 UTC, CFuga
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description CFuga 2021-05-28 01:31:07 UTC
There's a compilation bug in alsa-lib-1.2.4, triggered by musl + undefined variables.

libtool: compile:  i686-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src -I../include -I/var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/include -march=i486 -mtune=i686 -Os -pipe -c /var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/dlmisc.c  -fPIC -DPIC -o .libs/dlmisc.o
/var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/dlmisc.c: In function 'snd_dlpath':
/var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/dlmisc.c:95:7: error: 'snd_plugin_dir_set' undeclared (first use in this function)
   95 |  if (!snd_plugin_dir_set) {
      |       ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/dlmisc.c:95:7: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/dlmisc.c:98:4: error: 'snd_plugin_dir' undeclared (first use in this function)
   98 |    snd_plugin_dir = strdup(env);
      |    ^~~~~~~~~~~~~~
make[2]: *** [Makefile:539: dlmisc.lo] Error 1

It's already fixed by upstream. I'll attach the patch to this bug report.

Reproducible: Always
Comment 1 CFuga 2021-05-28 01:32:19 UTC
Created attachment 711822 [details, diff]
Upstream patch for undeclared snd_plugin_dir_set / snd_plugin_dir vars
Comment 2 Larry the Git Cow gentoo-dev 2021-05-28 01:41:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5636983cd1c5a681e22e28b3a115c168f80f693d

commit 5636983cd1c5a681e22e28b3a115c168f80f693d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-05-28 01:40:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-05-28 01:40:56 +0000

    media-libs/alsa-lib: fix musl build
    
    Closes: https://bugs.gentoo.org/792570
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/alsa-lib/alsa-lib-1.2.4.ebuild          |  3 +-
 .../alsa-lib/files/alsa-lib-1.2.4-musl.patch       | 32 ++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)