Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
drPetr007
Posts: 43
Registered: ‎10-11-2012
My Device: Z10
My Carrier: none
Accepted Solution

Failed to load libblackberry.so

PlayBook with  firmware 2.1.0.1032 failed to start Qt application with the error :

 

ldd:FATAL: Could not load library libblackberry.so

 

Qt was compiled under Windows 7x64 machine using guide

http://qt-project.org/wiki/Building-Qt4-for-Blackberry

also, i was tring precompiled Qt by bryan99 from here

http://supportforums.blackberry.com/t5/Native-Development/QT-4-8-3-Symbian-components-built-for-ARM-...

but result is the same: ldd:FATAL: Could not load library libblackberry.so

 

Can anybody make it clear what happens ?

 

Thank you

Please use plain text.
Developer
rashm2k
Posts: 18
Registered: ‎10-12-2012
My Device: Playbook
My Carrier: none

Re: Failed to load libblackberry.so

Are you using a .pro file to build you app?

 

I know I had issues with rpath in qmake:

 

http://talk.maemo.org/showthread.php?t=85626

 

do a clean rebuild after you make your changes.

Please use plain text.
Developer
drPetr007
Posts: 43
Registered: ‎10-11-2012
My Device: Z10
My Carrier: none

Re: Failed to load libblackberry.so


rashm2k wrote:

Are you using a .pro file to build you app?

 

I know I had issues with rpath in qmake:

 

http://talk.maemo.org/showthread.php?t=85626

 

do a clean rebuild after you make your changes.


 Thank you for replay, but seems that reason is something else, because libblackberry.so is precompiled and just only loads to device than the app starts. Qmake does not create any influence to libblackberry.so

 

Please use plain text.
Developer
jheron
Posts: 188
Registered: ‎01-27-2012
My Device: playbook
My Carrier: ...

Re: Failed to load libblackberry.so

[ Edited ]

More details please.

What IDE/method are you using to deploy, momentics or Qt-creator?

Lets see more of the log?

Cheers,

Jon

Please use plain text.
Developer
drPetr007
Posts: 43
Registered: ‎10-11-2012
My Device: Z10
My Carrier: none

Re: Failed to load libblackberry.so

[ Edited ]

jheron wrote:

More details please.

What IDE/method are you using to deploy, momentics or Qt-creator?

Lets see more of the log?

Cheers,

Jon


Hello jheron

I use latest version QNX® Momentics IDE for BlackBerry® Native SDK for Tablet OS Version: 2.1.0
Build id: 201206041807

I launch the app within NDK as Release Build with arguments "-platform blackberry". But in both cases with arguments or not i receive in console  only one message

<terminated>  test2(1) [BlackBerry Tablet OS C/C++ Application] test2 on 169.254.0.1

ldd:FATAL: Could not load library libblackberry.so

The library libblackberry.so exists and if I tried to delete it there was another error message

 

 

Please use plain text.
Developer
rashm2k
Posts: 18
Registered: ‎10-12-2012
My Device: Playbook
My Carrier: none

Re: Failed to load libblackberry.so

Clearly ldd can't find the library - thats a fact.

 

There are two ways to resolve this:

 

- Copy the libs to the global lib folder on your device.

- Or you need to set the rpath variable when compiling application.

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Failed to load libblackberry.so

In Run/Debug configuration on Environment tab add LD_LIBRARY_PATH=app/native/lib:app/native/lib/platforms

And make sure you deploy libblackberry.so i.e. in bar-descriptor.xml you have something like:

<asset path="path-to-your-qt-repo/stage/nto/armle-v7/usr/lib/qt4/plugins/platforms/libblackberry.so" type="Qnx/Elf">lib/platforms/libblackberry.so</asset>

Please use plain text.
Developer
drPetr007
Posts: 43
Registered: ‎10-11-2012
My Device: Z10
My Carrier: none

Re: Failed to load libblackberry.so

Thank you comrades !

 

I found my mistake : libblackberry.so must not be added to the Linker in the project settings. After I had deleted it from my Project->propereties- >C/C++ Build->Settings->QCC Linker->Librares all works fine. :Balloon:

 

Please use plain text.