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 on Raspberry relocation error
Forum Updated to NodeBB v4.3 + New Features

Qt on Raspberry relocation error

Scheduled Pinned Locked Moved Solved Mobile and Embedded
9 Posts 3 Posters 1.9k 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.
  • M Offline
    M Offline
    maxwell31
    wrote on last edited by
    #1

    Hi,
    I cross-compiled Qt 5.11 for Raspian Stretch. When trying out my qt application I get the following error:
    ./myprog: relocation error: /usr/local/qt5pi/lib/libQt5Quick.so.5: symbol _ZNK14QWindowPrivate12shareContextEv, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference

    what is the problem?

    raven-worxR 1 Reply Last reply
    0
    • M maxwell31

      Hi,
      I cross-compiled Qt 5.11 for Raspian Stretch. When trying out my qt application I get the following error:
      ./myprog: relocation error: /usr/local/qt5pi/lib/libQt5Quick.so.5: symbol _ZNK14QWindowPrivate12shareContextEv, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference

      what is the problem?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @maxwell31
      you should at least show the configure call of your cross compilation

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • M Offline
        M Offline
        maxwell31
        wrote on last edited by
        #3

        ./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/home/username/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/username/raspberry/sysroot/ -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/username/raspberry/qt5pi -hostprefix /home/username/raspberry/qt5pi_host -v

        raven-worxR 1 Reply Last reply
        0
        • M maxwell31

          ./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/home/username/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/username/raspberry/sysroot/ -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/username/raspberry/qt5pi -hostprefix /home/username/raspberry/qt5pi_host -v

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by raven-worx
          #4

          @maxwell31
          where is your -xplatform parameter. i guess you are not compiling on an ARM device, since you are cross compiling?!
          See this

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • M Offline
            M Offline
            maxwell31
            wrote on last edited by
            #5

            I was compiling under Ubuntu 16.04.

            Hm, the error went away after setting
            export LD_LIBRARY_PATH=/usr/local/qt5pi/lib/

            I don't understand why this was necessary, as ldd already reported that it found the shared objects.

            Now I get the following error:
            QQmlApplicationEngine failed to load component
            qrc:/main.qml:4 module "QtQuick.Controls" is not installed

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

              Hi,

              Did you copy your cross-compiled version of Qt on your target ?

              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
              • M Offline
                M Offline
                maxwell31
                wrote on last edited by
                #7

                Ok :-)

                During make install my disk ran out of space and I did not notice the error and only copied a partial qt install

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  maxwell31
                  wrote on last edited by
                  #8

                  it is working fine now

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

                    Great !

                    Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

                    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