Qt5.1 on Rasberry Pi (full install not cross-compile)
-
I know, I just linked them so that you are aware of them ;) I think both are rather outdated, too.
-
OK, the wiki page is done!
Can someone please test this with a clean raspbian image and let me know if the configure script changes are still necessary?
"http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi":http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi
I hope this helps everyone.
-
Thanks, I've tagged the page. I'll probably test once I get a Raspberry.
-
Thanks for your input, sierdzio and postmako.
I'm trying to build using some instructions i had previously found (using some from cross-compile using a desktop machine and for build to Linux desktop).
It´s already compiling for almost a day now (after 2 unsuccessful attempts). If it doesn't work i will try postmako approach.Once again, thanks for your instructions postmako, because the only instructions i could find related to the RPi were using cross-compile with a desktop machine.
-
Yeah let me know how the instructions work for you. Note that you should use the instructions at the wiki link because I have updated and corrected them when I ran the compilation a second time. The configure script changes are required in order to get it to compile those modules.
Enjoy...
-
Hi, postmako
I'm now following your instructions because my other attempt failled after 2 days compiling...
I started last night, so it's been compiling for only 24h. Tomorrow i will let you know how it went.Tell me one thing, because i want to build apps using the X windows, not from console, do i need to do the part related to the .bashrc? You should also say this in the wiki you created and if it's necessary to do anything else for x windows.
On your instructions i have 4 remarks:
1- you should include that it's necessary to do sudo apt-get install git (if it's not installed), in order to use git.
2- when you say "Then before closing the file search for QT_CFLAGS_FONTCONFIG in the configure script. It should be below the above entries, you need to change the one in the if statement to this:"
If i understood correctly you should say it's in the else (which is empty) part of the if .
3- you should say where .bashrc is located and the full file name bash.bashrc.
4- previously stated about X windows.I only stated some things that may be obvious for those who are used to Linux, but not for me (little experience on Linux).
Once again, thanks for your instructions.
-
- Did you use the May 23rd Raspbian version? Mine had git installed already.
- Yeah, this is a bit unclear and that is why I included the diff file.
- Yeah the .bashrc I was referring to is located at ~/.bashrc but you can modify the bash.bashrc file as well (at least I think you can.) Let me know if it works.
- I'm not sure what else you need to do for x-windows but I think you still need the directories set-up in the .bashrc file even for x-windows otherwise it will not know where qmake or Qt5 is located.
-
Hi postmako.
I wasn't using May 23rd version, i was using one older.
I asked about .bashrc, because i couldn't find it, because it's a hidden file (at least in my version it's hidden).
My installation was ok and i could run the cube example like you said.But now i have two other problems.
I can't find the qtcreator exec in X windows.
The second one is that i need to use qtserialport and when i tried to build the example project using terminal i get unknow module in Qt: serialport. Why is that? In my other machine, running Ubuntu, when i installed Qt5.1 all modules (including qtserialport) are installed.
Can you help me with these 2 problems?Thanks for your time.
-
To get qtcreator follow these instructions but use your Qt5.1 instead of Qt4 like the instructions state: "http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&t=43545":http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&t=43545
After you try that, please let me know if it works for you or not. I will probably try it if I find some time.
I'm able to compile with QtSerialPort, could you post your source code and the "*.pro" file for it? If that looks good then I would like to see your "output" file from the compilation to see if something got missed or skipped over. It could also be that your older version of Raspbian doesn't support it. It's hard to say and maybe someone who is more informed than me could help you.
-
Hi.
The instructions you told me, i think they will install for Qt4, because using
- sudo apt-get install Qtcreator
it will install Qt creator 2.5 (Qt4.8)
but i will try it...Related to qserialport, i tried to build the example project enumerator and it gave me the error.
-
For qserialport i think i have to build the module.
I will try qmake, make and make install for the module.For Qt creator 2.7 i think it will also have to be built, not exactly sure how.
I will try to get it from git and after using also qmake, make and make install.
Let's see how it goes... -
For qserialport i tried to build the module like i said in my previous post, it compiled the module but when i tried the example enumerator, i get as before, unknown module.
-
Please post your .pro file and make sure you have this line in it:
QT += serialportRerun qmake, then make.
Also, you do NOT want to follow those instructions on Raspberry Pi. I just tried and couldn't get Qt5 to work with it because it installs QtCreator 2.5 and you need 2.6.1 to run Qt5.
Compiling that for the Raspberry Pi seems like another good wiki.
-
I'm starting the build from git for version 2.8.0:
@cd ~
git clone git://gitorious.org/qt-creator/qt-creator.git
cd qt-creator/
qmake -r@I just ran this but getting an error:
@...
Reading /home/pi/qt-creator/src/plugins/fakevim/fakevim.pro
Reading /home/pi/qt-creator/src/plugins/designer/designer.pro
Project ERROR: Unknown module(s) in QT: designercomponents designer@ -
Qserialport is already working.
I had forgot to do sudo make install.Now Qt creator is another thing...
Looking at your previous post, it seems you might have to build and install that module...Tomorrow (here its 2 a.m.) i will try it also.
Also, can you tell me how can i close the window when i run my app?
I get it fullscreen...Thanks
-
I tried what you did but i get a different error:
- Project ERROR: Unknown module(s) in QT: script
-
Not sure on those unknown module errors. I'll have to look at them when I get more time.
Regarding the closing the app, if you are in the console Ctrl+Alt+Backspace works, Ctrl+C might work as well. In x-windows, I haven't figured out which key combo works but in your app you can add a this->close(); in the main window class wherever appropriate.
-
I'm now trying to compile and install qtscript module and after if i get your error i will do the same with qttools (it seems to be related to designer).
-
Yeah I was pretty sure mine compiled qttools because the .obj directory is populated (FYI - In Linux anytime a file or directory starts with a period (.), the file or directory will be hidden), but it still complains about designer. I ran qmake without the -r and then I'm running make now. Quite an experiment from two rather inexperienced Qt bit diddlers eh? I'm a software engineer by trade but this is the first time I've used Qt.