On Wed, 17 Apr 2002, Kasparek Tomas wrote:
> Hi all,
>
> I found some strange behavior of alsa-lib. I tried to compile static
> version for profilling purposes, and it's not working.
>
> The problem is, that sub-libraries for libasound.a are created from
> *.lo objects (produced by libtool). Only alsa-lib/src/*.o ae included
> directly. For .lo files macro SND_DLSYM_BUILD_VERSION() from global.h
> is not called properly. Symbols defined with this macro in .lo files are
> not inserted into "snd_dlsym_start" list. This produces error in
> snd_dlsym.
>
> The problem is in usage of __attribute__ ((constructor)). It seems to me,
> that it does not work properly in .lo objects.
>
> For now, quick solution is to create the archive (libasound.a) by hand.
> You just need to copy all .o files from alsa-lib/src into some directory
> (renaming one of two simple.o files to another name to avoid colision)
> and then running arc cru libasound.a *.o
Have you read the alsa-lib/INSTALL file?
Compilation of static library
-----------------------------
If you would like to use the static ALSA library, you need to use these
options for the configure script:
./configure --enable-shared=no --enable-static=yes
Unfortunately, due to bug in the libtool script, the shared and static
library cannot be built together.
Jaroslav
-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel