Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.
@ 2013-11-11  5:02 sonic.adi at gmail.com
  2013-11-11  7:48 ` Thomas De Schampheleire
  2013-11-11 10:21 ` Thomas Petazzoni
  0 siblings, 2 replies; 8+ messages in thread
From: sonic.adi at gmail.com @ 2013-11-11  5:02 UTC (permalink / raw)
  To: buildroot

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

Alsa lib depends on the runtime library loader.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
 package/alsa-lib/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/alsa-lib/Config.in b/package/alsa-lib/Config.in
index df05240..1e148cc 100644
--- a/package/alsa-lib/Config.in
+++ b/package/alsa-lib/Config.in
@@ -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.
-- 
1.8.2.3

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

* [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.
  2013-11-11 10:21 ` Thomas Petazzoni
@ 2013-11-11  7:31   ` Gustavo Zacarias
  2013-11-11 10:43     ` Thomas Petazzoni
  2013-11-11 10:54   ` Sonic Zhang
  1 sibling, 1 reply; 8+ messages in thread
From: Gustavo Zacarias @ 2013-11-11  7:31 UTC (permalink / raw)
  To: buildroot

On 11/11/2013 07:21 AM, Thomas Petazzoni wrote:
> 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.

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

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

* [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.
  2013-11-11  5:02 [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected sonic.adi at gmail.com
@ 2013-11-11  7:48 ` Thomas De Schampheleire
  2013-11-11  9:39   ` Peter Korsgaard
  2013-11-11 10:21 ` Thomas Petazzoni
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas De Schampheleire @ 2013-11-11  7:48 UTC (permalink / raw)
  To: buildroot

sonic.adi at gmail.com wrote:
>From: Sonic Zhang <sonic.zhang@analog.com>
>
>Alsa lib depends on the runtime library loader.
>
>Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
>---
> package/alsa-lib/Config.in | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/package/alsa-lib/Config.in b/package/alsa-lib/Config.in
>index df05240..1e148cc 100644
>--- a/package/alsa-lib/Config.in
>+++ b/package/alsa-lib/Config.in
>@@ -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

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

* [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.
  2013-11-11  7:48 ` Thomas De Schampheleire
@ 2013-11-11  9:39   ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2013-11-11  9:39 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> 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

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.
  2013-11-11  5:02 [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected sonic.adi at gmail.com
  2013-11-11  7:48 ` Thomas De Schampheleire
@ 2013-11-11 10:21 ` Thomas Petazzoni
  2013-11-11  7:31   ` Gustavo Zacarias
  2013-11-11 10:54   ` Sonic Zhang
  1 sibling, 2 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2013-11-11 10:21 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 11 Nov 2013 13:02:57 +0800, sonic.adi at gmail.com wrote:
> From: Sonic Zhang <sonic.zhang@analog.com>
> 
> Alsa lib depends on the runtime library loader.
> 
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> ---
>  package/alsa-lib/Config.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/alsa-lib/Config.in b/package/alsa-lib/Config.in
> index df05240..1e148cc 100644
> --- a/package/alsa-lib/Config.in
> +++ b/package/alsa-lib/Config.in
> @@ -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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.
  2013-11-11  7:31   ` Gustavo Zacarias
@ 2013-11-11 10:43     ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2013-11-11 10:43 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Mon, 11 Nov 2013 04:31:37 -0300, Gustavo Zacarias wrote:
> On 11/11/2013 07:21 AM, Thomas Petazzoni wrote:
> > 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.
> 
> 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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.
  2013-11-11 10:21 ` Thomas Petazzoni
  2013-11-11  7:31   ` Gustavo Zacarias
@ 2013-11-11 10:54   ` Sonic Zhang
  2013-11-11 12:39     ` Thomas Petazzoni
  1 sibling, 1 reply; 8+ messages in thread
From: Sonic Zhang @ 2013-11-11 10:54 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Mon, Nov 11, 2013 at 6:21 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Mon, 11 Nov 2013 13:02:57 +0800, sonic.adi at gmail.com wrote:
>> From: Sonic Zhang <sonic.zhang@analog.com>
>>
>> Alsa lib depends on the runtime library loader.
>>
>> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
>> ---
>>  package/alsa-lib/Config.in | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/package/alsa-lib/Config.in b/package/alsa-lib/Config.in
>> index df05240..1e148cc 100644
>> --- a/package/alsa-lib/Config.in
>> +++ b/package/alsa-lib/Config.in
>> @@ -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.

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

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

* [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected.
  2013-11-11 10:54   ` Sonic Zhang
@ 2013-11-11 12:39     ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2013-11-11 12:39 UTC (permalink / raw)
  To: buildroot

Dear Sonic Zhang,

On Mon, 11 Nov 2013 18:54:27 +0800, Sonic Zhang wrote:

> > 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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2013-11-11 12:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11  5:02 [Buildroot] [PATCH] alsa-lib: FLAT: Disable alsa lib when FLAT bianry is selected sonic.adi at gmail.com
2013-11-11  7:48 ` Thomas De Schampheleire
2013-11-11  9:39   ` Peter Korsgaard
2013-11-11 10:21 ` Thomas Petazzoni
2013-11-11  7:31   ` Gustavo Zacarias
2013-11-11 10:43     ` Thomas Petazzoni
2013-11-11 10:54   ` Sonic Zhang
2013-11-11 12:39     ` Thomas Petazzoni

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