PDA

View Full Version : Compiling for Yocto Krogoth- incompatible library file



MikeE
16th November 2017, 17:47
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"

d_stranz
16th November 2017, 18:15
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.

MikeE
17th November 2017, 11:25
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.

ChrisW67
18th November 2017, 05:46
Does:


ldd /opt/poky/2.1.3/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib//libQt5Quick.so

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.