BB PB - ldd:FATAL: Could not load library libQtGui.so.4



  • Hello all,

    My setup is:
    KUbuntu 12.10 x86_64

    QtCreator 2.6.3 binary

    Qt 4.8.3 cross-compiled from git using this guide:
    http://qt-project.org/wiki/Building-Qt4-for-BlackBerry**

    It had been installed to the /usr/local/Trolltech/QtLighthouse-4.8.3-arm folder

    I was able to create the debug token, and it shows up fine on my Playbook.

    I have created a blank BB widget based application, and tried to run it on the device, but it fails with the following:

    [code]
    Info: Connecting to target 192.168.0.99:4455
    Info: Authenticating with target 192.168.0.99:4455
    Info: Encryption parameters verified
    Info: Authenticating with target credentials.
    Info: Successfully authenticated with target credentials.
    Info: Sending ssh key to target 192.168.0.99:4455
    Info: ssh key successfully transferred.
    Info: Successfully connected. This application must remain running in order to use debug tools. Exiting the application will terminate this connection.
    Info: Sending request: Launch
    Info: Action: Launch
    Info: Launching com.example.proba1.testDev_mple_proba118047b16...
    result::30978208
    Info: done
    ldd:FATAL: Could not load library libQtGui.so.4
    [/code]

    The bar-descriptor.xml is the stock QtCreator created and contains the following lines:
    [code]
    <env value="app/native/plugins:/usr/lib/qt4/plugins" var="QT_PLUGIN_PATH"/>
    <env value="app/native/lib:/usr/lib/qt4/lib/" var="LD_LIBRARY_PATH"/>
    [/code]

    Something is shows up when I try tor un it on the device, but it is just a flash.



  • I have managed tio get it working in the following way:

    Turn off the shadow building or move your bar-descriptor.xml by hand to the shadow build folder.

    I needed to add the following to my project file
    [code]
    package.target = $${TARGET}.bar
    package.depends = $$TARGET
    package.commands = blackberry-nativepackager
    -devMode -debugToken /home/mm/Dokumentumok/blackberry/debug_token.bar
    -package $${TARGET}.bar -arg -platform -arg blackberry
    bar-descriptor.xml $$TARGET
    -e $$[QT_INSTALL_LIBS]/libQtCore.so.4 lib/libQtCore.so.4
    -e $$[QT_INSTALL_LIBS]/libQtGui.so.4 lib/libQtGui.so.4
    -e $$[QT_INSTALL_LIBS]/libQtOpenGL.so.4 lib/libQtOpenGL.so.4
    -e $$[QT_INSTALL_LIBS]/libQtNetwork.so.4 lib/libQtNetwork.so.4
    -e $$[QT_INSTALL_PLUGINS]/platforms/libblackberry.so plugins/platforms/libblackberry.so
    [/code]

    And I needed to modify the Project's Run settings (sidebar -> Projects, and select the Run under the project):

    Remove the "Create packages" step
    Add a new deploy step with the Add Deploy step:

    • Choose custom process step.
    • Command: make
    • Arguments: [your target app name].bar
      (move it above the Deploy packages step)

    Hit run...
    Wait...
    And be happy :)

    Unfortunatelly this method packs the used Qt libraries to the bar file, which causing some overhead, but I have not been able to figure ut better method.


Log in to reply
 

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