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 compilation issues Qt + libmatrix_creator_hal

Cross compilation issues Qt + libmatrix_creator_hal

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 514 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.
  • X Offline
    X Offline
    X-Krys
    wrote on last edited by X-Krys
    #1

    Hi,

    I'm trying to cross compile an application that use both Qt and matrix_creator_hal libs.

    My environment is:

    • Qt 5.12
    • host: Intel (x86_64) on Ubuntu 17.10
    • target: Raspberry Pi (armv7l) on Raspbian Stretch 9.6
    • IDE: Qt Creator 4.8

    I did setup my toolchain on Qt Creator along with a Kit with sysroot set.

    I can successfully cross compile Qt only apps but when I link to matrix_creator_hal lib I get theses errors during link:

    [...]/sysroot/usr/lib/libmatrix_creator_hal.so: undefined reference to `typeinfo for std::thread::_State@GLIBCXX_3.4.22'
    

    My pro file contain this line:

    LIBS += -lmatrix_creator_hal
    

    Any ideas how to fix this?

    Thanks

    kshegunovK 1 Reply Last reply
    0
    • X X-Krys

      Hi,

      I'm trying to cross compile an application that use both Qt and matrix_creator_hal libs.

      My environment is:

      • Qt 5.12
      • host: Intel (x86_64) on Ubuntu 17.10
      • target: Raspberry Pi (armv7l) on Raspbian Stretch 9.6
      • IDE: Qt Creator 4.8

      I did setup my toolchain on Qt Creator along with a Kit with sysroot set.

      I can successfully cross compile Qt only apps but when I link to matrix_creator_hal lib I get theses errors during link:

      [...]/sysroot/usr/lib/libmatrix_creator_hal.so: undefined reference to `typeinfo for std::thread::_State@GLIBCXX_3.4.22'
      

      My pro file contain this line:

      LIBS += -lmatrix_creator_hal
      

      Any ideas how to fix this?

      Thanks

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by kshegunov
      #2

      @X-Krys said in Cross compilation issues Qt + libmatrix_creator_hal:

      I can successfully cross compile Qt only apps but when I link to matrix_creator_hal lib I get theses errors during link:

      libmatrix_creator_hal.so comes from? The package manager? This looks like a version/compiler mismatch error. Make sure the standard library (libstdc++) used for libmatrix_creator_hal.so is the same as the one you have when linking. Compilers must be producing binary compatible code, naturally.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      0
      • X Offline
        X Offline
        X-Krys
        wrote on last edited by
        #3

        @kshegunov Yes libmatrix_creator_hal comes from the package manager

        Ok so ldd on libmatrix_creator_hal gives me:

        libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76bc3000)
        

        On the other side my compiler is gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03)

        So it means I should use GCC 6 to match the compiler that lib has been built with ?

        kshegunovK 1 Reply Last reply
        0
        • X X-Krys

          @kshegunov Yes libmatrix_creator_hal comes from the package manager

          Ok so ldd on libmatrix_creator_hal gives me:

          libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76bc3000)
          

          On the other side my compiler is gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03)

          So it means I should use GCC 6 to match the compiler that lib has been built with ?

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by kshegunov
          #4

          @X-Krys said in Cross compilation issues Qt + libmatrix_creator_hal:

          So it means I should use GCC 6 to match the compiler that lib has been built with ?

          6 is the library version, so you should use the same major version of the stdc++ (assuming they keep binary compatibility, which I'm not sure about). Also you need to use a compiler that produces code that is binary compatible with the compiler used to build that library, unfortunately I have no clue which version is that exactly, but I really doubt it's as old as gcc 4.8.3.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          1

          • Login

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