Skip to contentSkip to conversation

alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.

PATCH Superseded sonic.adi at gmail.com 5 participants 8 messages Nov 11, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.

From: Sonic Zhang <[email protected]>

Alsa lib depends on the runtime library loader.

---
 package/alsa-lib/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/alsa-lib/Config.in +1 -0
index df05240..1e148cc 100644
@@ -9,6 +9,7 @@ config BR2_PACKAGE_ALSA_LIB
 	# the usage of alsa-lib on no-thread systems is pretty
 	# unlikely, just require thread support globally for alsa-lib.
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_BINFMT_FLAT
 	help
 	  The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
 	  functionality to the Linux operating system.
Signature · 1 line
1.8.2.3
#1 lore raw

PATCH 1/1 alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.

Hello,

Quoted 14 lines · sonic.adi at gmail.com

From: Sonic Zhang <[email protected]>

Alsa lib depends on the runtime library loader.

---
 package/alsa-lib/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/alsa-lib/Config.in +0 -0
index df05240..1e148cc 100644

package/alsa-lib/Config.in config BR2_PACKAGE_ALSA_LIB · line 12

Quoted 4 lines
package/alsa-lib/Config.in +1 -0
@@ -9,6 +9,7 @@ config BR2_PACKAGE_ALSA_LIB
 	# the usage of alsa-lib on no-thread systems is pretty
 	# unlikely, just require thread support globally for alsa-lib.
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_BINFMT_FLAT

I am not sure this is the right dependency. Shouldn't this instead be a:

depends on !BR2_PREFER_STATIC_LIB

?

The problem is really that we need shared library support, no that specifically the FLAT binary format is causing problems. If another binary format doesn't support shared libraries, then we would have to exclude it as well.

Also, the configure script of alsa-lib has a check to verify if dlfcn.h is available or not, so I guess it is supposed to fallback gracefully to another solution if shared library support is not available.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.

Quoted 6 lines · Thomas Petazzoni

I am not sure this is the right dependency. Shouldn't this instead be a:

depends on !BR2_PREFER_STATIC_LIB

?

Quoted 8 lines

The problem is really that we need shared library support, no that specifically the FLAT binary format is causing problems. If another binary format doesn't support shared libraries, then we would have to exclude it as well.

Also, the configure script of alsa-lib has a check to verify if dlfcn.h is available or not, so I guess it is supposed to fallback gracefully to another solution if shared library support is not available.

And with that being said this depend should also propagate to all the packages that select alsa-lib too.
Regards.

#3 lore raw

PATCH 1/1 alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.

Dear Gustavo Zacarias,

Quoted 12 lines · Gustavo Zacarias
Quoted 11 lines · Thomas Petazzoni

I am not sure this is the right dependency. Shouldn't this instead be a:

depends on !BR2_PREFER_STATIC_LIB

?

The problem is really that we need shared library support, no that specifically the FLAT binary format is causing problems. If another binary format doesn't support shared libraries, then we would have to exclude it as well.

Quoted 6 lines
Quoted 3 lines

Also, the configure script of alsa-lib has a check to verify if dlfcn.h is available or not, so I guess it is supposed to fallback gracefully to another solution if shared library support is not available.

And with that being said this depend should also propagate to all the packages that select alsa-lib too.

Which is why I'd like to have a deeper investigation on why alsa-lib unconditionally need <dlfcn.h> :-)

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.

In reply to Thomas Petazzoni

Hi Thomas,

Quoted 24 lines · Thomas Petazzoni

Hello,

Quoted 14 lines · sonic.adi at gmail.com

From: Sonic Zhang <[email protected]>

Alsa lib depends on the runtime library loader.

---
 package/alsa-lib/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/alsa-lib/Config.in +0 -0
index df05240..1e148cc 100644

package/alsa-lib/Config.in config BR2_PACKAGE_ALSA_LIB · line 12

Quoted 4 lines
package/alsa-lib/Config.in +1 -0
@@ -9,6 +9,7 @@ config BR2_PACKAGE_ALSA_LIB
      # the usage of alsa-lib on no-thread systems is pretty
      # unlikely, just require thread support globally for alsa-lib.
      depends on BR2_TOOLCHAIN_HAS_THREADS
+     depends on !BR2_BINFMT_FLAT

I am not sure this is the right dependency. Shouldn't this instead be a:

Quoted 8 lines

depends on !BR2_PREFER_STATIC_LIB

?

The problem is really that we need shared library support, no that specifically the FLAT binary format is causing problems. If another binary format doesn't support shared libraries, then we would have to exclude it as well.

Some alsa-lib code include head file dlfcn.h, which doesn't exist in the FLAT GNU toolchain, while it does in the ELF/FDPIC GNU toolchain. So, alsa-lib has no error with BR2_PREFER_STATIC_LIB is selected in the 2nd case.

Regards,

Sonic

#5 lore raw

PATCH 1/1 alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.

Dear Sonic Zhang,

Quoted 9 lines · Sonic Zhang
Quoted 4 lines

The problem is really that we need shared library support, no that specifically the FLAT binary format is causing problems. If another binary format doesn't support shared libraries, then we would have to exclude it as well.

Some alsa-lib code include head file dlfcn.h, which doesn't exist in the FLAT GNU toolchain, while it does in the ELF/FDPIC GNU toolchain. So, alsa-lib has no error with BR2_PREFER_STATIC_LIB is selected in the 2nd case.

Yes, but it's wrong: if you use <dlfcn.h>, then clearly, you're not a fully static lib system.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 1/1 alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.

In reply to sonic.adi at gmail.com
Quoted 14 lines · sonic.adi at gmail.com

From: Sonic Zhang <[email protected]>

Alsa lib depends on the runtime library loader.

---
package/alsa-lib/Config.in | 1 +

1 file changed, 1 insertion(+)
package/alsa-lib/Config.in +0 -0
index df05240..1e148cc 100644

package/alsa-lib/Config.in config BR2_PACKAGE_ALSA_LIB · line 15

Quoted 7 lines
package/alsa-lib/Config.in +1 -0
@@ -9,6 +9,7 @@ config BR2_PACKAGE_ALSA_LIB
 	# the usage of alsa-lib on no-thread systems is pretty
 	# unlikely, just require thread support globally for alsa-lib.
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_BINFMT_FLAT
 	help
 	  The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
 	  functionality to the Linux operating system.

This dependency should also be added to the comment that checks for threads. It's txt should not be changed, we should only make sure that the comment is only visible when relevant (!flat).

Best regards,
Thomas

#7 lore raw

PATCH 1/1 alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux operating system.

This dependency should also be added to the comment that checks for threads. It's txt should not be changed, we should only make sure that the comment is only visible when relevant (!flat).

And the dependency should also get propagated to alsa-lib's reverse dependencies:

git grep -l 'select BR2_PACKAGE_ALSA_LIB'
package/alsa-lib/Config.in
package/alsa-utils/Config.in
package/alsamixergui/Config.in
package/bluez_utils/Config.in
package/gstreamer/gst-plugins-base/Config.in
package/gstreamer1/gst1-plugins-base/Config.in
package/mpd/Config.in
package/portaudio/Config.in
package/qt/Config.in
package/spice/Config.in

Signature · 1 line
Bye, Peter Korsgaard