[alsa-devel] Compilation error for static build of alsa-lib

Takashi Iwai tiwai at suse.de
Fri Dec 7 09:33:24 CET 2012


At Fri, 7 Dec 2012 14:31:10 +0800,
Pankaj DEV wrote:
> 
> When building alsa (using buildroot) for static build, compilation errors occur.
> Don't know how to report bug, since the "bug tracker" link on web-page doesn't open

Report on ML, as usual :)

> The following patch solves the issue :
> --- a/modules/mixer/simple/sbasedl.c
> +++ b/modules/mixer/simple/sbasedl.c
> @@ -27,7 +27,11 @@
> #include <fcntl.h>
> #include <sys/ioctl.h>
> #include <math.h>
> +#ifdef HAVE_LIBDL
> #include <dlfcn.h>
> +#else
> +#define RTLD_NOW  0
> +#endif
> #include "config.h"
> #include "asoundlib.h"
> #include "mixer_abst.h"

This is no correct fix.  The problem was that configure script didn't
set BUILD_MODULES conditional.  It seems due to lack of quotes.  It
used to work with the older automake, but it no longer does.

> diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c
> index 9e9aaf5..03070e0 100644
> --- a/src/mixer/simple_abst.c
> +++ b/src/mixer/simple_abst.c
> @@ -34,7 +34,12 @@
> #include <fcntl.h>
> #include <sys/ioctl.h>
> #include <math.h>
> +#ifdef HAVE_LIBDL
> #include <dlfcn.h>
> +#else
> +#define RTLD_NOW  0
> +#define RTLD_GLOBAL             8
> +#endif
>  #include "config.h"
> #include "asoundlib.h"
> #include "mixer_simple.h"

This is another problem.  simple_abst.c shouldn't be built with no
libdl is available.

Both issues are fixed now in git tree.


thanks,

Takashi


More information about the Alsa-devel mailing list