dlopen()/festival problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi C/C++ developers.

I'm having an interesting problem with Festival on F-9/F-8 and I'm not
sure whether it is a problem with dlopen(), or Festival, or if I'm just
trying something stupid. Maybe someone here has a clue or point me
somewhere I should look into to solve it:

I'm developing a software which uses shared objects (.so) as plugins.
One of those plugins provides speech synthesis via Festival. The problem
is now that it crashes at a very specific position in the speech_tools
library that comes with Festival. There are module-global variables in a
.cc file which are not properly initialized, but only if the lib is
opened via dlopen(). If I put it directly into main, or link the main
program that dlopen()s the festival plugin against the festival lib
everything works fine.

So is it intended that the standard runtime linker and dlopen() work
differently in initializing global variables of a library? Or am I
trying something not meant to work?

I have put code to illustrate the problem at
http://fedorapeople.org/~timn/festival/. To get it working do:

- install festival-devel, festival-speechtools-devel, festival-debuginfo
(if you want to see the backtrace in gdb)

- First as root you have to move some files as the festival package has
a longstanding bug (#242607), which I'm going to fix this as soon as I
got this sorted.
# cd /usr/include/speech_tools
# mv unix/EST/EST_* unix/
# mv instantiate/EST/instantiate/EST_T* instantiate/
# mv sigpr/EST/EST_* sigpr/
# mv ling_class/EST/EST_* ling_class/

- Download all files of the code from
http://fedorapeople.org/~timn/festival/. It has a simple Makefile to
build the code.

- the festival binary simply uses festival and directly links against
festival and should work just fine

- The uselib binary will dlopen() festival_lib.so (which is the custom
plugin and not the festival library itself) and then tries to execute
festival_initialize() where it fails with a segfault which can be traced
down to uninitialized global variables.


Anyone with an idea what's going wrong, what's broken or what I'm trying
that is stupid?

Thank you,
	Tim

-- 
    Tim Niemueller <tim@xxxxxxxxxxxxx>      www.niemueller.de
=================================================================
 Imagination is more important than knowledge. (Albert Einstein)

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux