[alsa-devel] Compilation error for static build of alsa-lib
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
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" 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"
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
participants (2)
-
Pankaj DEV
-
Takashi Iwai