Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    [Solved] I don't use my custom build Qt

    General and Desktop
    2
    8
    3252
    Loading More Posts
    • 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
      moravas last edited by

      Update:
      I use different compiler to compile Qt framework and to my project. If I compile those with same compiler, the problem doesn't occurs longer.

      Hi People,

      My problem is the following:

      • I have an ARM Cortex A8 based embedded device.
      • On this device would like I run an custom Qt application.
      • I build the Qt 5.0.2 framework from source for those.

      Everything is OK during the building, but I don't can compile my fist test application which uses a simple QVector instance, like this:

      @
      int main()
      {
      QVector<int> v;
      return 0;
      }
      @

      I got the following error from the linker:
      @
      g++ -Wl,-O1 -Wl,-rpath,/home/<path>/bin/lib -o masterController main.o -L/home/<path>/bin/lib -lQt5Core -lpthread
      main.o: In function main': /home/<path>/masterController/../../../../<path>/include/QtCore/qvector.h:76: undefined reference to QArrayData::deallocate(QArrayData*, unsigned long, unsigned long)'
      collect2: ld returned 1 exit status
      @
      This messages says that the linker doesn't found any "deallocate" method which accept two unsigned long parameter. I list the libQt5Core.so lib with the following command:
      @
      readelf -Ws libQt5Core.so | grep deallocate | c++filt
      @

      and got this:
      @
      3219: 0006dfed 20 FUNC GLOBAL DEFAULT 12 QArrayData::deallocate(QArrayData*, unsigned int, unsigned int)
      @

      So I have "deallocate" method, but at compile time the parameters are identify as unsigned int -s but the linker looking for unsigned long-s.

      I don't any idea how can I fix this bug. Have anybody some tip?

      Regards,
      Norbert

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Are you sure you are using the cross-compiler ? g++ is generally the compiler installed on your system. You should rather have something like arm-linux-something-g++ while compiling for 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 Reply Quote 0
        • M
          moravas last edited by

          Hi,

          I don't use the traditional meaning cross compilation. The board has 1GHz CPU and 1GB RAM so I decided that it is able to compile the full Qt framework itself.
          What you see in the logs as "g++" is the output from the ssh console of embedded board.

          Regards,
          Norbert

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Ok, so your compiling everything directly on your target.

            Your paths look strange to me. Did you install your Qt 5 build properly ?

            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 Reply Quote 0
            • M
              moravas last edited by

              Hi,

              my path looks out in the first post:
              "/home/<path>/bin/lib"
              because I don't would like displaying the full length of path, but the original path looks like this:
              "/home/moravas/project/thesisOfMSC/cubie/bin/lib"

              Regards,
              Norbert

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                That doesn't answer my first question:

                Did you compile and install Qt 5 properly 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 Reply Quote 0
                • M
                  moravas last edited by

                  yes, I ran configure, make, make check and make install.
                  For configure I specified the install path, c++11 support, and -no-pch.

                  Regards,
                  Norbert

                  1 Reply Last reply Reply Quote 0
                  • M
                    moravas last edited by

                    Hi,

                    some update: I am looking for some error on the internet and I found the following two bug reports:
                    https://codereview.qt-project.org/#change,32868
                    https://codereview.qt-project.org/#change,33493

                    They have same error messages and the status of ticket is closed and solved, but I don't understand where I can reach the solution (branch, Qt release, tag, etc...)

                    Can anybody help me? :(

                    Thank you
                    Regards,
                    Norbert

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post