Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cross-compiling with diffrent motherboard

Cross-compiling with diffrent motherboard

Scheduled Pinned Locked Moved Solved Installation and Deployment
12 Posts 4 Posters 1.6k 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.
  • B Offline
    B Offline
    Buket
    wrote on last edited by Buket
    #1

    I have an ARM-based (Rockchip RK3288, ARM Cortex-A17 CPU, Mali-T760 MP4 (T764) GPU)motherboard and I want to cross-compile using it, but I keep getting errors. I use debian 9 as the operating system on this card, and I use ubuntu on the host PC.

    I used this commands:

    ./configure -release -opengl es2 -device linux-arm-generic-g++ -device-option CROSS_COMPILE=~/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot ~/linaro/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5li -extprefix ~/linaro/qt5li -hostprefix ~/linaro/qt5 -no-use-gold-linker -v
    

    and I got these errors:

    ~~> /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libm.so.6, needed by /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/lib/libstdc++.so, not found (try using -rpath or -rpath-link)
    > /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/bin/ld: error: verifyspec uses VFP register arguments, verifyspec.o does not
    > /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/bin/ld: failed to merge target specific data of file verifyspec.o
    > /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/lib/libstdc++.so: undefined reference to `acos@GLIBC_2.4'
    > /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/lib/libstdc++.so: undefined reference to `pow@GLIBC_2.4'
    > /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/lib/libstdc++.so: undefined reference to `log@GLIBC_2.4'
    > /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/lib/libstdc++.so: undefined reference to `floor@GLIBC_2.4'
    > /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/lib/libstdc++.so: undefined reference to `log10@GLIBC_2.4'
    > /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/lib/libstdc++.so: undefined reference to `exp@GLIBC_2.4'
    > /home/buket/linaro/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/lib/libstdc++.so: undefined reference to `cosh@GLIBC_2.4'
    > collect2: hata: ld çıkış durumu 1 ile döndü
    > gmake: *** [Makefile:68: verifyspec] Error 1
    Note: Also available for Linux: linux-clang linux-icc
    ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
    

    I'm sure I typed the paths correctly. I don't know where I went wrong and I can't solve this problem.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Buket
      wrote on last edited by
      #12

      @Buket said in Cross-compiling with diffrent motherboard:

      Edit :

      I solved the problem here. I updated sysroot and before correcting my configure command, I prepared a qmake.conf file suitable for the processor of my motherboard. I adjusted the paths accordingly and got an error-free output.

      Configure command:

      ./configure -static -release -opengl es2 -device linux-jetway-arm-g++ -device-option CROSS_COMPILE=~/linaro/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -no-eglfs -sysroot ~/linaro/sysroot -opensource -confirm-license -prefix /usr/local/qt5li -extprefix ~/linaro/qt5li -hostprefix ~/linaro/qt5 -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtdatavis3d -nomake examples -make libs -pkg-config -no-use-gold-linker -v
      

      I can also optionally share the qmake.conf file. Thanks for your help.

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

        Hi and welcome to devnet,

        Your Linaro version looks quite old, is that intentional ?
        Which version of Qt are you trying to cross-compile ?
        Where does the sysroot come from ?

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

        B 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi and welcome to devnet,

          Your Linaro version looks quite old, is that intentional ?
          Which version of Qt are you trying to cross-compile ?
          Where does the sysroot come from ?

          B Offline
          B Offline
          Buket
          wrote on last edited by
          #3

          @SGaist

          Yes, I use it on purpose.
          Qt Creator version 5.15.2.
          I don't understand your last question. I downloaded and installed using the commands below. As a folder, I show the

          ~/linaro/sysroot
          

          folder as the path.

          wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
          
          chmod +x sysroot-relativelinks.py
          ./sysroot-relativelinks.py sysroot
          
          jsulmJ SGaistS 2 Replies Last reply
          0
          • B Buket

            @SGaist

            Yes, I use it on purpose.
            Qt Creator version 5.15.2.
            I don't understand your last question. I downloaded and installed using the commands below. As a folder, I show the

            ~/linaro/sysroot
            

            folder as the path.

            wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
            
            chmod +x sysroot-relativelinks.py
            ./sysroot-relativelinks.py sysroot
            
            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @Buket said in Cross-compiling with diffrent motherboard:

            sysroot-relativelinks.py

            This script does not download the sysroot.
            So, how did you get the sysroot?
            Or is there anything inside ~/linaro/sysroot?
            Sysroot is usually a copy of the root file system of the target device. Especially /usr/lib and /usr/include folders are important, so the headers and libs can be found.

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

            B 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Buket said in Cross-compiling with diffrent motherboard:

              sysroot-relativelinks.py

              This script does not download the sysroot.
              So, how did you get the sysroot?
              Or is there anything inside ~/linaro/sysroot?
              Sysroot is usually a copy of the root file system of the target device. Especially /usr/lib and /usr/include folders are important, so the headers and libs can be found.

              B Offline
              B Offline
              Buket
              wrote on last edited by
              #5

              @jsulm
              I got it from target device using similar command below.

              rsync -avz  device@ip_address:/usr/include sysroot/usr
              

              It contains the folders you mentioned.

              jsulmJ 1 Reply Last reply
              0
              • B Buket

                @jsulm
                I got it from target device using similar command below.

                rsync -avz  device@ip_address:/usr/include sysroot/usr
                

                It contains the folders you mentioned.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #6

                @Buket But you also got /usr/lib* from your target device?

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

                B 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Buket But you also got /usr/lib* from your target device?

                  B Offline
                  B Offline
                  Buket
                  wrote on last edited by Buket
                  #7

                  @jsulm
                  I got the following folders from the target device.

                  rsync -avz  device@ip_address:/usr/include sysroot/usr
                  rsync -avz  device@ip_address:/lib sysroot
                  rsync -avz  device@ip_address:/usr/lib sysroot/usr
                  

                  What I suspect is that I chose it wrong.

                  gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf
                  

                  I don't know how I should choose the toolchain. I think the error I am getting is due to the incompatibility.

                  1 Reply Last reply
                  0
                  • B Buket

                    @SGaist

                    Yes, I use it on purpose.
                    Qt Creator version 5.15.2.
                    I don't understand your last question. I downloaded and installed using the commands below. As a folder, I show the

                    ~/linaro/sysroot
                    

                    folder as the path.

                    wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
                    
                    chmod +x sysroot-relativelinks.py
                    ./sysroot-relativelinks.py sysroot
                    
                    SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    @Buket said in Cross-compiling with diffrent motherboard:

                    Yes, I use it on purpose.

                    Why ?
                    How old is your sysroot compared to 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

                    B 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      @Buket said in Cross-compiling with diffrent motherboard:

                      Yes, I use it on purpose.

                      Why ?
                      How old is your sysroot compared to your toolchain ?

                      B Offline
                      B Offline
                      Buket
                      wrote on last edited by
                      #9

                      @SGaist
                      I was watching a youtube video for cross-compile and I didn't want to use a different tool and get an error.
                      I changed the toolchain I used after your comment. You can see the version below. I cannot comment on sysroot, but I leave the command and link I used to download it below.

                      toolchain version :

                      gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf
                      

                      sysroot link :

                      wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
                      
                      Pablo J. RoginaP 1 Reply Last reply
                      0
                      • B Buket

                        @SGaist
                        I was watching a youtube video for cross-compile and I didn't want to use a different tool and get an error.
                        I changed the toolchain I used after your comment. You can see the version below. I cannot comment on sysroot, but I leave the command and link I used to download it below.

                        toolchain version :

                        gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf
                        

                        sysroot link :

                        wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
                        
                        Pablo J. RoginaP Offline
                        Pablo J. RoginaP Offline
                        Pablo J. Rogina
                        wrote on last edited by
                        #10

                        @Buket said in Cross-compiling with diffrent motherboard:

                        but I leave the command and link I used to download it below.

                        Once again, that link provides you with a Python script to adjust symlinks to be relative in your sysroot folder, which you need to create/update from your device into your host machine.

                        Upvote the answer(s) that helped you solve the issue
                        Use "Topic Tools" button to mark your post as Solved
                        Add screenshots via postimage.org
                        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                        B 1 Reply Last reply
                        2
                        • Pablo J. RoginaP Pablo J. Rogina

                          @Buket said in Cross-compiling with diffrent motherboard:

                          but I leave the command and link I used to download it below.

                          Once again, that link provides you with a Python script to adjust symlinks to be relative in your sysroot folder, which you need to create/update from your device into your host machine.

                          B Offline
                          B Offline
                          Buket
                          wrote on last edited by
                          #11

                          @Pablo-J-Rogina I understand what you mean, but I don't understand what you mean about it being old. The day I cross-compiled, I created sysroot and got the necessary files from the target device. If that's what you're talking about, sysroot is up to date, but if you're talking about something different, can you tell me how I can find out?

                          1 Reply Last reply
                          0
                          • B Offline
                            B Offline
                            Buket
                            wrote on last edited by
                            #12

                            @Buket said in Cross-compiling with diffrent motherboard:

                            Edit :

                            I solved the problem here. I updated sysroot and before correcting my configure command, I prepared a qmake.conf file suitable for the processor of my motherboard. I adjusted the paths accordingly and got an error-free output.

                            Configure command:

                            ./configure -static -release -opengl es2 -device linux-jetway-arm-g++ -device-option CROSS_COMPILE=~/linaro/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -no-eglfs -sysroot ~/linaro/sysroot -opensource -confirm-license -prefix /usr/local/qt5li -extprefix ~/linaro/qt5li -hostprefix ~/linaro/qt5 -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtdatavis3d -nomake examples -make libs -pkg-config -no-use-gold-linker -v
                            

                            I can also optionally share the qmake.conf file. Thanks for your help.

                            1 Reply Last reply
                            1

                            • Login

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