Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] I don't use my custom build Qt

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

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 3.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.
  • M Offline
    M Offline
    moravas
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

        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
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

            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
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

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

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

                  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
                  0

                  • Login

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