Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Wed Jul 15, 2015 9:18 am

It is possible you are missing some required packages on your system. The instructions I followed to build that qt package gives a long list of required packages needed for compiling Qt. See here: http://wiki.qt.io/Native_Build_of_Qt5_on_a_Raspberry_Pi

Most of the packages listed there are for development purposes and should not be required to run Qt programs but some are regular user packages, I notice there are xcb related libraries in the list. I suggest you make sure you have all those packages installed:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install gstreamer-tools gstreamer0.10-plugins-good gstreamer0.10-plugins-bad libxcb1 libx11-xcb1 libxcb-keysyms1 libxcb-image0 libxcb-shm0 libxcb-sync0 libxcb-render-util0 libxrender-dev libxcb-icccm4
Memory in C++ is a leaky abstraction .

Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Wed Jul 15, 2015 9:19 am

sachusanal,

OK, 128M for the GPU seems quite fine.

See my post above.
Memory in C++ is a leaky abstraction .

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Wed Jul 15, 2015 10:11 am

Hai I installed all the packages which you telling.
now also nothing should be running
it will stuck in the command
pi@raspberrypi ~/Qt_Canvas_drawing $ export QT_QPA_EGLFS_PHYSICAL_HEIGHT=100
pi@raspberrypi ~/Qt_Canvas_drawing $ export QT_QPA_EGLFS_PHYSICAL_WIDTH=100
pi@raspberrypi ~/Qt_Canvas_drawing $ export QT_QPA_EGLFS_DEPTH=50
pi@raspberrypi ~/Qt_Canvas_drawing $ ./Qt_Canvas_drawing -platform xcb

please help me

User avatar
topguy
Posts: 6993
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: QT application running reg

Wed Jul 15, 2015 11:00 am

* Setting EGLFS parameters have no effect unless you are using "-platform eglfs".
* I'm pretty sure eglfs will use whole screen anyway.
* DEPTH = 50 doesn't sound like a good value, 24 or 32 are normal color-depths.

What do you mean by "stuck" ?

Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Wed Jul 15, 2015 12:10 pm

sachusanal,

So adding those xcb related packages did not help to get "./Qt_Canvas_drawing -platform xcb" running. I am afraid I have no idea why that might be.

As topguy says those EGLFS parameters are not required when using -platform xcb only for -platform eglfs

And yes when you run using eglfs your application takes over the entire screen in which to draw it's window.

I suggest you try eglfs again:

$ ./Qt_Canvas_drawing -platform eglfs

Can you confirm that Qt_Canvas_drawing does actually work when you build it on your PC using Qt5 ?

I am at a loss to know what is wrong with this.

At this point I would start adding debug statements to my source to see that it does actually get to interesting parts of my code. Starting from main.

A few things come to mind:

1) Are you running on an old Pi or a Pi 2 ? I have never actually tried this on the newer Pi.

2) I still wonder if your using Debian is an issue. I have never used Debian on a Pi only Raspbian.
Memory in C++ is a leaky abstraction .

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Thu Jul 16, 2015 3:26 am

hi
$ ./Qt_Canvas_drawing -platform eglfs i tried out this one also but it also stucking at the same point.
this application is working on my windows pc .application have no problem.
i am using the Raspberry pi 2 board.
this is urgent one...
it u can solve this issue means please help me to build cross compiler on machine.
i am using Raspibian latest image image, which is downloaded from the raspberry site.

Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Thu Jul 16, 2015 10:20 am

sachusanal,

At this point you need to apply your analytic skills to the problem.

OK you program crashes or hangs. But it works elsewhere. Why?

First off I would be checking that my tools are working properly. This is normally done by building the simplest possible program, building it and trying to run it. Usually that is a simple program that prints "Hello World". Despite this being a GUI dev system I suggest you create such a program on your PC, use the qt debug statement to print "hello world" from a simple main(). When that works move it to the Pi and see if it works there. No GUI stuff at this stage.

If that works we then need to test again with the simplest possible GUI program, just open a single main window and write "Hello world" into it. Again create one on your PC, when it works move it to the Pi and see if it builds and runs there.

If that works we can progressively try more and more features until we have enough to get your app working.

This process can of course fail at any step but at least we learn something about why and can perhaps fix it.

Or another test, build and run a program that is known to work when built with that qt package like this one: https://github.com/openwebos/qt/tree/ma ... pengl/cube
Memory in C++ is a leaky abstraction .

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Mon Jul 20, 2015 9:14 am

I dont think it so my application is ruuning . because when i list out process by using psc command my application is not in the list.
I already tried out the hello world application also it also not working in the setup.
please help me to solve this issue
its an urgent one.....

User avatar
topguy
Posts: 6993
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: QT application running reg

Mon Jul 20, 2015 2:52 pm

So far you have only shown us what happens up to this point:

Code: Select all

pi@raspberrypi ~/Qt_Canvas_drawing $ ./Qt_Canvas_drawing -platform xcb
But its what happens after that which could be interesting.

Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Mon Jul 20, 2015 4:24 pm

No, his error output is given as:

$ ./Qt_Canvas_drawing -platform xcb
This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen.

Reinstalling the application may fix this problem.
Aborted
$
Memory in C++ is a leaky abstraction .

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Tue Jul 21, 2015 3:37 am

Hi ,
I already tried out the eglfs , xcb and other .
all the thing have the same out put.
when i execting the ./Qt_Canvas_drawing -platform xcb / ./Qt_Canvas_drawing -platform eglfs
nothing shown in the display and also i list out process from the prcoess list i can analysis that my application is not running.

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Tue Jul 21, 2015 8:12 am

couil u please share me an application which is running properly in u r setup (http://the.linuxd.org/qt-5-2-for-raspberry-pi/)

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Fri Sep 11, 2015 3:35 am

Hi,

As per our discussion QT in raspberry pi is working fine.Thank you for your valuable support.Also kindly tell me which all modules are supported in this QT.Is qtmultimedia module supported in this QT?If not how to reconfigure the QT in raspberry pi?Kindly help.

Thanks,
Sachu

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Fri Sep 11, 2015 3:45 am

Hi Heater,

Also when i tried to run a video in QT,it showed the error media service not available.Kindly help with suggestions how to make this work?

Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Fri Sep 11, 2015 4:52 am

I'm sorry to say I have no experience of using video from Qt.
Memory in C++ is a leaky abstraction .

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Fri Sep 11, 2015 4:59 am

Hi heater ,

let me know when u build the qt native build u select the mediaplayed packages

Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Fri Sep 11, 2015 10:36 am

sachusanal,

Are you using my build of Qt5 as I mentioned before in this post:
viewtopic.php?f=63&t=114586#p788509
?

I'm sorry but cannot say any more about that than I have written in that post and on the blog post that it links to. Everything I know about it came from the instructions for building Qt5 that I have also linked to there.

That build of mine is getting a bit old now. I would suggest you install Qt5 from the deb packages for Raspbian here: https://twolife.be/raspbian which I imagine are more up to date.
Memory in C++ is a leaky abstraction .

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Fri Sep 11, 2015 10:52 am

hai
i am using u r build http://the.linuxd.org/qt-5-2-for-raspberry-pi/

could you please help me how can install package from this link https://twolife.be/raspbian/
following this link i cant understand nothing how to install the package and how to do that one....

User avatar
topguy
Posts: 6993
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: QT application running reg

Fri Sep 11, 2015 11:39 am

You use the information on twolife.be page together with this info: https://wiki.debian.org/SourcesList to add an new software repository and then you install the packages you need with "apt-get install" ( as usual ).

I suggest that you start with a blank raspbian image or else you might get conflicts with Heaters files.

Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Fri Sep 11, 2015 11:45 am

sachusanal,

I have never done this before but others here have said that the two life packages work.

1) Create the file /etc/apt/sources.list.d/twolife.list

With the following content:

Code: Select all

deb https://twolife.be/raspbian/ wheezy main backports
deb-src https://twolife.be/raspbian/ wheezy main backports
2) Add the required package key to your system:

Code: Select all

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 2578B775
3) Update your system:

Code: Select all

$ sudo apt-get update
$ sudo apt-get upgrade
4) Now you can install the Qt5 packages from twolife. To be honest I'm not sure which packages you need to install but I would start with:

Code: Select all

$ sudo apt-get install qt5-default
$ sudo aptqt5-qmake
There are a lot of other qt5 related packages, libraries and so on, that you can find with "$ apt-cache search qt5"

Good luck. Let us know how you get on.
Memory in C++ is a leaky abstraction .

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Mon Sep 14, 2015 6:08 am

Hi Heater/topguy

I added the twolife.list to sources.list.d without changing the raspbian image.when i tried to add the package key, got the result as key 2578B775 not changed.I am not able to do sudo apt-get update.Kindly help.

Thanks,
Sachu

Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Mon Sep 14, 2015 7:54 am

There is a video describing how to install twolife qt5 packages here.
https://www.youtube.com/watch?v=xgSHaYd5aX4
He has put step by step instructions in the notes for that video.

If these steps no longer work I'm afraid I don't know what to suggest.
Memory in C++ is a leaky abstraction .

sachusanal
Posts: 29
Joined: Thu Jun 25, 2015 10:51 am

Re: QT application running reg

Mon Sep 14, 2015 8:08 am

Hi Heater/topguy,

Both the steps sudo apt-get update & sudo apt-get upgrade were successful.But I could not install libqt5multimedia5 since I could not install some of its dependencies from this repository.eg libqtcore5a libqtgui5 etc...Kindly suggest me from where I can install these.

Thanks,
sachu

Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Mon Sep 14, 2015 8:35 am

sachusanal,

OK, it seems we have a problem here. Recently PeterO tried using the Qt5 packages from twolife and also could not make it work. I did not realize it was broken (or perhaps we are missing some vital instructions about it). So lets forget about two life.

That leaves going back to building qt5 from sources.

The steps I took to do that were as follows:

The aim here is to be able to build GUI apps using Qt5 that run in the frame buffer of the Raspberry Pi or under X and use GLES.

The motivation for wanting to use the frame buffer is that X on the Pi is rather slow and ultimately one wants to use webgl in a QT webview which seems to be the only way that is ever going to happen.

If you would like a ready to use Qt5.2 package see below.

Having tried and failed building Qt5 from various different instructions I finally found a recipe that actually works:
http://qt-project.org/wiki/Native_Build ... spberry_Pi
Be warned this build takes a long time!

Getting it to work successfully required:

1) Put all the working files on an external USB hard drive.
2) Set the amount of memory set aside for graphics on the Pi as small as possible.
3) Use a swap file on the hard drive.

Or use the package I built.

The complete Qt5.2 package ready to use is posted to DropBox and can fetched and installed as follows:

$ wget https://dl.dropboxusercontent.com/u/812 ... .2-rpi.tgz
$ tar xvzf qt5.2-rpi.tgz$ rm qt5.2-rpi.tgz
$ sudo mv qt5 /opt
$ ln -s /opt/qt5 /usr/local/qt5

You will need to set some environment variables, This can be done by adding the following to /etc/profile or your ~/.bashrc file.

$ export PATH=${PATH}:/usr/local/qt5/bin
$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/qt5/lib
$ export QT_PLUGIN_PATH=/usr/local/qt5/plugins

Do check your raspi's memory split. Qt will need 64MB or so to give it some room.

The suggested test of building the Qt's OpenGL cube demo worked as advertised just qmake and make in the cubes project directory.

To run Qt apps under X Windows specify the fcb platform plugin

$ myApp -platform xcb

To run directly into the frame buffer, no X Windows required, use the eglfs plugin:

$ myApp -platform eglfs

Thanks to lpcamargo for testing this and suggesting corrections to the setup procedure. He has blogged about it in Portuguese here (Chrome translates this to English nicely):

http://lpcamargo.blogspot.com.br/2014/0 ... rrypi.html
Memory in C++ is a leaky abstraction .

Heater
Posts: 17431
Joined: Tue Jul 17, 2012 3:02 pm

Re: QT application running reg

Mon Sep 14, 2015 8:42 am

sachusanal,

Hey, important update: There is an update to the instructions of building Qt5.4.1 on the raspberry pi here:

https://wiki.qt.io/Native_Build_of_Qt_5 ... spberry_Pi
Memory in C++ is a leaky abstraction .

Return to “General discussion”