Compiling Qt fro Raspberry pi 2



  • Hello,

    Is there any special requirements to compile QT5 for rpi2? I mean some tuning parameters for cpu? I made linux-rasp-pi2-g++ and added the fallowing parameters in qmake.conf:
    -marm
    -mfpu=neon-vfpv4
    -mtune=cortex-a7
    -mabi=aapcs-linux
    -mcpu=cortex-a7
    -mfloat-abi=hard.

    Is it correct? or I wasted time for it?


  • Moderators

    Looks fine. Does it compile?



  • @sierdzio

    Yes it compiled and works fine, but if there is some more tuning parameters available for rpi2 please let me know.



  • A device mkspec was added for Raspberry Pi 2 in 5.5 branch:
    http://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/devices/linux-rasp-pi2-g++/qmake.conf



  • Thank you



  • @_nezticle
    Can you explain me what this means and what this has as extra opposed to not having this?


  • Lifetime Qt Champion

    @jorricks the device mkspec provides Qt's build system with default/optimized parameters suited to build Qt specifically for that device



  • @SGaist
    Thank you for your reply!
    Sorry for asking the following question here but I figured you'd probably know it

    paulo@westeros:~/opt/qt5/qtimageformats$ /usr/local/qt5pi/bin/qmake .
    It says my qmake can not be found.. Do you have any clue what this step actually should be then?
    (following http://qt-project.org/wiki/RaspberryPi_Beginners_guide)

    Kind regards,


  • Lifetime Qt Champion

    Did you first install the Qt version your just built ?



  • @SGaist Ah.. The instruction should have been /mnt/rasp-pi-rootfs/usr/local/qt5pi/bin/qmake .
    sorry for bothering you!



  • @jorricks Indeed... I noticed this too last night, when I was working through the tutorial. I got Qt5 to build, but there were a number of library path problems--so I ended up just scrapping the entire build, and installing Qt4 from the repositories.

    It doesn't yet appear that the RPi2 Model B is quite ready for prime-time, at least where Qt5 is concerned. I am sure that people are getting it to work--but it isn't exactly straightforward at this time, and there do seem to be problems left to solve once the build completes.

    TB



  • @tcbetka said:

    It doesn't yet appear that the RPi2 Model B is quite ready for prime-time, at least where Qt5 is concerned. I am sure that people are getting it to work--but it isn't exactly straightforward at this time, and there do seem to be problems left to solve once the build completes.

    Eay TCBetka,
    There is a tutorial now that let's you build it nativly on the raspberry pi 2. Works like a charm!
    Caution though, you will not be able to cross-compile I believe.
    Kind regards,



  • @_nezticle Stupid noob question.... (So sorry.. I'm learning!)

    I have a Raspberry Pi2, I would like to get 5.5.0-beta working on it. (or any other slightly earlier version for that matter)
    You mentioned they have "a device mkspec was added for Raspberry Pi 2 in 5.5 branch:"

    So I downloaded the qt-everywhere-opensource-src-5.5.0-beta and I would like to get it installed on my Pi 2.
    What command do I use to get it to successfully install on my Raspberry Pi 2?

    Do I use ./configure -prefix $PWD/qtbase -opensource -nomake tests like the README says or do I add something else to get it to install for just the Pi 2?

    Ultimately I'd like to install Qt Creator 3.4.0 (or maybe an earlier version?) so I can run .pro files that cryptocurreny wallets have available. [eg. https://github.com/sherlockcoin/navajocoin (the NavajoCoin-qt.pro file)]

    Here's what I see:
    Build instructions

    Debian

    First, make sure that the required packages for Qt5 development of your distribution are installed, for Debian and Ubuntu these are:

    apt-get install qt5-default qt5-qmake qtbase5-dev-tools qttools5-dev-tools
    build-essential libboost-dev libboost-system-dev
    libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev
    libssl-dev libdb++-dev
    then execute the following:

    qmake
    make
    Alternatively, install Qt Creator and open the navajocoin-qt.pro file.

    An executable named navajocoin-qt will be built.

    I've tried the 1st part, and it won't work (probably because this is a Pi 2 I'm assuming)
    So, I need help with the 2nd part.

    Many Many Thanks to anybody that can help me!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.