Hilpara
Posts: 5
Joined: Mon Feb 25, 2013 4:54 pm

Qt cross developement

Mon Feb 25, 2013 5:12 pm

I have "succesfully" run the bakeqtpi script to get all necessary files for cross compiling Qt things to Pi. I have also configured Qt Creator accordingly. Compiling and deploying are successfull (helloworld example on from beginners guide) but when I try to run the project nothing happens. I also tried to run the file directly from pi (from LXTerminal) but same result. No warnings, nothing. The program just starts and I can see from activity monitor that something happens for few seconds and then activity goes back to zero and nothing happens.
Then I have followed other guides with the same results. Now I'm in a stand that when I try to run this helloworld program from PC I'll get:

Code: Select all

Cant find EGLConfig, returning null config
Unable to find an X11 visual which matches EGL config 0
Could not initialize EGL
bash: line 1:  3112 Aborted                 DISPLAY=:0.0 /home/pi/helloworld/helloworld
Any ideas? Other project which I tried and again deployed says when running:

Code: Select all

Cant find EGLConfig, returning null config
Unable to find an X11 visual which matches EGL config 0

and after a while the program crashes if my mouse is in window:

Code: Select all

The X11 connection broke (error 2). Did the X11 server die?
Running the same code from Qt Creator I get:

Code: Select all

Cant find EGLConfig, returning null config
Unable to find an X11 visual which matches EGL config 0
I'm hopeless. I have been trying to get this to work for a month already. And tried at least 4 different guides with the same results. I hope somebody can help me.

Hilpara

Hilpara
Posts: 5
Joined: Mon Feb 25, 2013 4:54 pm

Re: Qt cross developement

Mon Feb 25, 2013 5:28 pm

I forgot to mention that, if I try to debug a code I will get immediately

Code: Select all

The inferior stopped because it received a signal from the Operating System.

Signal name : 
SIGSEGV
Signal meaning : 
Segmentation fault
Hilpara

-rst-
Posts: 1317
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: Qt cross developement

Mon Feb 25, 2013 5:29 pm

Is that Qt5? Is it even supposed to work under X? Maybe exit LXDE and try running from the 'real' commanline...

Are you familiar with this thread http://www.raspberrypi.org/phpBB3/viewt ... 66&t=15861
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

Hilpara
Posts: 5
Joined: Mon Feb 25, 2013 4:54 pm

Re: Qt cross developement

Mon Feb 25, 2013 6:12 pm

Yes Qt5. If I try to run it from commandline I will get: QXcbConnection: Could not connect to display.
Update:
Now I'm able to get those to run with -platform eglfs. But I still can't debug the code. Immediate segfault.

Hilpara
Posts: 5
Joined: Mon Feb 25, 2013 4:54 pm

Re: Qt cross developement

Mon Feb 25, 2013 10:09 pm

The debug problem is also now solved. I took a different debugger (from http://hertaville.com/2012/09/28/develo ... -compiler/ ). No more segfaults. :)

zia_7575
Posts: 11
Joined: Thu Oct 18, 2012 6:39 am

Re: Qt cross developement

Wed Mar 06, 2013 11:19 am

Hey,

I follow the following tutorial.
http://qt-project.org/wiki/RaspberryPi_Beginners_guide

when I try to set up qt version in qt creator. It says that "qt version is not installed properly. please sudo make install".
please can anyone help me on this,.. :(

Regards,
Zia

-rst-
Posts: 1317
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: Qt cross developement

Wed Mar 06, 2013 11:38 am

You should check if you have qmake in the correct path (/usr/local/qt5pi/bin/qmake) - i.e. did the base build succeed - or maybe the path is slightly different?

Or you could try the ready-made stuff from here http://twolife.be/raspbian/ (add those two lines to the apt conf and use 'apt-get install qt5'...)
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

zia_7575
Posts: 11
Joined: Thu Oct 18, 2012 6:39 am

Re: Qt cross developement

Thu Mar 07, 2013 9:52 am

Hey..

There is no error during compilation except few modules does not install like qtsensors, qt3d etc..

When I add path of qmake in qtversion. I get the error attached in pic..

and for ready-made stuff I added the two lines like this in apt.conf file..

Acquire::http::proxy "deb http://twolife.be/raspbian/ wheezy main";
Acquire::http::proxy "deb-src http://twolife.be/raspbian/ wheezy main";

and when i use sudo apt-get install qt5.. it gives error "E: Unable to locate package qt5".... :(
Attachments
oie_7103654fFCwTc4D(1).png
oie_7103654fFCwTc4D(1).png (57.41 KiB) Viewed 15972 times

jyavenard
Posts: 8
Joined: Thu Jan 17, 2013 7:23 am

Re: Qt cross developement

Mon Sep 30, 2013 12:32 am

Have you found a solution to your problem?

Using the qt5 packages from http://twolife.be/raspbian/; I experience the same issue.

I tried to compile the Qt5 cube example, which too fail to run:
$ DISPLAY=:0.0 ./cube
Cant find EGLConfig, returning null config
Unable to find an X11 visual which matches EGL config 0
Could not initialize EGL
Aborted

any ideas?

Bardo
Posts: 1
Joined: Fri Jul 11, 2014 12:08 pm

Re: Qt cross developement

Fri Jul 11, 2014 12:14 pm

Hi!

I think i've found a solution: try to execute your application with the '-platform eglfs' option.

Seems like the xcb platform plugin (used by default) doesn't work fine on the Raspberry.

PD: I beg you pardon on my english; it's not my native language, and i'm still learning :D

Return to “C/C++”