Qt5 creator build fail for IMX6 Sabre board(/usr/bin/ld: cannot find -lQt5Widgets)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Qt5 creator build fail for IMX6 Sabre board(/usr/bin/ld: cannot find -lQt5Widgets)

4,922件の閲覧回数
anilchowdary
Contributor II

Setting up the qt creator to build for I.MX6 Sabre SDB :-

*My yocto build PC0 setup:-

> Yocto build version: 4.1.15-2.0.1 with Bitbake Image type: fsl-image-qt5
> for qt toolcahin : bitbake meta-toolchain-qt5

> after this fsl-imx-xwayland-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.0.1.sh got generated successfully. 

*my Qt Development PC1:-

HostPC : Ubuntu 16.04LTS

> Qt5 tool-chain sh file  copied from  PC0 to PC1 and executed the fsl-imx-xwayland-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.0.1.sh

> following link:Setting up Qt Creator to build for i.MX6 

QtCreator: http://www.qt.io/download-open-source/ as recommended

      #Compiler Path: /opt/fsl-imx-xwayland/4.1.15-2.0.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++

      #qmake: /opt/fsl-imx-xwayland/4.1.15-2.0.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake

pastedImage_8.png

Error:

pastedImage_9.png

Don't know what is wrong, please help on this, its very important for me.

please anyone can give solution for this, waiting for your reply. 

Thanks & Regards

-Anil

ラベル(3)
7 返答(返信)

3,748件の閲覧回数
donam
Contributor I

I have done with config QT  build to IMX6Q. Yocto L4.1.15_2.1.0_ga. When finish my project I will write the detail about How to config QT built to IMX6Q. Thanks Gusarambula alot!

0 件の賞賛
返信

3,749件の閲覧回数
donam
Contributor I

I used ubuntu 14.04 64 bit, and flow the same guide

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

everything same with top topic and get

Screenshot from 2017-05-21 10_04_32.pngScreenshot from 2017-05-21 10_08_28.png

0 件の賞賛
返信

3,749件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

Hello Anil Kumar and Do Nam,

I’ve replicated this issue. I tried adding the path to the sysroot on the .pro file of the QtCreator proyect:

QMAKE_LFLAGS=--sysroot=/opt/fsl-imx-x11/4.1.15-2.0.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi

Which manages to find the libraries, but I’m seeing a compatibility error. Perhaps you can try this and let me know the outcome?

Regards,

0 件の賞賛
返信

3,749件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

Hello Anil Kumar and Do Nam,

Updating this thread, the QMAKE_LFLAGS does points to the correct libraries. However, the root cause of this issue is that the architecture is not matching the libraries, which seemed odd.

If you look at the Makefile created by qmake it was not using the correct toolchain.

The way to give qmake the right parameters to build is by using a qmake configuration file. You would need to add the linux-arm-gnueabi-g++ spec on:

/opt/<DISTRO>/<VERSION>/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/

You should have several specs. On this same folder create the linux-arm-gnueabi-g++ spec folder and create the qmake.conf and qplatformdefs.h:

/opt/<DISTRO>/<VERSION>/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/ linux-arm-gnueabi-g++/qmake.conf

/opt/<DISTRO>/<VERSION>/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/ linux-arm-gnueabi-g++/qplatformdefs.h

I have attached the format of both. You may leave the gplatformdefs.h untouched and just edit qmake.conf so it has the right path for the sysroot on your system.

Then on the Kits settings under Qt mkspec you would need to write: linux-arm-poky-gnueabi-g++.

Qt_mkspec.png

After setting all this up please make a clean and then run qmake and build again. It should be able to find the right libraries now.

 

Regards,

3,749件の閲覧回数
donam
Contributor I

HI Gusarambula,

It still didn't work! :smileysad:

I did post in this topic: 

Building Qt applications for i.MX6QPhttps://community.nxp.com/thread/444316#comment-879125 

0 件の賞賛
返信

3,749件の閲覧回数
anilchowdary
Contributor II

HI Gusarambula,

Thanks for your valuable inputs and its helps a lot.

Regards

-Anil

0 件の賞賛
返信

3,749件の閲覧回数
donam
Contributor I

I am same problem with u!

0 件の賞賛
返信