All of lore.kernel.org
 help / color / mirror / Atom feed
* libasound and libpthread
@ 2002-07-29  8:06 Thomas Roeder
  2002-07-29 12:05 ` Paul Davis
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Roeder @ 2002-07-29  8:06 UTC (permalink / raw)
  To: alsa-devel

Hi all,

I am working with Alsa 0.9.0beta12 version and I am also using posix 
threads (libpthread) in my project. In the release version of the 
program I link both libraries (libpthread, libasound) dynamically and 
everything works well. In the debug version however, I have to do static 
linking of the libpthread for proper debugging.

Here is the problem:

If I try to link libasound dynamically and libpthread statically, the 
program crashes with a segmentation fault before even reaching the first 
line of my code (maybe, because libasound uses multithreading and 
libpthread itself ?).
If I try to link both statically, the program runs at least some line of 
code, until it reaches the sound initialization. Then it crashes again 
with the following messages:

ALSA lib conf.c:2540:(snd_config_hook_load) Unable to find field files 
in the preload section
ALSA lib conf.c:1785:(snd_config_hooks_call) function 
snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:2127:(snd_config_update) hooks failed, removing 
configuration



Any help is appreciated.

Thanks in advance

Thomas



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

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

* Re: libasound and libpthread
  2002-07-29  8:06 libasound and libpthread Thomas Roeder
@ 2002-07-29 12:05 ` Paul Davis
  2002-07-29 13:40   ` Abramo Bagnara
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Davis @ 2002-07-29 12:05 UTC (permalink / raw)
  To: Thomas Roeder; +Cc: alsa-devel

>I am working with Alsa 0.9.0beta12 version and I am also using posix 
>threads (libpthread) in my project. In the release version of the 
>program I link both libraries (libpthread, libasound) dynamically and 
>everything works well. In the debug version however, I have to do static 
>linking of the libpthread for proper debugging.

why? i use pthreads a great deal, and i have never had to do this.

and no, libasound does not use pthreads or any other form of threads.

--p


-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

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

* Re: libasound and libpthread
  2002-07-29 12:05 ` Paul Davis
@ 2002-07-29 13:40   ` Abramo Bagnara
  2002-07-29 15:15     ` Thomas Roeder
  2002-07-29 16:00     ` Paul Davis
  0 siblings, 2 replies; 7+ messages in thread
From: Abramo Bagnara @ 2002-07-29 13:40 UTC (permalink / raw)
  To: Thomas Roeder; +Cc: Paul Davis, alsa-devel

Paul Davis wrote:
> 
> >I am working with Alsa 0.9.0beta12 version and I am also using posix
> >threads (libpthread) in my project. In the release version of the
> >program I link both libraries (libpthread, libasound) dynamically and
> >everything works well. In the debug version however, I have to do static
> >linking of the libpthread for proper debugging.
> 
> why? i use pthreads a great deal, and i have never had to do this.
> 
> and no, libasound does not use pthreads or any other form of threads.

Thomas, you should know to not rely too strong to Paul's words.

He own a big heart, but unfortunately a big mouth too, that he's often
unable to keep under control ;-)

Some portions of libasound *do* use pthreads.

-- 
Abramo Bagnara                       mailto:abramo.bagnara@libero.it

Opera Unica                          Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy


-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

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

* Re: libasound and libpthread
  2002-07-29 13:40   ` Abramo Bagnara
@ 2002-07-29 15:15     ` Thomas Roeder
  2002-07-29 16:04       ` Paul Davis
  2002-07-29 16:00     ` Paul Davis
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Roeder @ 2002-07-29 15:15 UTC (permalink / raw)
  To: Alsa-devel

Abramo Bagnara wrote:

> Paul Davis wrote:
> 
>>>I am working with Alsa 0.9.0beta12 version and I am also using posix
>>>threads (libpthread) in my project. In the release version of the
>>>program I link both libraries (libpthread, libasound) dynamically and
>>>everything works well. In the debug version however, I have to do static
>>>linking of the libpthread for proper debugging.
>>>
>>why? i use pthreads a great deal, and i have never had to do this.
>>



More precisely, I would like to do some breakpoint debugging. The only 
way I know of doing this with multithreaded programs, is to link 
libpthread statically (and I tried this with gdb).
Anyway, the question to me is, are there in general for some reasons 
problems to be expected, when linking libasound statically or is it only 
in connection with multithreading or is it because of some unknown error 
of mine ?


>>and no, libasound does not use pthreads or any other form of threads.
>>
> 
> Thomas, you should know to not rely too strong to Paul's words.
> 
> He own a big heart, but unfortunately a big mouth too, that he's often
> unable to keep under control ;-)
> 
> Some portions of libasound *do* use pthreads.
> 
> 

I hope I did'nt raise any kind of fight between the two of you :-) .

Thanks for your comments

Regards Thomas



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

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

* Re: libasound and libpthread
  2002-07-29 13:40   ` Abramo Bagnara
  2002-07-29 15:15     ` Thomas Roeder
@ 2002-07-29 16:00     ` Paul Davis
  2002-07-29 17:34       ` Patrick Shirkey
  1 sibling, 1 reply; 7+ messages in thread
From: Paul Davis @ 2002-07-29 16:00 UTC (permalink / raw)
  To: Abramo Bagnara; +Cc: Thomas Roeder, alsa-devel

>Paul Davis wrote:
>> 
>> >I am working with Alsa 0.9.0beta12 version and I am also using posix
>> >threads (libpthread) in my project. In the release version of the
>> >program I link both libraries (libpthread, libasound) dynamically and
>> >everything works well. In the debug version however, I have to do static
>> >linking of the libpthread for proper debugging.
>> 
>> why? i use pthreads a great deal, and i have never had to do this.
>> 
>> and no, libasound does not use pthreads or any other form of threads.
>
>Thomas, you should know to not rely too strong to Paul's words.
>
>He own a big heart, but unfortunately a big mouth too, that he's often
>unable to keep under control ;-)

its true. mea culpa. 

this is what we get for a library containing large chunks of code and
functionality not used by anyone except its author :)

is there anyone on the list except abramo or jaroslav that have ever
used the "shared" PCM device type?

--p



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

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

* Re: libasound and libpthread
  2002-07-29 15:15     ` Thomas Roeder
@ 2002-07-29 16:04       ` Paul Davis
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Davis @ 2002-07-29 16:04 UTC (permalink / raw)
  To: Thomas Roeder; +Cc: Alsa-devel

>More precisely, I would like to do some breakpoint debugging. The only 
>way I know of doing this with multithreaded programs, is to link 
>libpthread statically (and I tried this with gdb).

% gdb some-dynamically-linked-code
gdb> br main
gdb> run ...args...
Breakpoint 1: ....
gdb> br some_function_in_a_dynamically_linked_library
gdb  c

for code loaded by dlopen() and its cousins and wrappers, the
breakpoint needs to be something other than main - use something
called, or a line reached after the dlopen() call has happened.

--p


-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

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

* Re: libasound and libpthread
  2002-07-29 16:00     ` Paul Davis
@ 2002-07-29 17:34       ` Patrick Shirkey
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick Shirkey @ 2002-07-29 17:34 UTC (permalink / raw)
  To: Paul Davis; +Cc: Abramo Bagnara, alsa-devel

Paul Davis wrote:
>>Paul Davis wrote:
>>
>>>>I am working with Alsa 0.9.0beta12 version and I am also using posix
>>>>threads (libpthread) in my project. In the release version of the
>>>>program I link both libraries (libpthread, libasound) dynamically and
>>>>everything works well. In the debug version however, I have to do static
>>>>linking of the libpthread for proper debugging.
>>>
>>>why? i use pthreads a great deal, and i have never had to do this.
>>>
>>>and no, libasound does not use pthreads or any other form of threads.
>>
>>Thomas, you should know to not rely too strong to Paul's words.
>>
>>He own a big heart, but unfortunately a big mouth too, that he's often
>>unable to keep under control ;-)
> 
> 
> its true. mea culpa. 
> 
> this is what we get for a library containing large chunks of code and
> functionality not used by anyone except its author :)
> 
> is there anyone on the list except abramo or jaroslav that have ever
> used the "shared" PCM device type?
> 

I have looked into it but cannot see clear reason for using it.


-- 
Patrick Shirkey - Boost Hardware Ltd.
For the discerning hardware connoisseur
Http://www.boosthardware.com
Http://www.boosthardware.com/LAU/guide/
========================================



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

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

end of thread, other threads:[~2002-07-29 17:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-29  8:06 libasound and libpthread Thomas Roeder
2002-07-29 12:05 ` Paul Davis
2002-07-29 13:40   ` Abramo Bagnara
2002-07-29 15:15     ` Thomas Roeder
2002-07-29 16:04       ` Paul Davis
2002-07-29 16:00     ` Paul Davis
2002-07-29 17:34       ` Patrick Shirkey

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.