[Pkg-alsa-devel] Bug#639613: Fails to load modules from configuration file
Sjoerd Simons
sjoerd at debian.org
Sun Aug 28 17:01:20 UTC 2011
Package: libasound2
Version: 1.0.24.1-3
Severity: important
Tags: patch
Hey,
With the multi-arch move of libasound-plugins, libasound2 fails to load
modules from the config file. Please copy the
multiarch-safe-dlopen-search-path.patch from the Ubuntu package to work around
this.
Attached for your convenience :)
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libasound2 depends on:
ii libc6 2.13-18 Embedded GNU C Library: Shared lib
ii multiarch-support 2.13-18 Transitional package to ensure mul
libasound2 recommends no packages.
Versions of packages libasound2 suggests:
ii libasound2-plugins 1.0.24-2 ALSA library additional plugins
-- no debconf information
-------------- next part --------------
Description: compile in the ALSA search path instead of relying on ld.so.conf
The Ubuntu package currently uses ld.so.conf.d fragments to add
/usr/lib/alsa-lib and /usr/lib{32,64}/alsa-lib to the dlopen search path.
These don't *belong* on the global search path, and it becomes much more
problematic to put them there with the advent of multiarch because each
architecture then needs its own distinct config file to add the separate
path... which is then also put in the global library namespace. Instead,
let ALSA make use of the already defined ALSA_PLUGIN_DIR to look up plugins.
Author: Steve Langasek <steve.langasek at canonical.com>
Index: alsa-lib-1.0.24.1/src/dlmisc.c
===================================================================
--- alsa-lib-1.0.24.1.orig/src/dlmisc.c
+++ alsa-lib-1.0.24.1/src/dlmisc.c
@@ -67,7 +67,25 @@
#endif
#endif
#ifdef HAVE_LIBDL
- return dlopen(name, mode);
+ /*
+ * Handle the plugin dir not being on the default dlopen search
+ * path, without resorting to polluting the entire system namespace
+ * via ld.so.conf.
+ */
+ void *handle = NULL;
+ char *filename;
+
+ if (name && name[0] != '/') {
+ filename = malloc(sizeof(ALSA_PLUGIN_DIR) + 1 + strlen(name) + 1);
+ strcpy(filename, ALSA_PLUGIN_DIR);
+ strcat(filename, "/");
+ strcat(filename, name);
+ handle = dlopen(filename, mode);
+ free(filename);
+ }
+ if (!handle)
+ handle = dlopen(name, mode);
+ return handle;
#else
return NULL;
#endif
More information about the Pkg-alsa-devel
mailing list