dlopen() fails upon loading plugins
1) in contrast to my entry above this report concerns libao 0.8.3, not
0.8.2. bugzilla did not offer me to select this version. PLease fix the
corresponding form.
bug report:
after building ogg123 on my solaris7/sparc box i noticed that ogg123 showed
up only with the default drivers. i built the example program in libao's
doc subdirectory and noticed in a gdb session that the calls to dlopen()
failed. A research with google showed that the same problem has been
reported earlier for OpenBSD and for NetBSD. So i enforced the flag to the
dlopen() call to
#define DLOPEN_FLAG (RTLD_LAZY)
and the example program worked.
some thoughts to fix this:
the dlopen() problem occurs on OpenBSD, NetBSD, and possibly FreeBSD, and
it occurs on Solaris7 (and hence probably on most other svr4 systems)
On solaris boxes and the other commercial unices You have to deal with at
least two compilers.
So i suggest to enter a check into the configure script which tests for the
need of RTLD_LAZY or at least the system type and sets a preprocessor
symbol of, say, -DNEEDS_RTLD_LAZY according to the result of the test (or
the system type)
ao_private.h will be changed to check for NEEDS_RTLD_LAZY instead of OpenBSD
Thanks for writing this whole stuff!
Michael Ritzert