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

Re: Could not load library libQtDeclarative.so.4

I've upgraded the device to 10.0.6, as well as the SDK and I am getting this error on the HelloVideoCamera sample:

https://github.com/blackberry/Cascades-Community-Samples/tree/master/HelloVideoCamera

 

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

 

Build ouput:

**** Build of configuration Device-Release for project HelloVideoCamera ****

make Device-Release 
/tools/rim/blackberry-10-ndk-10.0.6/host_10_0_6_1/darwin/x86/usr/bin/qmake -spec unsupported/blackberry-armv7le-g++ -o arm/Makefile HelloVideoCamera.pro CONFIG+=device
WARNING: Failure to find: ../src/*.h
WARNING: Failure to find: ../src/*.h
/tools/rim/blackberry-10-ndk-10.0.6/host_10_0_6_1/darwin/x86/usr/bin/qmake -spec unsupported/blackberry-x86-g++ -o x86/Makefile HelloVideoCamera.pro CONFIG+=simulator
WARNING: Failure to find: ../src/*.h
WARNING: Failure to find: ../src/*.h
make -C ./arm -f Makefile release
make[1]: Entering directory `/workspace-momentics/Cascades-Community-Samples/HelloVideoCamera/arm'
make -f Makefile.Release
make[2]: Entering directory `/workspace-momentics/Cascades-Community-Samples/HelloVideoCamera/arm'
qcc -Vgcc_ntoarmv7le -lang-c++ -Wl,-rpath-link,/tools/rim/blackberry-10-ndk-10.0.6/target_10_0_6_384/qnx6/armle-v7/lib -Wl,-rpath-link,/tools/rim/blackberry-10-ndk-10.0.6/target_10_0_6_384/qnx6/armle-v7/usr/lib -Wl,-O1 -o o.le-v7/HelloVideoCamera o.le-v7/.obj/hellovideocameraapp.o o.le-v7/.obj/main.o o.le-v7/.obj/moc_hellovideocameraapp.o    -L/tools/rim/blackberry-10-ndk-10.0.6/target_10_0_6_384/qnx6/armle-v7/lib -L/tools/rim/blackberry-10-ndk-10.0.6/target_10_0_6_384/qnx6/armle-v7/usr/lib -L/tools/rim/blackberry-10-ndk-10.0.6/target_10_0_6_384/qnx6/armle-v7/usr/lib/qt4/lib -L/tools/rim/blackberry-10-ndk-10.0.6/lib -lm -lbps -lcamapi -lscreen -lbb -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lQtXmlPatterns -lQtXml -lQtGui -lQtNetwork -lQtCore 
make[2]: Leaving directory `/workspace-momentics/Cascades-Community-Samples/HelloVideoCamera/arm'
make[1]: Leaving directory `/workspace-momentics/Cascades-Community-Samples/HelloVideoCamera/arm'

**** Build Finished ****

 

Please use plain text.
BlackBerry Development Advisor (Retired)
s_rashid
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Could not load library libQtDeclarative.so.4

@mreed: For reference, would you please disclose the exact build/version numbers for both your SDK and the device's OS?

 

Thanks.

Please use plain text.
Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Could not load library libQtDeclarative.so.4

Device:

OS Version: 10.0.6.386

Build ID: 255944

 

Momentics:

Version: 10.0.6

Build id: v201207130407

 

$ pwd
/usr/lib
$ ls -ails qt4/lib/libQtDeclarative.so*
   1149        1 lrwxrwxrwx   1 root      nto              25 Jul 12 23:59 qt4/lib/libQtDeclarative.so -> libQtDeclarative.so.4.8.0
   1150        1 lrwxrwxrwx   1 root      nto              25 Jul 12 23:59 qt4/lib/libQtDeclarative.so.4 -> libQtDeclarative.so.4.8.0
   1151        1 lrwxrwxrwx   1 root      nto              25 Jul 12 23:59 qt4/lib/libQtDeclarative.so.4.8 -> libQtDeclarative.so.4.8.0
   1534     5662 -rwxr-xr-x   1 root      nto         2898796 Jun 21 17:08 qt4/lib/libQtDeclarative.so.4.8.0

 

Please use plain text.
Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Could not load library libQtDeclarative.so.4

[ Edited ]

Okay.... so now its working. In Momentics I had a target set up at 169.254.57.121 because thats what came up from auto-discover at one point when I was back on 10.0.4. I just deleted it and did auto-discover again and it used 169.254.0.1.

 

When it was on *.57.121 it was still connecting and installing the application, but gave this libQtDeclarative error. After switching to *.0.1 it connects, installs and runs the application fine.

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 660
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Could not load library libQtDeclarative.so.4

[ Edited ]

So your code compiles and links okay, but you get the ldd error when executing it on the target?

When moving projects between NDK versions, I usually have to clean out stale .o files, so I wonder if you have any leftovers from a previous install.  Make sure you clean your project.  In fact, just go wipe out your copy of HelloVideoCamera and pull a clean copy down from github to rebuild.

 

Can you please check on your build machine:

ls -l /tools/rim/blackberry-10-ndk-10.0.6/target_10_0_6_384/qnx6/armle-v7/usr/lib/qt4/lib/libQtDec*

 

And then check on your dev alpha for:

ls -l /usr/lib/qt4/lib/libQtDec*

 

Cheers,

Sean

 

 

EDIT: and I'm late on the reply :smileyhappy:   the problem could have been stale files that got cleaned up when you deleted and re-added the target.

Please use plain text.
Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Could not load library libQtDeclarative.so.4

Thanks for the reply Sean. I don't think it was stale files, I had already cleaned those out when I switched from the 10.0.4 SDK to 10.0.6 because it was complaining about libbb.so.0.

Please use plain text.
Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Could not load library libQtDeclarative.so.4

Its gotta be something with connecting to the device... After rebooting the device I am getting this again. Development mode is on. Resetting the target IP isn't working this time.

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 660
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Could not load library libQtDeclarative.so.4

Can you launch your app from the navigator by tapping on it?  Or are you exclusively trying to launch it via the IDE?

Tried unplugging and flipping dev mode off and back on before replugging?  Have you considered connecting via WiFi instead?

Can the IDE even connect to the target?  (eg. in target navigator / system information perspective) ?

Please use plain text.
Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Could not load library libQtDeclarative.so.4

[ Edited ]

I get the same results when launching through the IDE vs tapping on it. Also the same when installing through USB vs WiFi from the IDE. I've tried turning dev mode on and off multiple times (and unplugging). The IDE says its connected to the target. Target Navigator shows the target and qconn underneath it, and I can launch an SSH session through it.

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 660
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Could not load library libQtDeclarative.so.4

that's truly bizarre.  feel free to email me your .bar file and I'll see if someone can sanity check it.  - smcveigh at qnx.com

Please use plain text.