Cross compiler build error - stdio.h: No such file or directory

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

Cross compiler build error - stdio.h: No such file or directory

2,124 Views
WPG_Liam
Contributor I

Hi NXP,

I have tried to build Wi-Fi driver using cross_compiler but have faced build error issue like as follows. I am using "imx-5.15.5-1.0.0" for BSP version. Could you help to resolve the issue? 

In file included from mlanconfig.c:29:
mlanconfig.h:30:10: fatal error: stdio.h: No such file or directory
30 | #include <stdio.h>
| ^~~~~~~~~
compilation terminated.
<builtin>: recipe for target 'mlanconfig.o' failed
make[1]: *** [mlanconfig.o] Error 1

Thanks,

Liam

 

0 Kudos
Reply
3 Replies

2,100 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @WPG_Liam,

I hope you are doing well.

It appears that the error is indicating that the compiler is unable to find the "stdio.h" header file. This file is a standard C library header, and its absence typically indicates a problem with the development environment or the included paths.

Please ensure that you have a complete and correctly configured cross-compilation environment for your target platform. This includes the necessary toolchain, libraries, and headers. Make sure that the toolchain is in your system's PATH.

One can add include paths using the -I option in the Makefile.

For example:

make
Copy code
CFLAGS += -I/path/to/your/include/directory
Check Toolchain Compatibility:
Ensure that the cross-compiler you are using is compatible with the target platform and the BSP version. The toolchain should match the architecture and system libraries of your target platform.

Please confirm that the necessary header files, including "stdio.h," are present in the toolchain's include directory. If they are missing, you may need to install the corresponding development package for the toolchain.

I hope this helps!

Thanks & Regards,
Sanket Parekh

0 Kudos
Reply

2,067 Views
WPG_Liam
Contributor I

Hi Sanket Parekh,

First of all, let you know my test environments.

- H/W board : imx8qmmek, Murata 9098 Wi-Fi module

- BSP : imx-5.4.70-2.3.0

- Wi-Fi driver : PCIE-WLAN-UART-BT-9098-U16-X86-17.68.1.p136.19-17.26.1.p136.19-MXM5X17366_P7_V0V1-MGPL

 

I can find out stdio.h in the folder - "/opt/fsl-imx-wayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/include/stdio.h" but the error occures. I am not sure if I use wrong Wi-Fi driver.

Even though the error occures, mlan.ko and moal.ko modules are createdd successfully in bin_wlan folder. So, I has verified Wi-Fi is working. If needed to additional question, let me update here.

 

Thanks for your supports.

Liam

 

0 Kudos
Reply

2,049 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @WPG_Liam,

I hope you are doing well.

Please make sure that the user running the make build command has the necessary permissions to access the kernel modules and the destination directory (../bin_wlan). You might want to check and adjust file permissions if needed.
Please check running the make command with sudo.

Please confirm that the kernel version you are building the modules against (5.15.5+gitAUTOINC+c1084c2773-r0) matches the running kernel version on your target system.
For that one can examine the README, README_MLAN, and README_RBC files.

Thanks & Regards,
Sanket Parekh

0 Kudos
Reply