Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] alsa-lib: Make alsa mixer lib depend on BR2_PREFER_STATIC_LIB.
@ 2013-11-18  9:41 sonic.adi at gmail.com
  2013-11-19 10:43 ` Gustavo Zacarias
  0 siblings, 1 reply; 2+ messages in thread
From: sonic.adi at gmail.com @ 2013-11-18  9:41 UTC (permalink / raw)
  To: buildroot

From: Sonic Zhang <sonic.zhang@analog.com>

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.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
 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(-)

diff --git a/package/alsa-lib/Config.in b/package/alsa-lib/Config.in
index df05240..58be7a8 100644
--- a/package/alsa-lib/Config.in
+++ b/package/alsa-lib/Config.in
@@ -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"
diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in
index db9f007..d47b892 100644
--- a/package/alsa-utils/Config.in
+++ b/package/alsa-utils/Config.in
@@ -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"
diff --git a/package/alsamixergui/Config.in b/package/alsamixergui/Config.in
index 5b61f38..a43265f 100644
--- a/package/alsamixergui/Config.in
+++ b/package/alsamixergui/Config.in
@@ -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
diff --git a/package/gstreamer/gst-plugins-base/Config.in b/package/gstreamer/gst-plugins-base/Config.in
index 20c2d36..ae9e8b1 100644
--- a/package/gstreamer/gst-plugins-base/Config.in
+++ b/package/gstreamer/gst-plugins-base/Config.in
@@ -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
diff --git a/package/gstreamer1/gst1-plugins-base/Config.in b/package/gstreamer1/gst1-plugins-base/Config.in
index 5b54bab..5dbb88b 100644
--- a/package/gstreamer1/gst1-plugins-base/Config.in
+++ b/package/gstreamer1/gst1-plugins-base/Config.in
@@ -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
diff --git a/package/mpd/Config.in b/package/mpd/Config.in
index 9314984..adb6bc7 100644
--- a/package/mpd/Config.in
+++ b/package/mpd/Config.in
@@ -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
-- 
1.8.2.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH v2] alsa-lib: Make alsa mixer lib depend on BR2_PREFER_STATIC_LIB.
  2013-11-18  9:41 [Buildroot] [PATCH v2] alsa-lib: Make alsa mixer lib depend on BR2_PREFER_STATIC_LIB sonic.adi at gmail.com
@ 2013-11-19 10:43 ` Gustavo Zacarias
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Zacarias @ 2013-11-19 10:43 UTC (permalink / raw)
  To: buildroot

On 11/18/2013 06:41 AM, sonic.adi at gmail.com wrote:

> From: Sonic Zhang <sonic.zhang@analog.com>
> 
> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-19 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-18  9:41 [Buildroot] [PATCH v2] alsa-lib: Make alsa mixer lib depend on BR2_PREFER_STATIC_LIB sonic.adi at gmail.com
2013-11-19 10:43 ` Gustavo Zacarias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox