Compiler failed on Yocto 5.1 styhead(6.12.3).

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compiler failed on Yocto 5.1 styhead(6.12.3).

1,039 Views
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 Kudos
Reply
2 Replies

968 Views
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,035 Views
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