[yocto] 1.7 - QtCreator ERROR while linking- /usr/bin/ld:cannot find /lib/libpthread.so.0 inside

Andreas Müller schnitzeltony at googlemail.com
Sun Feb 1 15:27:33 PST 2015


On Sat, Jan 31, 2015 at 9:35 AM, Simon Bolek <simon.bolek at googlemail.com> wrote:
> yo!
>
> I kind of solved the problem last night. At least i can deploy and run the
> app in qemu/device.
> @Martin: sorry again for direct mail, but i am not sure if my solution is
> THE solution. Maybe i
> just managed to find a workaround of sth, that can be solved someway else,
> OR i just have my settings wrong.
>
> As i already mentioned, linker was not the yocto-qt-sdk linker, but my
> ubuntu one. Even though LD variable had been set correctly. I just assume LD
> is for the linker, I have no idea if this LD should be used for linking. So
> I did copy the i586-poky-linux-ld:
> cp i586-poky-linux-ld ld
> and look there, QtCreator suddenly used this ld for linking. This did not
> solve the problem of looking for the libraries in /lib/ or /usr/lib of my
> ubuntu machine. Even though OE_QMAKE_LIBDIR_QT set to:
> /opt/poky/1.7/sysroots/i586-poky-linux/usr/lib:/opt/poky/1.7/sysroots/i586-poky-linux/lib
>
> Not even the adding of sysroot to $LD or to $LDFLAGS or to $OE_QMAKE_LDFLAGS
> or to $OE_QMAKE_CFLAGS helped:
> --sysroot=/opt/poky/1.7/sysroots/i586-poky-linux
>
> First setting QMAKE_LFLAGS manually in .pro like this:
> QMAKE_LFLAGS=--sysroot=/opt/poky/1.7/sysroots/i586-poky-linux
> caused the linker to look for the libraries. I will set this variable up in
> qt5.sh of sdk later.
>
> So, are those OE_QMAKE* variables used in some way? Where can i see them
> beeing used. And is this really the solution of the problem? I can't help
> the feeling that setting all those --sysroot in setup scripts (source oe...,
> and qt5.sh) when starting QtCreator is wrong/not having any function.
>
> BTW: I had to update QtCreator to 3.3.0, because deploying the application
> with 3.2.0 to qemu(core-image-sato) caused ssh problem of different
> protocols (qt hat the old one, not matching the new one in openssh library
> of yocto 1.7).
>
> cheers
> simon :-)
>
>> Date: Fri, 30 Jan 2015 16:59:31 +0100
>> From: Simon Bolek <simon.bolek at googlemail.com>
>> To: yocto at yoctoproject.org
>> Subject: [yocto] 1.7 - QtCreator ERROR while linking- /usr/bin/ld:
>>         cannot find /lib/libpthread.so.0 inside
>> Message-ID:
>>
>> <CAEfap_BwbJG8SZ_btNZAAKouS=JAWByJxkMB95n52qV7C=0PqQ at mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>>
>> hello!
>>
>> So after successfully bitbaking and installing meta-toolchain-st5 I set up
>> QtCreator 3.2.2 and tried to compile an app against SDK of qt5. However I
>> get an error:
>>
>> /usr/bin/ld: cannot find /lib/libpthread.so.0 inside
>> /usr/bin/ld: cannot find /usr/lib/libpthread_nonshared.a inside
>>
>> libpthread.so is available alright, but the linker is not finding it
>> somehow.
>>
>> LD variable is set to:
>> i586-poky-linux-ld --sysroot=/opt/poky/1.7/sysroots/i586-poky-linux
>>
>> Maybe this is a pure QtCreator bug, but where would I set(override) the
>> linker correctly? Any suggestions?
>>
>> If i run(from console ):
>> i586-poky-linux-ld --sysroot=/opt/poky/1.7/sysroots/i586-poky-linux
>> /opt/poky/1.7/sysroots/i586-poky-linux/usr/lib/libpthread.so
>> it is fine(it gives me some warning, but no errors).
>>
>> Here are the QtCreator settings for Qt5 Kit:
>> GCC Compiler:
>> path:
>>
>> /opt/poky/1.7/sysroots/i686-pokysdk-linux/usr/bin/i586-poky-linux/i586-poky-linux-gcc
>>
>> Qt Version:
>> qmake location:
>> /opt/poky/1.7/sysroots/i686-pokysdk-linux/usr/bin/qt5/qmake
>>
>> Qt Kit:
>> sysroot: /opt/poky/1.7/sysroots/i586-poky-linux
>> compiler: set to above gcc compiler
>> qt version: set to above qt version
>>
>> even manually setting LIBS to
>> LIBS += -L//opt/poky/1.7/sysroots/i586-poky-linux/lib
>> or
>> LIBS += -L//opt/poky/1.7/sysroots/i586-poky-linux/usr/lib
>> does not help(but i really do not think this is the problem).
>>
>> So you have any hints for me?
>> I compared the settings of 1.6.1, and there is no difference as far as my
>> eye can catch.
>>
>>
>> PS. I switched from 1.6.1 to 1.7, becasue of gclib not beeing available in
>> 1.6.1.
>>
>> cheers
>> simon :-)
>
Maybe off-topic but how did you get qt-creator on target do something
useful without target qmake?

Andreas



More information about the yocto mailing list