Qt make: g++: Command not found issue with SDK generated for soloX

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

Qt make: g++: Command not found issue with SDK generated for soloX

ソリューションへジャンプ
7,122件の閲覧回数
Alankar
Contributor II

i have used following steps to get and build the BSP for soloX sabre board. i am using Krogoth branch to build the bsp and populate sdk

GitHub - Freescale/fsl-community-bsp-platform: BSP platform manifest 

then i added qt support in the build by following 

Building Qt5 using yocto on Wandboard - Wandboard Wiki 

after that i bitbaked toolchain for this using following

$ bitbake meta-toolchain-qt5

after this i generated sdk using following command

$ bitbake <image-name> -c populate_sdk

and then i installed the sdk on my development machine, it is installed under

/opt/poky/2.1.1/

now i installed and setup latest Qt by using following steps

Setup QT Creator with Yocto Build 

After all this setup done, i created a simple console application and trying to build it, and i get an error as

14:10:10: Running steps for project HelloWorld...
14:10:10: Configuration unchanged, skipping qmake step.
14:10:10: Starting: "/usr/bin/make"
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_CORE_LIB -I../HelloWorld -I. -I/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/qt5 -I/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/qt5/QtCore -I. -I/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-g++ -o main.o ../HelloWorld/main.cpp
make: g++: Command not found
make: *** [main.o] Error 127
14:10:10: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project HelloWorld (kit: mx6solox)
The kit mx6solox has configuration issues which might be the root cause for this problem.
When executing step "Make"
14:10:10: Elapsed time: 00:00.

i have googled a lot but could not find any solution on this.

Can somebody please help on this...

ラベル(2)
1 解決策
4,424件の閲覧回数
Alankar
Contributor II

Hi gusarambula,

i am able to resolve this issue, following are the details

Actually When qmake is run, qtcreator by default puts a “-spec $(QMAKE_XSPEC)” to the argument list. This was causing the compiler now to default to the x86 one instead of the arm one. This was why the compile was failing.

 

The quick fix for this problem is to override the QMAKE_XSPEC variable. This is pretty simple in qtcreator; go to Tools->Options->Build &Run->Kits and add “linux-oe-g++” to the “Qt mkspec” text box.

To add to this, the bug is probably here:

-shortxspec=`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`

-shortspec=`echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`

+if [ "$QT_CROSS_COMPILE" = "yes" ] ; then

+    shortxspec=linux-g++

+    shortspec=linux-g++

+else

+    shortxspec=`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`

+    shortspec=`echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`

+fi

This is a in a patch file:

/fsl-community-bsp/sources/meta-qt5/recipes-qt/qt5/qtbase /0008-configure-paths-for-target-qmake-properly.patch

and i believe this patch is being applied. i think somebody from Yocto community need to look into this, i will post this to Yocto mailing list also...

Regards...

元の投稿で解決策を見る

4 返答(返信)
4,425件の閲覧回数
Alankar
Contributor II

Hi gusarambula,

i am able to resolve this issue, following are the details

Actually When qmake is run, qtcreator by default puts a “-spec $(QMAKE_XSPEC)” to the argument list. This was causing the compiler now to default to the x86 one instead of the arm one. This was why the compile was failing.

 

The quick fix for this problem is to override the QMAKE_XSPEC variable. This is pretty simple in qtcreator; go to Tools->Options->Build &Run->Kits and add “linux-oe-g++” to the “Qt mkspec” text box.

To add to this, the bug is probably here:

-shortxspec=`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`

-shortspec=`echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`

+if [ "$QT_CROSS_COMPILE" = "yes" ] ; then

+    shortxspec=linux-g++

+    shortspec=linux-g++

+else

+    shortxspec=`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`

+    shortspec=`echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`

+fi

This is a in a patch file:

/fsl-community-bsp/sources/meta-qt5/recipes-qt/qt5/qtbase /0008-configure-paths-for-target-qmake-properly.patch

and i believe this patch is being applied. i think somebody from Yocto community need to look into this, i will post this to Yocto mailing list also...

Regards...

4,424件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

Thank you very much for posting your findings, Alankar Dhobale!

0 件の賞賛
返信
4,423件の閲覧回数
raz3l
Contributor III

I have encountered the same problem of Alankar‌. Do you know if this already solved gusarambula‌ or we are supposed to override the QMAKE_XSPEC variable to linux-oe-g++ always now?

0 件の賞賛
返信
4,424件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

Hello Alankar Dhobale,

I have reproduced this error. It’s most likely a Qt Creator configuration issue. I haven’t found a fix but I’ll let you know if I make any progress.

Regards,

0 件の賞賛
返信