Results 1 to 4 of 4

Thread: Compiling for Yocto Krogoth- incompatible library file

  1. #1
    Join Date
    Nov 2017
    Posts
    2
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Compiling for Yocto Krogoth- incompatible library file

    Hi,

    I have been working with Qt Creator 4.2.1 and an i.MX6 ARM processor running Yocto fido. I have been trying to upgrade the toolchain to work with Krogoth, but find a problem I can't understand. I built the toolchain using bitbake and installed it. I have set up compilers, debuggers, The Qt version, and the sysroot. I checked back that this is all set up the the same as the working kit for Yocto fido. I run Qt Creator from the command line and source the new environment file before running Qt Creator.

    When I run a build, the files compile but I get linker errors. At first, I got the error
    "/usr/bin/ld: cannot find -lQt5Quick"
    "/usr/bin/ld: cannot find -lQt5Widgets"

    and 2 or three others

    etc

    I then added:

    INCLUDEPATH += /opt/poky/2.1.3/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib
    LIBS += -L/opt/poky/2.1.3/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/ -lQt5Quick

    I now get the following errors
    "/usr/bin/ld: skipping incompatible /opt/poky/2.1.3/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib//libQt5Widgets.so when searching for -lQt5Quick"
    "/usr/bin/ld: cannot find -lQt5Quick"

    When I search the library files, I see exactly the same files for the libraries which work (fido 1.8.2) and the new libraries which don't work (Krogoth 2.1.3"

    Can anyone explain what's wrong with my library set up? I have seen a couple of posts from other newbies with the same problem, but none of them have a conclusion.

    Thanks!


    Added after 11 minutes:


    That should have been:
    "/usr/bin/ld: skipping incompatible /opt/poky/2.1.3/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib//libQt5Quick.so when searching for -lQt5Quick""/usr/bin/ld: skipping incompatible /opt/poky/2.1.3/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib//libQt5Widgets.so when searching for -lQt5Quick"

    "/usr/bin/ld: skipping incompatible /opt/poky/2.1.3/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib//libQt5Widgets.so when searching for -lQt5Widgets"
    Last edited by MikeE; 16th November 2017 at 18:47.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Compiling for Yocto Krogoth- incompatible library file

    Sounds like the Qt5 libraries you are trying to link to were not built against the same version of Qt that your project is using, or used different compilation options, or ... could be any number of things.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Nov 2017
    Posts
    2
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Compiling for Yocto Krogoth- incompatible library file

    Ok, so I am using Qt 5.6.2, as that is the version supplied with Yocto Krogoth. For the Qt version in my kit I have specified Qt 5.6.2 (taken from theYocto Krogoth toolchain). Is there somewhere else I need to specify the version of QtQuick?

    My qml files specify:
    [import QtQuick 2.0]

    I didn't think that was a problem. I thought I could import older versions of QtQuick and the new versions were backward compatible? For example, I can build for Qt 5.4.2 and import QtQuick 2.0 instead of QtQuick 2.4 with no problem.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Compiling for Yocto Krogoth- incompatible library file

    Does:
    Qt Code:
    1. ldd /opt/poky/2.1.3/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib//libQt5Quick.so
    To copy to clipboard, switch view to plain text mode 
    shed any light on why the library might be considered incompatible? In all likelihood, the file is a symlink to libQt5Quick.so.5.6.2: execute ldd against the thing it points at.
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

Similar Threads

  1. Qt Creator Qt5.8 - incompatible library problem
    By TonyB in forum Qt Tools
    Replies: 3
    Last Post: 25th April 2017, 19:32
  2. Replies: 0
    Last Post: 21st November 2012, 19:11
  3. Replies: 6
    Last Post: 31st July 2012, 21:35
  4. Cannot mix incompatible Qt library
    By ycyclop in forum Installation and Deployment
    Replies: 0
    Last Post: 12th March 2012, 14:01
  5. Cannot mix incompatible Qt library
    By hubipet in forum Qt Programming
    Replies: 4
    Last Post: 13th February 2012, 20:03

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.