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. Setup environment to compile for Raspberry
QtWS25 Last Chance

Setup environment to compile for Raspberry

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
configureraspberry
14 Posts 2 Posters 5.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.
  • H Offline
    H Offline
    helenebro
    wrote on 5 Apr 2016, 16:15 last edited by helenebro 4 May 2016, 16:20
    #1

    Hi,
    I try to setup environment to be able to compile application Qt for Raspberry.
    I follow the this tutorial but I have an error when I try to configure :

    $./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/raspberry-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi -v
    
    This is the Qt Open Source Edition.
    
    You are licensed to use this software under the terms of
    the Lesser GNU General Public License (LGPL) versions 2.1.
    You are also licensed to use this software under the terms of
    the GNU Lesser General Public License (LGPL) versions 3.
    
    You have already accepted the terms of the Open Source license.
    
    Running configuration tests (phase 1)...
    Precompiled-headers support enabled.
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
    Symbol visibility control enabled.
    arm-linux-gnueabihf-g++: erreur: unrecognized command line option ‘-fuse-ld=gold’
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/mnt/raspberry-rootfs -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
    bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
    Symbolic function binding disabled.
    DEFAULT_INCDIRS="/home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/include/c++/4.7.2
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/include/c++/4.7.2/arm-linux-gnueabihf
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/include/c++/4.7.2/backward
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc/arm-linux-gnueabihf/4.7.2/include
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc/arm-linux-gnueabihf/4.7.2/include-fixed
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/include
    /mnt/raspberry-rootfs/usr/include
    /mnt/raspberry-rootfs/usr/include/arm-linux-gnueabihf
    "
    DEFAULT_LIBDIRS="/home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/lib
    /mnt/raspberry-rootfs/lib
    /mnt/raspberry-rootfs/lib/arm-linux-gnueabihf
    /mnt/raspberry-rootfs/usr/lib
    /mnt/raspberry-rootfs/usr/lib/arm-linux-gnueabihf
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc/arm-linux-gnueabihf/4.7.2
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc/arm-linux-gnueabihf
    "
    Done running configuration tests.
    <srcbase> = /home/helene/opt/qt5/qtbase 
    <outbase> = /home/helene/opt/qt5/qtbase 
    Creating qmake...
    
    make: Rien à faire pour « first ».
    Running configuration tests (phase 2)...
    Found pkg-config from $PATH: /usr/bin/pkg-config
    Note: PKG_CONFIG_LIBDIR automatically set to /mnt/raspberry-rootfs/usr/lib/pkgconfig:/mnt/raspberry-rootfs/usr/share/pkgconfig:/mnt/raspberry-rootfs/usr/lib/arm-linux-gnueabihf/pkgconfig
    Note: PKG_CONFIG_SYSROOT_DIR automatically set to /mnt/raspberry-rootfs
    Determining architecture... ()
    /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/raspberry-rootfs -g -Wall -W -fPIC  -I. -I../../mkspecs/devices/linux-rasp-pi-g++ -o arch.o arch.cpp
    In file included from /mnt/raspberry-rootfs/usr/include/stdio.h:28:0,
                     from arch.cpp:37:
    /mnt/raspberry-rootfs/usr/include/features.h:356:25: fatal error: /mnt/raspberry-rootfs/usr/include/sys/cdefs.h: Erreur d'entrée/sortie
    ...
    ...
    compilation terminated.
    make: *** [arch.o] Erreur 1
    Unable to determine architecture!
    
    compilation terminated.
    make: *** [opengles2.o] Erreur 1
    OpenGL ES 2.0 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/helene/opt/qt5/qtbase/mkspecs/devices/linux-rasp-pi-g++.
    
    

    I have tried several times the procedure and I always have the error.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 Apr 2016, 20:45 last edited by SGaist 4 Jun 2016, 07:20
      #2

      Hi,

      You should run fcheck fsck on your RPi sdcard. An In/Out error usually means that some data got corrupted or more likely the data storage.

      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
      • H Offline
        H Offline
        helenebro
        wrote on 6 Apr 2016, 07:11 last edited by
        #3

        Does that mean that .img are a problem ? If I test with Raspbian image, it should work ?
        What is fcheck ? A command line ?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 6 Apr 2016, 07:21 last edited by
          #4

          Sorry, I meant fsck.

          You got an IO error on a mounted disk image ?

          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
          • H Offline
            H Offline
            helenebro
            wrote on 6 Apr 2016, 07:38 last edited by
            #5

            When I insert my SD Card, I have on dmesg :

            [ 1597.464008] sd 3:0:0:0: [sdb] 15482880 512-byte logical blocks: (7.92 GB/7.38 GiB)
            [ 1597.470203]  sdb: sdb1 sdb2
            [ 1597.886246] EXT4-fs (sdb2): recovery complete
            [ 1597.886254] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)
            [ 1597.909332] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
            

            When I run fsck, I have :

            $sudo fsck /dev/sdb1
            fsck de util-linux 2.20.1
            fsck.fat 3.0.26 (2014-03-07)
            0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
            1) Remove dirty bit
            2) No action
            ? 
            

            After correction, if I insert the card, I have :

            [ 2116.065860] sd 3:0:0:0: [sdb] 15482880 512-byte logical blocks: (7.92 GB/7.38 GiB)
            [ 2116.071942]  sdb: sdb1 sdb2
            [ 2116.461258] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)
            

            I will try again the procedure.

            Thank for your help

            1 Reply Last reply
            0
            • H Offline
              H Offline
              helenebro
              wrote on 6 Apr 2016, 08:40 last edited by helenebro 4 Jun 2016, 08:48
              #6

              The problem of seems solved but I have an other error :

              Running configuration tests...
              Failed to process makespec for platform 'devices/linux-rasp-pi-g++'
              Project ERROR: Compiler /home/helene/raspberry/gcc-4.7-linaro­-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ not found. Check the value of CROSS_COMPILE -device-option
              Could not read qmake configuration file /home/helene/raspberry/qt-everywhere-opensource-src-5.4.1/qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf.
              Error processing project file: /dev/null
              
              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 6 Apr 2016, 20:09 last edited by
                #7

                Are you shutting down the RPi properly ?

                Does /home/helene/raspberry/gcc-4.7-linaro­-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++exists ?

                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
                • H Offline
                  H Offline
                  helenebro
                  wrote on 7 Apr 2016, 16:15 last edited by
                  #8

                  I succeed to setup environment but I can't succeed to run a simple project.
                  I had

                  • debugger (Path : /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-gdb)
                  • compiler (Path: /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++)
                  • Qt version (qmake path : /usr/local/qt5pi/bin/qmake)
                  • Kit

                  But I don't know why, version is to Qt 5.6.1 ans when I run my application, I have the error :

                  avertissement : You are using deprecated mkspecs. Please use qnx-armle-v7-qcc instead.
                  erreur : qcc: Command not found
                  
                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 7 Apr 2016, 20:38 last edited by
                    #9

                    QNX ? Did you change anything in the mkspec ?

                    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
                    • H Offline
                      H Offline
                      helenebro
                      wrote on 8 Apr 2016, 06:59 last edited by helenebro 4 Aug 2016, 07:26
                      #10

                      No, I don't think so.
                      Is this normal, I have Qt 5.6.1 (not 5.4.1 ?)

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 10 Apr 2016, 19:40 last edited by
                        #11

                        Did you clone directly from code.qt.io ?

                        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
                        • H Offline
                          H Offline
                          helenebro
                          wrote on 12 Apr 2016, 09:50 last edited by
                          #12

                          Yes.
                          I have tried again with qt-everywhere-opensource-src-5.4.1 and it works.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 12 Apr 2016, 22:59 last edited by
                            #13

                            What about 5.5.1 ?

                            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
                            • H Offline
                              H Offline
                              helenebro
                              wrote on 13 Apr 2016, 07:10 last edited by
                              #14

                              I didn't try. 5.4.1 is enough for me

                              1 Reply Last reply
                              0

                              7/14

                              6 Apr 2016, 20:09

                              • Login

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