[PATCH] libdl: rudimentary locking for dlopen/dlsym/dlclose

Hein Tibosch hein_tibosch at yahoo.es
Mon May 7 20:01:52 UTC 2012


On 5/5/2012 5:02 PM, Timo Teras wrote:
> On Fri, 4 May 2012 12:52:12 -0400 Mike Frysinger <vapier at gentoo.org>
> wrote:
>
>> On Friday 04 May 2012 06:10:02 HeinBali wrote:
>>>> I just spent a long time wondering why all of the ALSA utilities
>>>> crashed right after start-up: Buildroot had selected the standard
>>>> Linux thread type (PTHREADS_OLD)
>> the locking code is pthread-implementation independent.  there's no
>> reason i can see that this would require NPTL.
>> -mike
> Sounds like linking order issue, or the fact that the dlopen() loads a
> library requring libpthreads (but the main binary does not). Try
> linking explicitly the main app against libpthreads. This is still an
> issue with PTHREADS_OLD, but I fixed it earlier for NPTL.

I found out why PTHREADS_OLD would never work for me:

At the global (builroot) level PTHREADS_OLD was defined
whereas uClibc was creating libraries as "UCLIBC_HAS_THREADS_NATIVE=y"

Now ALSA works with both thread types... as long as they're matching.

Hein



More information about the uClibc mailing list