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 5.5.1 for armhf on Ubuntu 15.10
QtWS25 Last Chance

Cross compiling Qt 5.5.1 for armhf on Ubuntu 15.10

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5.5.1armhfubuntu 15.10cross compile
8 Posts 2 Posters 6.4k 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.
  • Z Offline
    Z Offline
    zzarr
    wrote on last edited by
    #1

    Hello!

    I'm trying to cross compile Qt 5.5.1 for armhf on Ubuntu 15.10.

    I've downloaded qt 5.5.1 and extracted it in a directory.

    I have installed all the required packages. (I think.)

    I copied the arm-linux-gnueabi-g++ and named it arm-linux-gnueabihf-g++.

    I changed "arm-linux-gnueabihf-g++/qmake.conf" so that it looks like this:

    #
    # qmake configuration for building with arm-linux-gnueabihf-g++
    #
    
    MAKEFILE_GENERATOR      = UNIX
    CONFIG                 += incremental
    QMAKE_INCREMENTAL_STYLE = sublib
    
    include(../common/linux.conf)
    include(../common/gcc-base-unix.conf)
    include(../common/g++-unix.conf)
    
    # modifications to g++.conf
    QMAKE_CC                = arm-linux-gnueabihf-gcc
    QMAKE_CXX               = arm-linux-gnueabihf-g++
    QMAKE_LINK              = arm-linux-gnueabihf-g++
    QMAKE_LINK_SHLIB        = arm-linux-gnueabihf-g++
    
    # modifications to linux.conf
    QMAKE_AR                = arm-linux-gnueabihf-ar cqs
    QMAKE_OBJCOPY           = arm-linux-gnueabihf-objcopy
    QMAKE_NM                = arm-linux-gnueabihf-nm -P
    QMAKE_STRIP             = arm-linux-gnueabihf-strip
    load(qt_config)
    

    And I run this command in the qt-everywhere-opensource-src-5.5.1 directory:

    ./configure -opensource -confirm-license -platform linux-arm-gnueabihf-g++ -release -prefix /usr/local/Qt-5.5.1-arm -qt-xcb -L/usr/arm-linux-gnueabihf/lib -v
    

    But I get the following error:

    qt-everywhere-opensource-src-5.5.1/qtbase/bin/qmake: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
    

    I have checked and /usr/arm-linux-gnueabihf/lib/libstdc++.so.6 does exist.

    What am I doing wrong?

    Best Regards
    / Rasmus

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

      Hi and welcome to devnet,

      You are missing a space between -L and the path.

      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
      • Z Offline
        Z Offline
        zzarr
        wrote on last edited by
        #3

        Hello and thank you!

        I added a space where you suggested, but unfortunately it didn't help.

        I must be doing (or not doing) some other thing wrong.

        I come across the name "fixQualifiedLibraryPaths" time after time, is that something that would help?
        Is is universal or device specific?

        Best Regards
        / Rasmus

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          zzarr
          wrote on last edited by
          #4

          I have tried some more now, still I get the same error.

          I noticed that it seems that ./configure knows about the path to the library, it's one of the first outputs from the configuration:

          Precompiled-headers support enabled.
          arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
          Symbol visibility control enabled.
          arm-linux-gnueabihf-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
          bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
           #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
            ^
          Symbolic function binding disabled.
          DEFAULT_INCDIRS="/usr/arm-linux-gnueabihf/include/c++/5
          /usr/arm-linux-gnueabihf/include/c++/5/arm-linux-gnueabihf
          /usr/arm-linux-gnueabihf/include/c++/5/backward
          /usr/lib/gcc-cross/arm-linux-gnueabihf/5/include
          /usr/lib/gcc-cross/arm-linux-gnueabihf/5/include-fixed
          /usr/arm-linux-gnueabihf/include
          /usr/include
          "
          DEFAULT_LIBDIRS="/usr/lib/gcc-cross/arm-linux-gnueabihf/5
          /usr/arm-linux-gnueabihf/lib
          /lib
          /usr/lib
          "
          Creating qmake...
          

          I noticed an error message, but it seems it have been for a while.

          Best Regards
          / Rasmus

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            zzarr
            wrote on last edited by
            #5

            I put the output from configure in a pastebin:

            http://pastebin.com/ujQVwN7h (This will work in 1 month from today.)

            Best Regards
            / Rasmus

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

              Are you cross-compiling for the Raspberry Pi ?

              In any case, what do you get if your run ldd on qmake ?

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

                It's not a raspberry pi, but it is a small SBC.

                I manage to solve the problem, I had missed the "-xplatform" argument.

                Best Regards
                / Rasmus

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

                  Good catch !

                  I missed that one on your configure line.

                  Since you have it working now, please mark the thread as solved using the "Topic Tool" 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