dlopen()/festival problem
Jan Kratochvil
jan.kratochvil at redhat.com
Mon Nov 10 15:24:54 UTC 2008
Hi Tim,
On Mon, 10 Nov 2008 14:21:22 +0100, Tim Niemueller wrote:
> So is it intended that the standard runtime linker and dlopen() work
> differently in initializing global variables of a library?
I did not see a problem with this. BTW I would use `g++' instead of
`gcc -lstdc++'.
The problem is in the festival libraries build. They use the default
visibility and their symbol `backtrace':
./speech_tools/siod/slib.cc
LISP backtrace = NIL;
is being overriden by the glibc function `backtrace':
/usr/include/execinfo.h
extern int backtrace (void **__array, int __size) __nonnull ((1));
One apparently cannot write to a .text readonly section as it attempts to.
The package festival should be built with -fvisibility=hidden and specific
global functions/variables marked by `__attribute__ ((visibility("default")))'
as described in `man gcc' -fvisibility and
http://people.redhat.com/drepper/dsohowto.pdf .
As a temporary workaround you may use dlopen() flag RTLD_DEEPBIND.
BTW it is also more effective to use RTLD_LAZY than RTLD_NOW.
Regards,
Jan
More information about the fedora-devel-list
mailing list