Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Crosscompile Qt5.7: Additional dependencies?

Crosscompile Qt5.7: Additional dependencies?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
8 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • larry104L Offline
    larry104L Offline
    larry104
    wrote on last edited by
    #1

    Hi I'm crosscompiling on a Ubuntu 16.04 VM for the raspberry pi - I followed this guide - Everything works just great until I needed some additional libraries which are not available as package on the Raspi (but they are on Ubuntu) - So, the question is how do you add additional raspi libraries to the qtcreator build system which you compiled yourself?

    Thanks.

    1 Reply Last reply
    0
    • larry104L Offline
      larry104L Offline
      larry104
      wrote on last edited by larry104
      #7

      Just a quick update for your reference: The toolchain used in the guide is a old compiler built by linaro. They no longer make specific raspberry pi builds. If you need to crosscompile using libraries you compiled on your Raspberry (Jessie) which uses gcc4.9 you need to use a different tool chain
      arm-rpi-4.9.3-linux-gnueabihf - This will unfortunately not work out of the box - there are a few things which need to be changed to make this work see here for the necessary fixes which need to be applied. Also the configure should use -device linux-rasp-pi-g++ I could not get it to work for linux-rasp-pi2-g++ or linux-rpi3-g++. The reason is mainly because the qmake.conf in e.g. linux-rpi3-g++ (qtbase/mkspecs/devices/linux-rpi3-g++) have errors (it would be great if Qt could fix these - even in the latest 5.8.0 I still see errors like hardcoded /opt dirs which will not work when crosscompiling)

      To summarize: This was done using the following:

      • qt-everywhere-opensource-src-5.7.0.tar.gz
      • Crosscompile on a VM running Ubuntu 16.04
      • Raspi3 with current Raspbian Jessie release (January 2017)
      • Toolchain @ https://github.com/raspberrypi/tools
      • Guide @ https://wiki.qt.io/RaspberryPi2EGLFS#Step_by_step
      • Toolchain fixes @ https://github.com/raspberrypi/tools/issues/50
      1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        The usual way is to install the dev packages of the dependencies you need on the Pi and use the filesystem as sysroot.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • larry104L Offline
          larry104L Offline
          larry104
          wrote on last edited by
          #3

          Yes, that's exactly the problem since there is no dev package for that version - In other words Ubuntu and Raspi packages are not aligned for ola and libola-dev
          Ubuntu: 0.9.8
          Raspi: 0.9.1
          I compiled ola from source on the Raspi - but now I have to get the libs and headers over to the build system

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            Either mount the Raspberry Pi root file system using sshfs on your computer and use it to compile Qt or sync it with what you are using on your computer.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • larry104L Offline
              larry104L Offline
              larry104
              wrote on last edited by larry104
              #5

              I managed to compile the correct version of ola and synced the sysroot back onto my Ubuntu development host - now I'm getting the following error: ...raspi/sysroot/usr/lib/libolacommon.so:-1: error: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20' - I assume the problem is that the crosstool-ng is compiled with gcc4.7 where the libs were compiled on a current Raspbian Jessie which uses gcc 4.9.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #6

                You should indeed update your toolchain.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • larry104L Offline
                  larry104L Offline
                  larry104
                  wrote on last edited by larry104
                  #7

                  Just a quick update for your reference: The toolchain used in the guide is a old compiler built by linaro. They no longer make specific raspberry pi builds. If you need to crosscompile using libraries you compiled on your Raspberry (Jessie) which uses gcc4.9 you need to use a different tool chain
                  arm-rpi-4.9.3-linux-gnueabihf - This will unfortunately not work out of the box - there are a few things which need to be changed to make this work see here for the necessary fixes which need to be applied. Also the configure should use -device linux-rasp-pi-g++ I could not get it to work for linux-rasp-pi2-g++ or linux-rpi3-g++. The reason is mainly because the qmake.conf in e.g. linux-rpi3-g++ (qtbase/mkspecs/devices/linux-rpi3-g++) have errors (it would be great if Qt could fix these - even in the latest 5.8.0 I still see errors like hardcoded /opt dirs which will not work when crosscompiling)

                  To summarize: This was done using the following:

                  • qt-everywhere-opensource-src-5.7.0.tar.gz
                  • Crosscompile on a VM running Ubuntu 16.04
                  • Raspi3 with current Raspbian Jessie release (January 2017)
                  • Toolchain @ https://github.com/raspberrypi/tools
                  • Guide @ https://wiki.qt.io/RaspberryPi2EGLFS#Step_by_step
                  • Toolchain fixes @ https://github.com/raspberrypi/tools/issues/50
                  1 Reply Last reply
                  1
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    Thanks for the follow up !

                    Since there seems that there might be errors in the mkspecs, can you provide an updated version ? If so, would you consider submitting it for inclusion in the next release ?

                    If not, then at least consider opening a new report on the bug report system. Don't forget to check first if there's already something about it.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved