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
dkonigs
Posts: 241
Registered: ‎07-25-2008
My Device: Bold 9900

How to get QML preview working in Linux

This is kinda a continuation of this Native forum thread:

http://supportforums.blackberry.com/t5/Native-Development/QML-Preview-not-working-in-Fedora/td-p/170...

And this JIRA bug ticket:

https://www.blackberry.com/jira/browse/TOOL-1041

 

So the first issue is that two 32-bit libraries are required, that aren't mentioned upfront in the docs.  Thus, you need to install the following packages:

$ sudo apt-get install libpng3:i386 libosmesa6:i386

 

Next, if you've installed any graphics drivers above and beyond what's shipped with Ubuntu, like the NVidia proprietary drivers, you'll still have problems.  The trick is to make sure that libQtCascades-IDE.so (the library that implements QML preview) only sees Mesa's OpenGL library.  You can do this, by setting the right LD_LIBRARY_PATH.  For example, this is the script I use to start the IDE:

 

. /opt/RIM/bbndk-10.0.4-beta/bbndk-env.sh
export LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu/mesa:$LD_LIBRARY_PATH
/opt/RIM/bbndk-10.0.4-beta/host/linux/x86/usr/qde/eclipse/qde "$@"

 

Now lets say you're like me, and run Fedora on your machine(s)...  (I actually installed Ubuntu on my laptop, so RIM would acknowledge by bug reports, but I'm not reinstalling my desktop.)  You still have options.  You just need access to an Ubuntu machine and/or repository.

 

The first thing you need to do is grab the uncommon versions of libjpeg, libpng, and libosmesa that are required, from an Ubuntu machine or repository.  (URLs in the linked forum thread)  Then, you also need to dig up the right 32-bit Ubuntu versions of Mesa's libGL.so.* (/usr/lib/i386-linux-gnu/mesa/) and libglapi.so.* (/usr/lib/i386-linux-gnu/).  These may be included with the same packages, but I don't rememeber.  I just copied them off my laptop.

 

Once you've collected all these library, put them in some convenient directory and update the LD_LIBRARY_PATH string in the above script to point to it.

 

I should also mention that I've discovered a strange bug on my laptop, where it looks like the color channels are swapped in the QML preview window.  (you won't notice it until you care if something is red or green).  However, my desktop (which is far less of a "supported" configuration) doesn't have this problem at all.

 

Finally, as proof I got this working, here's a screenshot from my desktop:

 

bbndk-weather-01.png

Please use plain text.
Contributor
marioboikov
Posts: 30
Registered: ‎05-24-2012
My Device: Developer
My Carrier: Developer

Re: How to get QML preview working in Linux

Thanks dude!

 

This was exaclty what I needed.

Please use plain text.
New Developer
cirno
Posts: 11
Registered: ‎06-23-2012
My Device: Playbook
My Carrier: Megafon

Re: How to get QML preview working in Linux

dkonigs, could you please look and say md5 of libGL.so and libglapi.so? By the way I can't find anywhere in packages libglapi.so, at ubuntu x86. Or upload your whole folder with libs somewhere.

 

Thanks.

Please use plain text.
Developer
dkonigs
Posts: 241
Registered: ‎07-25-2008
My Device: Bold 9900

Re: How to get QML preview working in Linux

These are the Ubuntu packages for those two remaining libraries:

http://packages.ubuntu.com/oneiric-updates/libs/libglapi-mesa
http://packages.ubuntu.com/oneiric-updates/libs/libgl1-mesa-glx

Just download the i386 versions, unpack them, and put the libraries somewhere in the LD_LIBRARY_PATH you set before launching the NDK IDE.

Please use plain text.
New Developer
cirno
Posts: 11
Registered: ‎06-23-2012
My Device: Playbook
My Carrier: Megafon

Re: How to get QML preview working in Linux

Oh, I used wrong version of libglapi. Thanks! :smileyhappy:
Please use plain text.
Developer
blackqtcoder
Posts: 145
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: How to get QML preview working in Linux

Wow ! You're my hero !!  :Clap:

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Please use plain text.
New Developer
cirno
Posts: 11
Registered: ‎06-23-2012
My Device: Playbook
My Carrier: Megafon

Re: How to get QML preview working in Linux

There is new problem, libpng versions conflict. :/ Are you using Fedora 17? Or 16?

 

Here is log message in terminal:

libpng warning: Application built with libpng-1.2.40 but running with 1.5.10
/home/cirno/Development/Blackberry/bbndk-10.0.4-beta/host/linux/x86/usr/bin/qde: line 5: 10563 Segmentation fault (core dumped) $IDE_QNX_HOST/usr/qde/eclipse/qde "$@"

 

 

Please use plain text.
Developer
dkonigs
Posts: 241
Registered: ‎07-25-2008
My Device: Bold 9900

Re: How to get QML preview working in Linux

I"m still on Fedora 16 here, so I have "libpng12.so.0.49.0" installed normally, as well as "libpng.so.3.49.0" to satisfy the special dependencies of libQtCascades-IDE.so.

Please use plain text.
New Developer
cirno
Posts: 11
Registered: ‎06-23-2012
My Device: Playbook
My Carrier: Megafon

Re: How to get QML preview working in Linux

Yep, fedora upped libpng in 17. I tried copying libraries from fedora 16 to separate folder; now images are working, but Momentics still crashing. Next to try chrooting and X forwarding. Or else I'll stick with windows laptop and emulating on linux desktop.
Please use plain text.
Contributor
bunny1985
Posts: 12
Registered: ‎11-13-2012
My Device: Z10, q10
My Carrier: freelancer

Re: How to get QML preview working in Linux

Any update? There is no progress on linux qml preview from months , either nothing is mentioned about it in roadmap. Any chnces to get it working on linux ?

Please use plain text.