
Originally Posted by
nrabara
hi thajan,
I have found the similar problem..
Did you find the solution??
If yes, please let me know??
Hi there,
I contacted the people at Qt and it is a common error caused by compiler optimizations present in G++ 4.2.x and higher. This also explains why it DOES work in debug mode, because it excludes several optimization options.
They had several solutions to get rid of the optimization issue:
(i) Use a 4.1 compiler
(ii) Drop the "-O2" value of the QMAKE_CFLAGS_RELEASE in "mkspecs/common/g++.conf" to "-O1".
(iii) Edit "mkspecs/qws/linux-arm-g++/qmake.conf" and turn off some compiler optimizations that seem to give some problems like so:
QMAKE_CFLAGS_RELEASE += -fomit-frame-pointer -finline-functions -funroll-loops -falign-functions=2 -falign-loops=2 -falign-jumps=2
QMAKE_CFLAGS_RELEASE += -fomit-frame-pointer -finline-functions -funroll-loops -falign-functions=2 -falign-loops=2 -falign-jumps=2
To copy to clipboard, switch view to plain text mode
NOTE: Fill in the right values for "-falign-functions -falign-loops -falign-jumps" that fit with your CPU.
Don't forget to run "make confclean" after you edit the file.
All options (changing compiler was not an option), however, did not work properly for me. I had to drop the compilerflag to "-O0", which had an, to me, unacceptable slow performance.
In staid I had to change the following line in "src/gui/embedded/qscreenlinuxfb.cpp":
From:
canaccel = useOffscreen();
canaccel = useOffscreen();
To copy to clipboard, switch view to plain text mode
To:
canaccel = false;
canaccel = false;
To copy to clipboard, switch view to plain text mode
I found this out by filling the file with qDebug()'s and see where it went wrong.
NOTE: This is a HACK, and not a pretty one either. It makes sure that it hardcoded doesn't use off-chip graphic memory. I don't use off-chip graphic memory, but if you do, this hack is useless.
Bookmarks