alsa-lib: Make alsa mixer lib depend on BR2_PREFER_STATIC_LIB.
PATCH v2 1/1 alsa-lib: Make alsa mixer lib depend on BR2_PREFER_STATIC_LIB.
From: Sonic Zhang <[email protected]>
The mixer in ALSA library depends on runtime library loader which doesn't available if building for static library.
Propagate this dependency to package alsa-utils, alsamixergui, gstreamer, gstreamer1 and mpd as well.
--- package/alsa-lib/Config.in | 1 + package/alsa-utils/Config.in | 8 ++++++-- package/alsamixergui/Config.in | 3 ++- package/gstreamer/gst-plugins-base/Config.in | 5 ++++- package/gstreamer1/gst1-plugins-base/Config.in | 5 ++++- package/mpd/Config.in | 5 ++++- 6 files changed, 21 insertions(+), 6 deletions(-)
package/alsa-lib/Config.in +1 -0
@@ -51,6 +51,7 @@ config BR2_PACKAGE_ALSA_LIB_ALOAD config BR2_PACKAGE_ALSA_LIB_MIXER bool "mixer" default y + depends on !BR2_PREFER_STATIC_LIB config BR2_PACKAGE_ALSA_LIB_PCM bool "pcm"
package/alsa-utils/Config.in +6 -2
@@ -24,25 +24,29 @@ config BR2_PACKAGE_ALSA_UTILS_ALSACTL config BR2_PACKAGE_ALSA_UTILS_ALSAMIXER bool "alsamixer" + depends on BR2_PACKAGE_ALSA_LIB_MIXER select BR2_PACKAGE_NCURSES select BR2_PACKAGE_NCURSES_TARGET_PANEL select BR2_PACKAGE_NCURSES_TARGET_FORM select BR2_PACKAGE_NCURSES_TARGET_MENU - select BR2_PACKAGE_ALSA_LIB_MIXER depends on BR2_USE_WCHAR default y comment "alsamixer needs a toolchain w/ wchar" depends on !BR2_USE_WCHAR + depends on !BR2_PACKAGE_ALSA_LIB_MIXER config BR2_PACKAGE_ALSA_UTILS_AMIDI select BR2_PACKAGE_ALSA_LIB_RAWMIDI bool "amidi" config BR2_PACKAGE_ALSA_UTILS_AMIXER - select BR2_PACKAGE_ALSA_LIB_MIXER + depends on BR2_PACKAGE_ALSA_LIB_MIXER bool "amixer" +comment "amixer needs alsa mixer lib" + depends on !BR2_PACKAGE_ALSA_LIB_MIXER + config BR2_PACKAGE_ALSA_UTILS_APLAY select BR2_PACKAGE_ALSA_LIB_PCM bool "aplay/arecord"
package/alsamixergui/Config.in +2 -1
@@ -2,10 +2,10 @@ config BR2_PACKAGE_ALSAMIXERGUI depends on BR2_PACKAGE_XORG7 depends on BR2_INSTALL_LIBSTDCPP depends on BR2_USE_MMU # fltk fork() + depends on BR2_PACKAGE_ALSA_LIB_MIXER select BR2_PACKAGE_FLTK select BR2_PACKAGE_ALSA_LIB select BR2_PACKAGE_ALSA_LIB_PCM - select BR2_PACKAGE_ALSA_LIB_MIXER depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib bool "alsamixergui" help
@@ -16,3 +16,4 @@ config BR2_PACKAGE_ALSAMIXERGUI comment "alsamixergui needs a toolchain w/ C++, threads" depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_PACKAGE_ALSA_LIB_MIXER
package/gstreamer/gst-plugins-base/Config.in +4 -1
@@ -75,10 +75,13 @@ comment "plugins with external dependencies (there may be more available)" config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ALSA bool "alsa (mandatory for audio playback)" + depends on BR2_PACKAGE_ALSA_LIB_MIXER select BR2_PACKAGE_ALSA_LIB - select BR2_PACKAGE_ALSA_LIB_MIXER select BR2_PACKAGE_ALSA_LIB_PCM +comment "alsa plugin needs alsa mixer lib" + depends on !BR2_PACKAGE_ALSA_LIB_MIXER + config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_OGG bool "ogg (*.ogg audio/video)" select BR2_PACKAGE_LIBOGG
package/gstreamer1/gst1-plugins-base/Config.in +4 -1
@@ -109,12 +109,15 @@ comment "plugins with external dependencies" config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA bool "alsa (mandatory for audio playback)" + depends on BR2_PACKAGE_ALSA_LIB_MIXER select BR2_PACKAGE_ALSA_LIB - select BR2_PACKAGE_ALSA_LIB_MIXER select BR2_PACKAGE_ALSA_LIB_PCM help ALSA plugin library +comment "alsa plugin needs alsa mixer lib" + depends on !BR2_PACKAGE_ALSA_LIB_MIXER + config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TREMOR bool "tremor" select BR2_PACKAGE_TREMOR
package/mpd/Config.in +4 -1
@@ -21,11 +21,14 @@ config BR2_PACKAGE_MPD_ALSA default y select BR2_PACKAGE_ALSA_LIB select BR2_PACKAGE_ALSA_LIB_PCM - select BR2_PACKAGE_ALSA_LIB_MIXER depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + depends on BR2_PACKAGE_ALSA_LIB_MIXER help Enable alsa output support. +comment "alsa support needs alsa mixer library" + depends on !BR2_PACKAGE_ALSA_LIB_MIXER + config BR2_PACKAGE_MPD_AO bool "ao" select BR2_PACKAGE_LIBAO
Signature · 1 line
1.8.2.3
PATCH v2 1/1 alsa-lib: Make alsa mixer lib depend on BR2_PREFER_STATIC_LIB.
Quoted 7 lines · sonic.adi at gmail.com
From: Sonic Zhang <[email protected]>
The mixer in ALSA library depends on runtime library loader which doesn't available if building for static library.
Propagate this dependency to package alsa-utils, alsamixergui, gstreamer, gstreamer1 and mpd as well.
I'm not convinced this can't be worked around, and also think that depending on tiny bits for usual options isn't all that friendly (example: alsamixer depending on the mixer component of alsa-lib rather than selecting it becomes almost a hidden option).
From a quick look at the source of alsa-lib lack of dl functions is kind of expected/handled (see src/dlmisc.c), it probably just broke in recent releases or just wasn't completely finished.
Did you try fixing it up with some additional #ifdef guards in the offending places?
Regards.