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
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ
Accepted Solution

Could not load library libQtDeclarative.so.4

[ Edited ]

I'm trying to run three of the Cascades demos on the DevAlpha device. I can build the projects to the device, but I just get this error for all of them when they start up:

 

ldd:FATAL: Could not load library libQtDeclarative.so.4

 

I'm using the 10.0.4-beta BB10 NDK.

 

The demos are:

cascadescookbookcpp

weatherguesser

quotes

Retired
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Could not load library libQtDeclarative.so.4


Hello,

 

You could try one of these:

 

* Ensure that the "bar-descriptor.xml" file has the following environment variable (you can view it on the IDE too; right click-> Open with -> Text Editor:

<env
  var="LD_LIBRARY_PATH"
  value="app/native/lib:/usr/lib/qt4/lib"
/>

 

 

 

 

* Ensure that the library is actually present on the device and on the correct path (you can SSH to the device):

http://supportforums.blackberry.com/t5/Testing-and-Deployment/How-to-use-blackberry-connect-to-Enabl... 

 

# pwd
/usr/lib
# find .|grep QtDec
./qt4/lib/libQtDeclarative.so
./qt4/lib/libQtDeclarative.so.4
./qt4/lib/libQtDeclarative.so.4.8
./qt4/lib/libQtDeclarative.so.4.8.0
#

 

 

* If the library is just missing (or a different version one) on the device, you can try to reinstall the device image through the desktop software (however, it might still be a work in progrss for letting you re-install the BlackBerry Dev Alpha build). If you think the device has the libraries fin

 

Let us know any of this helps and feel free to ask away if you have any questions!

 

Cheers.

Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Could not load library libQtDeclarative.so.4

Yea, the env var is there in the descriptor, and the libraries are there on the device =\

 

$ pwd
/usr/lib
$ ls -ails qt4/lib/libQtDeclarative.so* 
   1425        1 lrwxrwxrwx   1 root      nto              25 Apr 26 13:51 qt4/lib/libQtDeclarative.so -> libQtDeclarative.so.4.8.0
   1426        1 lrwxrwxrwx   1 root      nto              25 Apr 26 13:51 qt4/lib/libQtDeclarative.so.4 -> libQtDeclarative.so.4.8.0
   1427        1 lrwxrwxrwx   1 root      nto              25 Apr 26 13:51 qt4/lib/libQtDeclarative.so.4.8 -> libQtDeclarative.so.4.8.0
   1810     5662 -rwxr-xr-x   1 root      nto         2898708 Apr 15 09:48 qt4/lib/libQtDeclarative.so.4.8.0

 

Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Could not load library libQtDeclarative.so.4

[ Edited ]

Trying to connect with the desktop manager just says it failed, and gives me the options to repair or retry. If I select repair then the device reboots while it says checking for updates, but then still fails when it boots back up. I can connect with ssh (clearly, above) and the QDE though. I think I remember desktop manager needing up update yesterday. I could be mistaken but I think it connected okay before the update.

 

Is there another way to reinstall the OS besides desktop manager?

 

----

 

BTW, I did a security wipe on the device to reset what I could, and now connecting the device keeps trying to install drivers but never completes. I'll try just reinstalling the desktop manager tonight.

Highlighted
Retired
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Could not load library libQtDeclarative.so.4

Ouch. So it seems like you might be among the very few unlucky ones who had a different OS image, which seems incompatible against the public SDK, at least for Qt apps (as you can imagine, there were quite a few Dev Alphas going out to the public devs). Can you please share what the OS/build/version number on your device is shown to be?

 

And yes, at this moment, trying to get the OS image re-installed is probably the only solution. However, it seems that the current bundled of DTM 7.1 has a bug (the one you mentioned). 

 

Good news is: The bundle 27 for DTM 7.1 should be coming out within a week and hopefully your problem should go away (i.e. you should be able to install the OS image). In the mean time, you can try reinstalling the desktop software and giving it a couple of more times if you wish.

 

Please bare with us through these inconveniences! I know it must be quite annoying when your code/app is ready but you can't make it run Smiley Happy But you are almost there!

 

Retired
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Could not load library libQtDeclarative.so.4

Forgot to add:

 

You could also try to run the applications on the simulator too, ofcourse. It should be compatible to the public SDK:

https://developer.blackberry.com/devzone/resources/#simulator 

 

 

Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Could not load library libQtDeclarative.so.4

The OS version is 10.0.4.197

Build ID: 196525

Contributor
Posts: 13
Registered: ‎04-11-2012
My Device: Blackberry Playbook, Blackberry 10 Dev Alpha
My Carrier: None

Re: Could not load library libQtDeclarative.so.4

I have the same OS version and build ID. I don't have any issues running any of the cascades demos. I can't really offer more help than that, but if there's anything I can do to help see what's different between our setups let me know... I've used Blackberry Native SDK version 2.1 for OSX, and 10.0.4 for Windows, Linux, and OSX. All without issues.

Not sure which setup I tried all the cascades demos from, but nothing seemed remarkably different in my setups.

Maybe pastebin your project files and bar-descriptor?
Retired
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Could not load library libQtDeclarative.so.4

Any luck with trying to reinstall the device OS?

 

You can also try the following:

 

* Ensure that there is only ONE BlackBerry SDK installed (i.e. no other PlayBook tablet OS SDK installed alongside BlackBerry 10.0.04 SDK). Perhaps you can install them all and install only the BlackBerry 10 beta one; launch it through "bbndk.bat" (which sets up your PC's environment variables etc). Sometimes, having multple SDK's installed could potentially get things confused (although, that is very rare).

 

* Try to make a new app from scratch, through the IDE, after it was installed properly (as opposed to using some of the bundled sample apps or sample apps from github).

Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Could not load library libQtDeclarative.so.4

[ Edited ]

Nah, I can't connect it at all now since the security wipe. So until theres a DTM update or OTA OS update, it'll just have to sit there.

 

(Just keeps saying it has to install drivers, but never does.)

 

I'm on OSX Lion btw.