Unable to use SDK with Qt6 on Qt creator for compiling by CMake

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

Unable to use SDK with Qt6 on Qt creator for compiling by CMake

589件の閲覧回数
Mingheng
Contributor I

Hi 

We are using the SDK built by the command "bitbake -c populate_sdk imx-image-full", and try to configure the kit on Qt creator.

But There is an error when we try to build a CMake project ( only has a windows, created by Qt creator named “untitled”), see the message as follow:

```

[cmake] Running /home/vmware/Qt/Tools/CMake/bin/cmake -S /home/vmware/untitled1 -B /home/vmware/untitled1/build/IMX8_Qt_6_7_0_cross_compiler-Debug in /home/vmware/untitled1/build/IMX8_Qt_6_7_0_cross_compiler-Debug.
[cmake] -- The CXX compiler identification is GNU 13.2.0
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - failed
[cmake] -- Check for working CXX compiler: /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc
[cmake] -- Check for working CXX compiler: /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc - broken
[cmake] CMake Error at /home/vmware/Qt/Tools/CMake/share/cmake-3.29/Modules/CMakeTestCXXCompiler.cmake:73 (message):
[cmake] The C++ compiler
[cmake]
[cmake] "/opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
[cmake]
[cmake] is not able to compile a simple test program.
[cmake]
[cmake] It fails with the following output:
[cmake]
[cmake] Change Dir: '/home/vmware/untitled1/build/IMX8_Qt_6_7_0_cross_compiler-Debug/CMakeFiles/CMakeScratch/TryCompile-F8xff4'
[cmake]
[cmake] Run Build Command(s): /home/vmware/Qt/Tools/Ninja/ninja -v cmTC_59d22
[cmake] [1/2] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -DQT_QML_DEBUG -fdiagnostics-color=always -o CMakeFiles/cmTC_59d22.dir/testCXXCompiler.cxx.o -c /home/vmware/untitled1/build/IMX8_Qt_6_7_0_cross_compiler-Debug/CMakeFiles/CMakeScratch/TryCompile-F8xff4/testCXXCompiler.cxx
[cmake] [2/2] : && /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -DQT_QML_DEBUG CMakeFiles/cmTC_59d22.dir/testCXXCompiler.cxx.o -o cmTC_59d22 && :
[cmake] FAILED: cmTC_59d22
[cmake] : && /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -DQT_QML_DEBUG CMakeFiles/cmTC_59d22.dir/testCXXCompiler.cxx.o -o cmTC_59d22 && :
[cmake] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.2.0/ld: cannot find Scrt1.o: No such file or directory
[cmake] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.2.0/ld: cannot find crti.o: No such file or directory
[cmake] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.2.0/ld: cannot find crtbeginS.o: No such file or directory
[cmake] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.2.0/ld: cannot find -lgcc: No such file or directory
[cmake] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.2.0/ld: cannot find -lgcc_s: No such file or directory
[cmake] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.2.0/ld: cannot find -lc: No such file or directory
[cmake] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.2.0/ld: cannot find -lgcc: No such file or directory
[cmake] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.2.0/ld: cannot find -lgcc_s: No such file or directory
[cmake] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.2.0/ld: cannot find crtendS.o: No such file or directory
[cmake] /opt/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.2.0/ld: cannot find crtn.o: No such file or directory
[cmake] collect2: error: ld returned 1 exit status
[cmake] ninja: build stopped: subcommand failed.
[cmake]
[cmake]
[cmake]
[cmake]
[cmake]
[cmake] CMake will not be able to correctly generate this project.
[cmake] Call Stack (most recent call first):
[cmake] CMakeLists.txt:3 (project)
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[cmake]
[cmake] The command "/home/vmware/Qt/Tools/CMake/bin/cmake -S /home/vmware/untitled1 -B /home/vmware/untitled1/build/IMX8_Qt_6_7_0_cross_compiler-Debug" terminated with exit code 1.
[cmake]
[cmake] Elapsed time: 00:00.

```

And here are the configurations of the kit

Mingheng_0-1721895989223.pngMingheng_1-1721896045615.png

(g++ is the file in the same path as gcc)

 

How could we solve this problem. We are not sure if is correct that we comment out the code about test-compiling.

 

Best regards

Mingheng

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

568件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You are using other BSP that is not from NXP, so the BSP from NXP has the proper toolchain to compile and build this part, SO or its simple the toolchain or you download and try the NXP BSP.

Regards

0 件の賞賛
返信

547件の閲覧回数
Mingheng
Contributor I
Thanks for you reply @Bio_TICFSL

We are using the default configuration of it, following the user guide https://www.nxp.com.cn/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf .
Then after this BSP building, we used `bitbake -c populate_sdk imx-image-full` to build the sdk.

Could you please provide the link about NXP BSP and SDK you said above?

Best regards
0 件の賞賛
返信

527件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信