Compiler failed on Yocto 5.1 styhead(6.12.3).

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Compiler failed on Yocto 5.1 styhead(6.12.3).

1,041 次查看
charleshuang
Senior Contributor II

Hi NXP 

When I  try to compiler failed on Yocto 5.1 styhead (6.12.3)(i.MX8MP).

MACHINE=imx8mp-lpddr4-evk DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b 8mp

bitbake imx-image-full ,  I will be get fail and error message.

g++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
 ninja: build stopped: subcommand failed.
ERROR: Task (/home/adv/adv-bsp/sources/meta-qt6/recipes-qt/qt6/gn-native_git.bb:do_compile) failed with exit code '1'

Do you have any advice?

20250331.png
 

Thanks.

 

 

0 项奖励
回复
2 回复数

970 次查看
Amingo_Chang
Contributor I

Hi Charles,

I fixed this issue.
Amingo_Chang_0-1744016772746.png

This issue is a command that g++ doesn't recognize, please upgrade your g++ version, follow as :

Step 1 : Install new g++ version (ex : g++-10)

sudo apt upgrade

sudo apt install g++-10

Amingo_Chang_1-1744017517643.png

 

Step 2 : Setup g++-10

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10

Amingo_Chang_2-1744017607216.png

 

Step 3 : Confirm g++ version

g++ --version

Amingo_Chang_3-1744017682865.png

 

Good luck.

Amingo_Chang_4-1744017734911.png

Reference:https://sourceforge.net/p/codeblocks/tickets/1006/

 

 

1,037 次查看
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

Please update your host to Ubuntu 22. Documentation is being updated, the Ubuntu 22 is the least OS version to build.

Regards