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 Qt for RaspBerryPi3- unknown CPU architecture
Forum Updated to NodeBB v4.3 + New Features

Cross compiling Qt for RaspBerryPi3- unknown CPU architecture

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 3 Posters 2.9k Views 3 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.
  • yuvaramY Offline
    yuvaramY Offline
    yuvaram
    wrote on last edited by yuvaram
    #1

    Hi

    I m using ubuntu 12.04

    Following RaspberryPi2EGLFS steps for compilation.
    command used for compiling
    ./configure -release -opengl es2 -device linux-rpi3-vc4-g++ -device-option CROSS_COMPILE=/root/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot /root/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /root/raspi/qt5pi -hostprefix /root/raspi/qt5 -v

    Error:
    /root/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld.gold: error: /root/raspi/qt5/qtbase/lib/libqtpcre.a(pcre16_chartables.o): unknown CPU architecture
    collect2: error: ld returned 1 exit status

    make[2]: *** [../../lib/libQt5Core.so.5.6.3] Error 1
    make[2]: Leaving directory /root/raspi/qt5/qtbase/src/corelib' make[1]: *** [sub-corelib-make_first] Error 2 make[1]: Leaving directory /root/raspi/qt5/qtbase/src'
    make: *** [sub-src-make_first] Error 2


    Which device option should be used for raspberrypPi3 as mkspecs/devices has
    linux-rasp-pi-g++
    linux-rpi3-g++
    linux-rpi3-vc4-g++
    Where can we get clear description of each option

    Yuvaram Aligeti
    Embedded Qt Developer
    : )

    A 1 Reply Last reply
    0
    • yuvaramY yuvaram

      Hi

      I m using ubuntu 12.04

      Following RaspberryPi2EGLFS steps for compilation.
      command used for compiling
      ./configure -release -opengl es2 -device linux-rpi3-vc4-g++ -device-option CROSS_COMPILE=/root/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot /root/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /root/raspi/qt5pi -hostprefix /root/raspi/qt5 -v

      Error:
      /root/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld.gold: error: /root/raspi/qt5/qtbase/lib/libqtpcre.a(pcre16_chartables.o): unknown CPU architecture
      collect2: error: ld returned 1 exit status

      make[2]: *** [../../lib/libQt5Core.so.5.6.3] Error 1
      make[2]: Leaving directory /root/raspi/qt5/qtbase/src/corelib' make[1]: *** [sub-corelib-make_first] Error 2 make[1]: Leaving directory /root/raspi/qt5/qtbase/src'
      make: *** [sub-src-make_first] Error 2


      Which device option should be used for raspberrypPi3 as mkspecs/devices has
      linux-rasp-pi-g++
      linux-rpi3-g++
      linux-rpi3-vc4-g++
      Where can we get clear description of each option

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @yuvaram You're mixing toolchains. That is an error that comes from using the host compiler for some things and the cross compiler for others.

      Clean your build environment and make sure your CROSS_COMPILE is set correctly and your sysroot has the proper libs that were built for the Pi.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      0
      • yuvaramY Offline
        yuvaramY Offline
        yuvaram
        wrote on last edited by
        #3

        @ambershark thank you.

        How can i check host compiler or cross compilers are getting used.

        Yuvaram Aligeti
        Embedded Qt Developer
        : )

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

          Hi,

          First thing, did you call configure while you already used these sources to build another version of Qt ?

          Second, don't work as root. There's no safety check done and thus you could brick 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
          2
          • yuvaramY yuvaram

            @ambershark thank you.

            How can i check host compiler or cross compilers are getting used.

            A Offline
            A Offline
            ambershark
            wrote on last edited by ambershark
            #5

            @yuvaram Best bet is to just clean your entire environment... I.e. extract Qt from the source tarball into a new directory and start over with your configure line.

            You can also try running make with verbose, i.e. make VERBOSE=1 to see if there is more information.

            And finally you can check your output objects with the file command. It will show something like this ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped, with debug_info. That tells me it's build for x86-64. So if you see that on your objects then you are building without the cross compiler.

            Oh and what @SGaist said about not being root is a really good idea. Almost nothing in linux should be done as root unless you need to elevate your privileges for a single command. I.e when you go to install Qt you could sudo make install to be root for that one command. I wouldn't do that on this build though as it's for the ARM platform and you don't want to really install it on your system. ;)

            My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

            yuvaramY 1 Reply Last reply
            0
            • A ambershark

              @yuvaram Best bet is to just clean your entire environment... I.e. extract Qt from the source tarball into a new directory and start over with your configure line.

              You can also try running make with verbose, i.e. make VERBOSE=1 to see if there is more information.

              And finally you can check your output objects with the file command. It will show something like this ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped, with debug_info. That tells me it's build for x86-64. So if you see that on your objects then you are building without the cross compiler.

              Oh and what @SGaist said about not being root is a really good idea. Almost nothing in linux should be done as root unless you need to elevate your privileges for a single command. I.e when you go to install Qt you could sudo make install to be root for that one command. I wouldn't do that on this build though as it's for the ARM platform and you don't want to really install it on your system. ;)

              yuvaramY Offline
              yuvaramY Offline
              yuvaram
              wrote on last edited by
              #6

              @ambershark Thank you.
              i will do that and get back to you.

              Yuvaram Aligeti
              Embedded Qt Developer
              : )

              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