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. Configuration issue (sysroot, libraries) when build yocto Qt5 for beaglebone
Forum Updated to NodeBB v4.3 + New Features

Configuration issue (sysroot, libraries) when build yocto Qt5 for beaglebone

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 5 Posters 4.4k 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.
  • F Offline
    F Offline
    Fanning
    wrote on last edited by
    #1

    Hello,

    I'm using Yocto and configures a dedicated kit to the cross compilation environment for beagle bone black.
    When I tried to compile a "helloworld" program I had a linking issue.

    Host: ubuntu 16.04 64 Bit, YP Core - Krogoth 2.1.1(Yocto), Qt 5.6.1

    I bitbake @bitbake meta-toolchain-qt5@ and the output :
    @/home/fanning/data/yocto_bbb/build/tmp/deploy/sdk@

    I run scrip @poky-glibc-x86_64-meta-toolchain-qt5-cortexa8hf-neon-toolchain-2.1.1.sh@ and the output save to /opt.

    QtCreator configuration

    I did update qtcreator.sh to set the env variable required for cross compilation
    Sysyroot: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux@
    Compiler: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ @
    QtVersion: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake@(qt 5.6.2).
    Debug: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb@

    The issue
    When I tried to compile my "Hello" program (named QtVersion and writing the version of Qt in a console), the linker is giving me the following error.

    g++ -o QtVersion main.o -lQt5Core -lpthread
    /usr/bin/ld: cannot find -lQt5Core

    When i try:
    @INCLUDEPATH += /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/include@
    @LIBS += /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/*.so@ into .pro file on Qt then error

    Error: @/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libBrokenLocale.so: error adding symbols: File in wrong format@

    I hope you will be able to help me to solve it.

    Thx and rgds,
    Fanning

    jsulmJ M chaithubkC 3 Replies Last reply
    0
    • F Fanning

      Hello,

      I'm using Yocto and configures a dedicated kit to the cross compilation environment for beagle bone black.
      When I tried to compile a "helloworld" program I had a linking issue.

      Host: ubuntu 16.04 64 Bit, YP Core - Krogoth 2.1.1(Yocto), Qt 5.6.1

      I bitbake @bitbake meta-toolchain-qt5@ and the output :
      @/home/fanning/data/yocto_bbb/build/tmp/deploy/sdk@

      I run scrip @poky-glibc-x86_64-meta-toolchain-qt5-cortexa8hf-neon-toolchain-2.1.1.sh@ and the output save to /opt.

      QtCreator configuration

      I did update qtcreator.sh to set the env variable required for cross compilation
      Sysyroot: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux@
      Compiler: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ @
      QtVersion: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake@(qt 5.6.2).
      Debug: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb@

      The issue
      When I tried to compile my "Hello" program (named QtVersion and writing the version of Qt in a console), the linker is giving me the following error.

      g++ -o QtVersion main.o -lQt5Core -lpthread
      /usr/bin/ld: cannot find -lQt5Core

      When i try:
      @INCLUDEPATH += /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/include@
      @LIBS += /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/*.so@ into .pro file on Qt then error

      Error: @/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libBrokenLocale.so: error adding symbols: File in wrong format@

      I hope you will be able to help me to solve it.

      Thx and rgds,
      Fanning

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @Fanning said in Configuration issue (sysroot, libraries) when build yocto Qt5 for beaglebone:

      LIBS += /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/*.so

      Are you adding ALL libs?
      If it says wrong format then you're probably using wrong compiler (your host compiler?).
      You call

      g++ -o QtVersion main.o -lQt5Core -lpthread
      

      What is g++ in this case (you can check calling 'which g++')? It should be your cross- compiler not the host x86 compiler. You can specify the whole path to the compiler.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Fanning
        wrote on last edited by
        #3

        Hi, thank for your rep !

        If i change like this: @LIBS += /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/Qt.so@

        Error:
        g++ -o BBB main.o /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/Qt.so -lQt5Core -lpthread
        /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libQt53DCore.so: error adding symbols: File in wrong format.

        I check @which g++@ the output @/usr/bin/g++@

        What i can do to change compiler arm-poky-linux on Qt ?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tasi
          wrote on last edited by
          #4

          Hi Fanning,

          have you any solution?

          Thanks,
          Tasi

          1 Reply Last reply
          0
          • F Fanning

            Hello,

            I'm using Yocto and configures a dedicated kit to the cross compilation environment for beagle bone black.
            When I tried to compile a "helloworld" program I had a linking issue.

            Host: ubuntu 16.04 64 Bit, YP Core - Krogoth 2.1.1(Yocto), Qt 5.6.1

            I bitbake @bitbake meta-toolchain-qt5@ and the output :
            @/home/fanning/data/yocto_bbb/build/tmp/deploy/sdk@

            I run scrip @poky-glibc-x86_64-meta-toolchain-qt5-cortexa8hf-neon-toolchain-2.1.1.sh@ and the output save to /opt.

            QtCreator configuration

            I did update qtcreator.sh to set the env variable required for cross compilation
            Sysyroot: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux@
            Compiler: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ @
            QtVersion: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake@(qt 5.6.2).
            Debug: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb@

            The issue
            When I tried to compile my "Hello" program (named QtVersion and writing the version of Qt in a console), the linker is giving me the following error.

            g++ -o QtVersion main.o -lQt5Core -lpthread
            /usr/bin/ld: cannot find -lQt5Core

            When i try:
            @INCLUDEPATH += /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/include@
            @LIBS += /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/*.so@ into .pro file on Qt then error

            Error: @/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libBrokenLocale.so: error adding symbols: File in wrong format@

            I hope you will be able to help me to solve it.

            Thx and rgds,
            Fanning

            M Offline
            M Offline
            mostefa
            wrote on last edited by mostefa
            #5

            @Fanning said in Configuration issue (sysroot, libraries) when build yocto Qt5 for beaglebone:

            Hello,

            I'm using Yocto and configures a dedicated kit to the cross compilation environment for beagle bone black.
            When I tried to compile a "helloworld" program I had a linking issue.

            Host: ubuntu 16.04 64 Bit, YP Core - Krogoth 2.1.1(Yocto), Qt 5.6.1

            I bitbake @bitbake meta-toolchain-qt5@ and the output :
            @/home/fanning/data/yocto_bbb/build/tmp/deploy/sdk@

            I run scrip @poky-glibc-x86_64-meta-toolchain-qt5-cortexa8hf-neon-toolchain-2.1.1.sh@ and the output save to /opt.

            QtCreator configuration

            I did update qtcreator.sh to set the env variable required for cross compilation
            Sysyroot: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux@

            Hi, for me the problem is your sysroot path in Qt creator:

            /opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux

            Path of sysroot need to be something like this :

            /opt/poky/1.6.3/sysroots/armv6-vfp-poky-linux-gnueabi/

            This path is according to my raspberrypi build (with daisy branch of meta-raspberry)

            So i think that path of your sysroot should be something like this:

            /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi

            Hope this can help you, if not keep me informed

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tasi
              wrote on last edited by
              #6

              Hi mostefa,

              I setting like you, but error still occurs
              "/usr/bin/ld: cannot find -lQt5Core"

              Thanks,
              Tasi

              jsulmJ 1 Reply Last reply
              0
              • M Offline
                M Offline
                mostefa
                wrote on last edited by
                #7

                @tasi

                Try to :

                1. close qtcreator
                2. where your qtcreator is installed , open your qtcreator.sh wih gedit and add the following line:

                source /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi

                on the top of your qtcreator.sh

                and save ,

                Run your qtcreator again and see if it is better,

                I also advise to install a new clean version of qtcreator , (maybe your env variable are not good now)

                this version worked for me with raspberrypi:

                http://download.qt-project.org/official_releases/qtcreator/3.2/3.2.2/qt-creator-opensource-linux-x86_64-3.2.2.run

                and then do the step i described.

                Waiting for your feedback !

                1 Reply Last reply
                0
                • T tasi

                  Hi mostefa,

                  I setting like you, but error still occurs
                  "/usr/bin/ld: cannot find -lQt5Core"

                  Thanks,
                  Tasi

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @tasi @mostefa I would not do any hacks like editing qtcreator.sh! This is not the clean solution.
                  You just need to set-up your Kit for cross-compilation correctly in QtCreator: select correct compiler and correct Qt version.
                  Did you actually set-up a Kit?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  M 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @tasi @mostefa I would not do any hacks like editing qtcreator.sh! This is not the clean solution.
                    You just need to set-up your Kit for cross-compilation correctly in QtCreator: select correct compiler and correct Qt version.
                    Did you actually set-up a Kit?

                    M Offline
                    M Offline
                    mostefa
                    wrote on last edited by mostefa
                    #9

                    @jsulm said in Configuration issue (sysroot, libraries) when build yocto Qt5 for beaglebone:

                    @tasi @mostefa I would not do any hacks like editing qtcreator.sh! This is not the clean solution.
                    You just need to set-up your Kit for cross-compilation correctly in QtCreator: select correct compiler and correct Qt version.
                    Did you actually set-up a Kit?

                    AFAIK, this is a common practice, for embedded device !!!

                    https://community.nxp.com/thread/309578

                    https://community.nxp.com/docs/DOC-95251

                    http://wiki.hioproject.org/index.php?title=HIO_Wiki:Set_Up_Qt_Creator_for_Yocto_Device

                    1 Reply Last reply
                    0
                    • F Fanning

                      Hello,

                      I'm using Yocto and configures a dedicated kit to the cross compilation environment for beagle bone black.
                      When I tried to compile a "helloworld" program I had a linking issue.

                      Host: ubuntu 16.04 64 Bit, YP Core - Krogoth 2.1.1(Yocto), Qt 5.6.1

                      I bitbake @bitbake meta-toolchain-qt5@ and the output :
                      @/home/fanning/data/yocto_bbb/build/tmp/deploy/sdk@

                      I run scrip @poky-glibc-x86_64-meta-toolchain-qt5-cortexa8hf-neon-toolchain-2.1.1.sh@ and the output save to /opt.

                      QtCreator configuration

                      I did update qtcreator.sh to set the env variable required for cross compilation
                      Sysyroot: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux@
                      Compiler: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ @
                      QtVersion: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake@(qt 5.6.2).
                      Debug: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb@

                      The issue
                      When I tried to compile my "Hello" program (named QtVersion and writing the version of Qt in a console), the linker is giving me the following error.

                      g++ -o QtVersion main.o -lQt5Core -lpthread
                      /usr/bin/ld: cannot find -lQt5Core

                      When i try:
                      @INCLUDEPATH += /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/include@
                      @LIBS += /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/*.so@ into .pro file on Qt then error

                      Error: @/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libBrokenLocale.so: error adding symbols: File in wrong format@

                      I hope you will be able to help me to solve it.

                      Thx and rgds,
                      Fanning

                      chaithubkC Offline
                      chaithubkC Offline
                      chaithubk
                      wrote on last edited by chaithubk
                      #10
                      This post is deleted!
                      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