All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: alsalib symbol problem
@ 2002-09-17 14:46 Juergen Kreileder
  2002-09-17 14:59 ` Paul Davis
  0 siblings, 1 reply; 7+ messages in thread
From: Juergen Kreileder @ 2002-09-17 14:46 UTC (permalink / raw)
  To: Paul Davis; +Cc: Tim Goetze, Florian Bomers, alsa-devel

Paul Davis <pbd@op.net> writes:

> the problem is that libasound itself calls dlopen(), and the initial
> (non-RTLD_GLOBAL) linkage hasn't put libasound's symbol into the
> global namespace. hence, libasound's own dlopen'ed code can't access
> libasound itself.

I know, that's why I suggested to not do dlopen(NULL, ...) inside
libasound (see the code from my previous mail).


        Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux/java2-status/


-------------------------------------------------------
Sponsored by: AMD - Your access to the experts on Hammer Technology! 
Open Source & Linux Developers, register now for the AMD Developer 
Symposium. Code: EX8664 http://www.developwithamd.com/developerlab

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: alsalib symbol problem
@ 2002-09-17 13:35 Juergen Kreileder
  2002-09-17 13:57 ` Paul Davis
  2002-09-17 15:32 ` Jaroslav Kysela
  0 siblings, 2 replies; 7+ messages in thread
From: Juergen Kreileder @ 2002-09-17 13:35 UTC (permalink / raw)
  To: Tim Goetze; +Cc: Florian Bomers, alsa-devel

Tim Goetze <tim@quitte.de> writes:

> Florian Bomers wrote:
> 
>>Why does this happen ? I searched the mailing list archive and only
>>found an explanation that symbols don't match and I need to
>>recompile the ALSA lib. In my case it's a clean install of ALSA on a
>>newly installed red hat system. There was never any other version of
>>ALSA.
> 
> you probably are calling alsa from a shared object -- try 
> 
>   dlopen ("libasound.so", RTLD_LAZY | RTLD_GLOBAL);
> 
> in your module's init function.

The need for RTLD_GLOBAL is somewhat ugly, usually one wants to load
plugins with RTLD_LOCAL.  E.g. Java's System.load()/loadLibrary()
doesn't use RTLD_GLOBAL.  We could make a special case for ALSA in our
Java implementation but that won't help people running JMF with
another JVM.

Is there any reason ALSA can't do something like 

   if (name == NULL) {
       Dl_info dlinfo;
       static int dummy;
       dladdr((void *) &dummy, &dlinfo);
       name = dlinfo.dli_fname;
   }

in snd_dlopen()?  This would fix the snd_dlopen(NULL, ...) problem
when the ALSA library has been dlopened with RTLD_LOCAL and the
symbols are unknown in the main program.


        Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux/java2-status/


-------------------------------------------------------
Sponsored by: AMD - Your access to the experts on Hammer Technology! 
Open Source & Linux Developers, register now for the AMD Developer 
Symposium. Code: EX8664 http://www.developwithamd.com/developerlab

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

end of thread, other threads:[~2002-09-17 18:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E17rJn3-0005Ec-00@zaphod.blackdown.de>
2002-09-17 15:10 ` alsalib symbol problem Juergen Kreileder
2002-09-17 15:39   ` Florian Bomers
2002-09-17 18:14     ` Tim Goetze
2002-09-17 18:21       ` Florian Bomers
2002-09-17 14:46 Juergen Kreileder
2002-09-17 14:59 ` Paul Davis
2002-09-17 15:17   ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2002-09-17 13:35 Juergen Kreileder
2002-09-17 13:57 ` Paul Davis
2002-09-17 15:32 ` Jaroslav Kysela

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.