[alsa-devel] [PATCH] ALSA: lib: Fix static linking of libasound
Hi,
Attached is a patch from Samuel Thibault that fixes static linking of libasound.a (forwarded from Debian bug report #522544).
Thanks, -Dan
On Tue, 28 Dec 2010, Daniel Chen wrote:
Hi,
Attached is a patch from Samuel Thibault that fixes static linking of libasound.a (forwarded from Debian bug report #522544).
Is any reason to ignore this configure settings mentined in the INSTALL file for the static library build?
./configure --enable-shared=no --enable-static=yes
It's mainly libtool issue and having static hacks in the dynamic library does not make much sense.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
On Sat, Jan 1, 2011 at 10:07 AM, Jaroslav Kysela perex@perex.cz wrote:
Is any reason to ignore this configure settings mentined in the INSTALL file for the static library build?
./configure --enable-shared=no --enable-static=yes
It's mainly libtool issue and having static hacks in the dynamic library does not make much sense.
According to Samuel in the Debian bug report, "when both static & dynamic linking is enabled, automake gets it wrong and uses only the dynamic objects."
Is the best course of action here to do a two-pass build, one with "--enable-shared=no --enable-static=yes" and another with "--enable-shared=yes --enable-static=no", simply copying the desired libasound.a from the second pass?
Thanks, -Dan
On Sat, 1 Jan 2011, Daniel Chen wrote:
On Sat, Jan 1, 2011 at 10:07 AM, Jaroslav Kysela perex@perex.cz wrote:
Is any reason to ignore this configure settings mentined in the INSTALL file for the static library build?
./configure --enable-shared=no --enable-static=yes
It's mainly libtool issue and having static hacks in the dynamic library does not make much sense.
According to Samuel in the Debian bug report, "when both static & dynamic linking is enabled, automake gets it wrong and uses only the dynamic objects."
Is the best course of action here to do a two-pass build, one with "--enable-shared=no --enable-static=yes" and another with "--enable-shared=yes --enable-static=no", simply copying the desired libasound.a from the second pass?
Yes, I believe, it's the right way to compile both types of library binaries.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
'Twas brillig, and Jaroslav Kysela at 01/01/11 23:42 did gyre and gimble:
On Sat, 1 Jan 2011, Daniel Chen wrote:
On Sat, Jan 1, 2011 at 10:07 AM, Jaroslav Kysela perex@perex.cz wrote:
Is any reason to ignore this configure settings mentined in the INSTALL file for the static library build?
./configure --enable-shared=no --enable-static=yes
It's mainly libtool issue and having static hacks in the dynamic library does not make much sense.
According to Samuel in the Debian bug report, "when both static & dynamic linking is enabled, automake gets it wrong and uses only the dynamic objects."
Is the best course of action here to do a two-pass build, one with "--enable-shared=no --enable-static=yes" and another with "--enable-shared=yes --enable-static=no", simply copying the desired libasound.a from the second pass?
Yes, I believe, it's the right way to compile both types of library binaries.
Shouldn't the argument then be one that is mutually exclusive then?
e.g. --build-type=[shared||static]
Col
When I call snd_pcm_hw_params_set_format() to set up a new format, it seems to call following in order and none of them is setting up the format bit?
snd_pcm_hw_params_set_format() -> snd_pcm_hw_param_set() -> _snd_pcm_hw_param_set() -> snd_mask_refine_set() -> snd_mask_single() + snd_mask_leave()
I am using "plughw:0,0" as the device name, and I think it is using pcm_plugin.c for the master and pcm_hw.c for the slave? If I can use pcm_plug.c, then it should finally call snd_mask_set() from another function snd_pcm_hw_params() with the following call order:
snd_pcm_hw_params -> _snd_pcm_hw_params -> pcm->ops->hw_params() which is snd_pcm_plug_hw_params() -> snd_pcm_plug_hw_refine_schange -> snd_pcm_format_mask_set -> snd_mask_set
In order to use pcm_plug.c, how do I setup the device name?
Thanks, Philip
On Mon, 3 Jan 2011, Philip Chu wrote:
When I call snd_pcm_hw_params_set_format() to set up a new format, it seems to call following in order and none of them is setting up the format bit?
snd_pcm_hw_params_set_format() -> snd_pcm_hw_param_set() -> _snd_pcm_hw_param_set() -> snd_mask_refine_set() -> snd_mask_single() + snd_mask_leave()
Please, post or analyze snd_pcm_hw_params_dump() output before and after snd_pcm_hw_params_set_format() call.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
participants (4)
-
Colin Guthrie
-
Daniel Chen
-
Jaroslav Kysela
-
Philip Chu