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. Cross-compiling QT5.7 for linux ARM setting linker path
Qt 6.11 is out! See what's new in the release blog

Cross-compiling QT5.7 for linux ARM setting linker path

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
13 Posts 3 Posters 7.6k Views 2 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi and welcome to devnet,

    What options are you passing to your configure call ?

    Note that if your device is like a BBB, you should use the BBB mkspec as a base for yours and pass the proper information to configure.

    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
      SimonB
      wrote on last edited by SimonB
      #3
      BASE_DIR=$(pwd)
      TOOLCHAIN_DIR=$BASE_DIR/../toolchain/arm-cortex_a8-linux-gnueabi
      HOST_TYPE=arm-cortex_a8-linux-gnueabi
      SYSROOT_DIR=$BASE_DIR/../toolchain/arm-cortex_a8-linux-gnueabi/arm-cortex_a8-linux-gnueabi/sysroot
      TARGET_DIR=$BASE_DIR/../buildroot/board/tornatech/filesystem/opt
      PREFIX='qt-embedded'
      EXTPREFIX=$TARGET_DIR/$PREFIX
      
      
      CONFIGURE_CMD="./configure -v -xplatform linux-arm-gnueabi-g++ -device linux-brio-tor019-++ -sysroot $SYSROOT_DIR -extprefix $EXTPREFIX -device-option COSS_COMPILE=$TOOLCHAIN_DIR/bin/$HOST_TYPE- -make libs -confirm-license -release -opensource -force-pkg-config -no-icu -no-dbus -no-xcb -no-gif -no-xkbcommon-evdev -no-evdev -tslib -no-mtdev -qt-libjpeg -qt-zlib -no-harfbuzz -no-libproxy -no-xinput2 -no-xcb-xlib -no-pulseaudio -no-alsa -no-largefile -no-iconv -no-pch -no-sse2 -no-glib -no-cups -rpath "
      

      The "device" stated here exist, that's the name of our folder containing the qmake file. My example for the qconf ( in mkspec ) was the beagleboard, the file is almost identical to the beagleboard one, except for the soft floating point

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SimonB
        wrote on last edited by
        #4

        Actually, I have to revise my question.
        qmake is able to be built, but at the runtime when I try to launch the QT compilation, it ask for

        /lib/ld-linux.so.3: No such file or directory
        
        jsulmJ 1 Reply Last reply
        0
        • S SimonB

          Actually, I have to revise my question.
          qmake is able to be built, but at the runtime when I try to launch the QT compilation, it ask for

          /lib/ld-linux.so.3: No such file or directory
          
          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #5

          @SimonB What does

          ldd qmake
          

          say?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply
          0
          • S Offline
            S Offline
            SimonB
            wrote on last edited by
            #6
            This post is deleted!
            1 Reply Last reply
            0
            • jsulmJ jsulm

              @SimonB What does

              ldd qmake
              

              say?

              S Offline
              S Offline
              SimonB
              wrote on last edited by
              #7

              @jsulm
              It says :

                      not a dynamic executable
              

              I guess I am missing a flag or something at compile time, I tried a lot of combinaison for including my "fakeroot" folder. I tought that it was the point of having --sysroot in the configure script

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

                What do you get if your call file qmake ?

                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
                0
                • SGaistS SGaist

                  What do you get if your call file qmake ?

                  S Offline
                  S Offline
                  SimonB
                  wrote on last edited by SimonB
                  #9

                  @SGaist - Thanks for your quick reply

                  qmake: ERROR: cannot open `qmake' (No such file or directory)
                  

                  I am still looking for a "missing flag" in the conf file ... is there anywhere else I should look ?

                  I just had a tought,
                  I want to cross-compile QT to have the libraries on my embedded platform. Am I doing this wrong by building qmake with the cross-compiler app ?
                  since qmake is used to build the makefile for QT, I have to run it on my host system right ? So, that being said, do I need to have qmake cross-compiled ? sor sure it won't work on my system

                  my reference was :
                  Building Qt for Embedded Linux
                  but it says that this is obsolete and it's only good for QT4, I bet this is good for QT5 as well ??

                  ( This is my first time compiling QT )

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

                    Ok... When someone suggest to call ldd on a file, you are supposed to give the full path that file or change your current folder to where that file is otherwise the command won't work. The same for file.

                    As for your qmake.conf i'd remove the QT_SYSROOT assignment, it should be done for you through the configure script and the parameters you give it.

                    qmake is a host tool that is not cross-compiled.

                    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
                    0
                    • SGaistS SGaist

                      Ok... When someone suggest to call ldd on a file, you are supposed to give the full path that file or change your current folder to where that file is otherwise the command won't work. The same for file.

                      As for your qmake.conf i'd remove the QT_SYSROOT assignment, it should be done for you through the configure script and the parameters you give it.

                      qmake is a host tool that is not cross-compiled.

                      S Offline
                      S Offline
                      SimonB
                      wrote on last edited by SimonB
                      #11

                      The file and ldd worked, but the binary was a arm compiled binary, that's why it wasn't working. May I suggest updating the http://wiki.qt.io/Building_Qt_for_Embedded_Linux#The_Host_Build to specify that it's still the actual way to to it, even in qt5

                      @SGaist said in Cross-compiling QT5.7 for linux ARM setting linker path:

                      qmake is a host tool that is not cross-compiled.

                      I figured that out today !! I am still wondering why it is trying to compile qmake with the cross compiler when I make the second configure ( the one with the option -device CROSSC_COMPILE= ....

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

                        Are you doing your second call to configure in 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
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #13

                          The article you mention is really specific to Qt 4. So no, it should not be modified. There's even a link at the top for Qt 5.

                          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