App crashes (PocketSphinx) as soon as I SIMPLY add qtMultimedia to project



  • Hello there.
    I am using PocketSphinx source code to simply use its 'speechToText' funcionality as described in
    http://snipt.org/GRkl0
    It works perfectly but as soon as I add (in my .pro file) qtMultimedia, application crashes.
    The crashing line is

    @ps = ps_init(config);@

    and message error is:

    /home/teo/Desktop/VoiceSpreader/voiceSpreader-build-desktop-Qt_in_PATH_Debug/voiceSpreader: symbol lookup error: /usr/local/lib/libpocketsphinx.so.1: undefined symbol: err_set_debug_level

    Below the content of my NOT WORKING .pro file

    @
    QT += core gui

    TARGET = voiceSpreader
    TEMPLATE = app

    SOURCES += main.cpp
    cruisecontrol.cpp

    HEADERS += cruisecontrol.h

    FORMS += cruisecontrol.ui

    INCLUDEPATH += /usr/local/include/sphinxbase
    /usr/local/include/pocketsphinx

    LIBS+= -L/usr/local/lib -lpocketsphinx -lsphinxbase -lsphinxad -lpthread -lm

    CONFIG += mobility
    MOBILITY = multimedia
    @

    as soon as I remove the last two lines (after a "clean all") it works like a charm again...

    ? Everything is installed properly, at least qtmultimedia funcionalities works fine in other project on the same machine.
    No other code is used than the one shown in the link (you can easily replicate this crash).

    QtCreator 2.4.1, SDK 4.8.0
    Ubuntu 12.04

    ... any hint?

    TIA


  • Moderators

    I would guess that qt multimedia and your pocketsphinx are using conflicting (versions of) libraries. Stuff like this is annoying to debug:)

    To get started you can check the output of ldd of the qt multimedia and pocketspinx libraries.

    If this is indeed a issue of conflicting symbols, then you will need to rebuild one of your libraries to use the same dependency as the other or put (one or both) of the dependent libraries into a namespace.



  • [SOLVED]

    Thank you, removing qtmobility and building it from source solved the issue!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.