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. About raspberry pi cross compile ?
QtWS25 Last Chance

About raspberry pi cross compile ?

Scheduled Pinned Locked Moved Mobile and Embedded
raspberrycross compile
17 Posts 2 Posters 8.4k 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.
  • S Offline
    S Offline
    sfarbac
    wrote on 6 Mar 2015, 16:03 last edited by sfarbac 3 Jun 2015, 16:03
    #1

    Hi,
    I'm new on qt world. And I'm going lose it. I study on this link to perform cross compile on ubuntu for raspberry pi.I lost my three days because of it. I get the following error at ./configure step.

    opengles2.cpp:37:25: fatal error: GLES2/gl2.h: No such file or directory
    compilation terminated.
    make: *** [opengles2.o] Error 1
    OpenGL disabled.
    The OpenGL ES 2.0 functionality test failed!
    You might need to modify the include and library search paths by editing
    QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
    /home/sefa/opt/qt5/qtbase/mkspecs/devices/linux-rasp-pi-g++.

    The contents of qmake.config file as ;

    include(../common/linux_device_pre.conf)

    QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib

    QMAKE_LIBDIR_OPENGL_ES2 = /home/sefa/opt/qt5/qtbase/mkspecs
    QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2

    QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/opt/vc/include
    $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads
    $$[QT_SYSROOT]/opt/vc/include/interface/vmcs_host/linux
    QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}

    QMAKE_LIBS_EGL = -lEGL -lGLESv2

    contains(DISTRO, squeeze) {
    #Debian Squeeze: Legacy everything
    QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -lEGL
    } else:contains(DISTRO, arch) {
    #On principle: no wizardry required
    } else {
    #This is not strictly necessary
    DISTRO_OPTS += deb-multi-arch
    DISTRO_OPTS += hard-float
    }

    QMAKE_CFLAGS +=
    -marm
    -mfpu=vfp
    -mtune=arm1176jzf-s
    -march=armv6zk
    -mabi=aapcs-linux

    QMAKE_CXXFLAGS = $$QMAKE_CFLAGS

    EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_pi.cpp
    EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host

    include(../common/linux_arm_device_post.conf)

    load(qt_config)

    how can I fix it. Please help me. Thanks for answer.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 6 Mar 2015, 23:06 last edited by
      #2

      Hi,

      Do you have GLES2/gl2.h somewhere in the Raspberry Pi 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
      • S Offline
        S Offline
        sfarbac
        wrote on 7 Mar 2015, 14:04 last edited by
        #3

        There are three units file as gl2.h on my pc. The locations of these files in that ;
        /home/sefa/opt/qt5/qtbase/mkspecs/common/ios/GLES2
        /home/sefa/opt/qt5/qtbase/src/3rdparty/angle/include/GLES2
        /home/sefa/opt/qt5/qtwebkit/Source/ThirdParty/ANGLE/include/GLES2

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 7 Mar 2015, 20:53 last edited by
          #4

          You need to mount your Raspberry Pi root file system in order to access the needed files

          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
          • S Offline
            S Offline
            sfarbac
            wrote on 7 Mar 2015, 22:34 last edited by
            #5

            I mount raspberry pi root file system. This time, it's a different error as;

            /home/sefa/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lGLESv2
            collect2: error: ld returned 1 exit status
            make: *** [opengles2] Error 1
            OpenGL disabled.
            The OpenGL ES 2.0 functionality test failed!
            You might need to modify the include and library search paths by editing
            QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
            /home/sefa/opt/qt5/qtbase/mkspecs/devices/linux-rasp-pi-g++.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 7 Mar 2015, 22:40 last edited by
              #6

              Did you restart configuration from a clean state ?

              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
              • S Offline
                S Offline
                sfarbac
                wrote on 7 Mar 2015, 23:08 last edited by
                #7

                Thank you for your interest.yes I restart from a clean state.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 7 Mar 2015, 23:20 last edited by
                  #8

                  You modified the raspberry mkspec, you should revert them.

                  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
                  • S Offline
                    S Offline
                    sfarbac
                    wrote on 7 Mar 2015, 23:26 last edited by
                    #9

                    How can I revert them ?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 7 Mar 2015, 23:27 last edited by
                      #10

                      If you cloned the sources just git checkout. Otherwise extract the file from the archive and replace 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
                      • S Offline
                        S Offline
                        sfarbac
                        wrote on 8 Mar 2015, 00:01 last edited by
                        #11

                        I checkout git and same problem continous.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 8 Mar 2015, 00:05 last edited by
                          #12

                          The question is the same as before did you correctly cleanup before restarting configure ?

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

                          S 1 Reply Last reply 8 Mar 2015, 03:48
                          0
                          • S SGaist
                            8 Mar 2015, 00:05

                            The question is the same as before did you correctly cleanup before restarting configure ?

                            S Offline
                            S Offline
                            sfarbac
                            wrote on 8 Mar 2015, 03:48 last edited by sfarbac 3 Aug 2015, 04:18
                            #13

                            @SGaist Thank you. I did all the steps from the beginning and the problem was solved. Problem, turn off the computer after completing mount step. I need to do again mount after computer shuts down. I learned it because of you.I have some questions but it can be little silly questions but I really did not understand. why we use the sd card? After the umount step, SD card boot partition has occurred. Then what do we do with this SD card?
                            Another one, after umount step , does not look anything in the /mnt/rasp-pi-rootfs. is this a normal situation?

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 8 Mar 2015, 15:19 last edited by
                              #14

                              That SD card contains the root file system where all the needed libraries/header can be find to build Qt and the applications. You could also copy the content of that file system on your computer but you would then need to copy again the Qt libraries on the SD Card once you built/installed them.

                              When you mount a drive on a folder, you'll be able to access the content of that drive. Once you unmount it, you'll see again what was in that folder. In your case it's empty. So nothing to worry about !

                              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
                              • S Offline
                                S Offline
                                sfarbac
                                wrote on 8 Mar 2015, 23:42 last edited by
                                #15

                                Thanks for information. Now I'm trying compile and run a hello world project. But I could not. In the qt version tab, there is an exclamation mark before the kit I added. İt say at bottom of the page Qt version is not properly installed. I use qt 5.4 version. In that page it looks here Qt 5.5.0 (qt5pi). When I compiled project, fails in the following way

                                Cannot read /mnt/rasp-pi-rootfs2/usr/local/qt5pi/mkspecs/devices/linux-rasp-pi-g++/qmake.conf: No such file or directory
                                Could not read qmake configuration file /mnt/rasp-pi-rootfs2/usr/local/qt5pi/mkspecs/devices/linux-rasp-pi-g++/qmake.conf.
                                Could not find qmake configuration file default.
                                Error while parsing file /home/sefa/Masaüstü/Qt projects/AAARASPBERRY/qt5-raspberrypi-example-qt5-raspberrypi-example/helloworld.pro. Giving up.
                                Cannot read /home/sefa/rsp/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-gdb/qmake.conf: No such file or directory
                                Could not read qmake configuration file /home/sefa/rsp/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-gdb/qmake.conf.
                                Error while parsing file /home/sefa/Masaüstü/Qt projects/AAARASPBERRY/qt5-raspberrypi-example-qt5-raspberrypi-example/helloworld.pro. Giving up.

                                How can I fix it.

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  sfarbac
                                  wrote on 9 Mar 2015, 00:02 last edited by
                                  #16

                                  We need to show qmake which in the qt5pi folder. But mnt/rasp-pi-rootfs is empty on my pc. So I showed qmake from sdcart. This may be caused by ?

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on 9 Mar 2015, 22:19 last edited by
                                    #17

                                    Just mount the Pi root file system before starting to work on your project

                                    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

                                    9/17

                                    7 Mar 2015, 23:26

                                    • Login

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