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. Qt Raspberry Pi cross compiling
Forum Updated to NodeBB v4.3 + New Features

Qt Raspberry Pi cross compiling

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
8 Posts 3 Posters 1.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.
  • P Offline
    P Offline
    PouryaTorabi
    wrote on last edited by
    #1

    Hi everyone

    This question may be very common but i couldn't find any answer for it, I'm trying to cross compile qt for raspberry pi but i do make install, there's no qt5pi folder in /usr/local, what should i do, here is my configuration:
    ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -sysroot $RPI_SYSROOT -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi

    K 1 Reply Last reply
    0
    • P PouryaTorabi

      Hi everyone

      This question may be very common but i couldn't find any answer for it, I'm trying to cross compile qt for raspberry pi but i do make install, there's no qt5pi folder in /usr/local, what should i do, here is my configuration:
      ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -sysroot $RPI_SYSROOT -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi

      K Offline
      K Offline
      koahnig
      wrote on last edited by koahnig
      #2

      @PouryaTorabi

      Did you get an error message so far?

      I am not sure if and when missing base path' are created. However you can start the make process and will get an error message.
      On the other hand you can freely choose that complete path. Therefore, you can use another name or you can create it prior starting the make process. That strategy will prevent from waiting for some time until eventually an error message will pop up.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • P Offline
        P Offline
        PouryaTorabi
        wrote on last edited by
        #3

        I tried another tutorial from here,
        https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/
        Every thing was done without error but when I tried to compile my first program nothing happened so I added these line as recommended in:
        https://medium.com/@amirmann/how-to-cross-compile-qt-for-raspberry-pi-3-on-linux-ubuntu-for-beginners-75acf2a078c
        But now I get this error:
        /home/pi/test: error while loading shared libraries: libGLESv2.so.2: cannot open shared object file: No such file or directory
        22:34:50: Application finished with exit code 127.
        When will these error finish, I'm really hopeless.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          PouryaTorabi
          wrote on last edited by
          #4

          Can anyone help me with this, I recompiled every thing again but nothing changed, I added some more steps as was suggested in a forum like this:

          mv sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0_backup
          ln -s sysroot/opt/vc/lib/libEGL.so sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0
          
          mv sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0_backup
          ln -s sysroot/opt/vc/lib/libGLESv2.so sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0
          
          ln -s sysroot/opt/vc/lib/libEGL.so sysroot/opt/vc/lib/libEGL.so.1
          
          ln -s sysroot/opt/vc/lib/libGLESv2.so sysroot/opt/vc/lib/libGLESv2.so.2
          

          Now the raspberry can find the libs but it gave me this error:

          Segmentation Fault
          

          What should I do now?

          K 1 Reply Last reply
          0
          • P PouryaTorabi

            Can anyone help me with this, I recompiled every thing again but nothing changed, I added some more steps as was suggested in a forum like this:

            mv sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0_backup
            ln -s sysroot/opt/vc/lib/libEGL.so sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0
            
            mv sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0_backup
            ln -s sysroot/opt/vc/lib/libGLESv2.so sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0
            
            ln -s sysroot/opt/vc/lib/libEGL.so sysroot/opt/vc/lib/libEGL.so.1
            
            ln -s sysroot/opt/vc/lib/libGLESv2.so sysroot/opt/vc/lib/libGLESv2.so.2
            

            Now the raspberry can find the libs but it gave me this error:

            Segmentation Fault
            

            What should I do now?

            K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            @PouryaTorabi

            Are you trying to use some arbitrary EGL and GLES libs?
            AFAIK you need libraries cross-compiled for the target platform. Therefore, if you intend to use standard libs compiled for your desktop linux, you will have no chance to get them to work.

            Begin of year I have tried to get an application working on RPI3. There were these libraries available in the RPI OS distro, but apparently they were not compatible and did not work. Attempts with other libs failed.
            For the time being I gave up on this, because of different priorities.

            Vote the answer(s) that helped you to solve your issue(s)

            P K 2 Replies Last reply
            0
            • K koahnig

              @PouryaTorabi

              Are you trying to use some arbitrary EGL and GLES libs?
              AFAIK you need libraries cross-compiled for the target platform. Therefore, if you intend to use standard libs compiled for your desktop linux, you will have no chance to get them to work.

              Begin of year I have tried to get an application working on RPI3. There were these libraries available in the RPI OS distro, but apparently they were not compatible and did not work. Attempts with other libs failed.
              For the time being I gave up on this, because of different priorities.

              P Offline
              P Offline
              PouryaTorabi
              wrote on last edited by
              #6

              @koahnig So what exactly should I do?

              1 Reply Last reply
              0
              • K koahnig

                @PouryaTorabi

                Are you trying to use some arbitrary EGL and GLES libs?
                AFAIK you need libraries cross-compiled for the target platform. Therefore, if you intend to use standard libs compiled for your desktop linux, you will have no chance to get them to work.

                Begin of year I have tried to get an application working on RPI3. There were these libraries available in the RPI OS distro, but apparently they were not compatible and did not work. Attempts with other libs failed.
                For the time being I gave up on this, because of different priorities.

                K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                @koahnig said in Qt Raspberry Pi cross compiling:

                For the time being I gave up on this, because of different priorities.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                -1
                • A Offline
                  A Offline
                  AbhiTronix
                  wrote on last edited by
                  #8

                  Hello, you can follow my dedicated guide to cross-compile latest QT for any Raspberry Pi Mode or Version: https://github.com/abhiTronix/raspberry-pi-cross-compilers/blob/master/QT_build_instructions.md

                  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