"Getting fatal error: stdio.h: No such file or directory and fatal error: stdlib.h: No such file"

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

"Getting fatal error: stdio.h: No such file or directory and fatal error: stdlib.h: No such file"

263件の閲覧回数
ParnaSankar
Contributor I

I am trying to compile .c application using cross-compilation with IMX6 ULL yocto build using :
repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-kirkstone -m imx-5.15.71-2.2.0.xml

and getting errors like stdlib.h and stdio.h is missing(No such file or directory).
Can you let me know how to resolve this error?

0 件の賞賛
返信
4 返答(返信)

237件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @ParnaSankar!
Thank you for contacting NXP Support!

Can you attach the log of the error?

I recommend trying to update your packages with "sudo apt update" and "sudo apt upgrade" and install all the required packages for that version are the next:

$ sudo apt-get install gawk wget git-core diffstat unzip \
texinfo gcc-multilib \
build-essential chrpath socat cpio python python3 python3-pip \
python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 \
libegl1-mesa libsdl1.2-dev \
pylint3 xterm rsync curl zstd pzstd lz4c lz4 libssl-dev


Best Regards!
Chavira

0 件の賞賛
返信

226件の閲覧回数
ParnaSankar
Contributor I

Hello @Chavira ,
Thanks for your response.
We are facing the below issue while cross compiling .c applications for imx6 ULL arm platform on x86 linux host machine.
Please find the below error logs :
per_receive.c:6:10: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
compilation terminated.
per_sock.c:6:10: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
compilation terminated.

I tried to install the dependencies and packages using the command shared by you
"

$ sudo apt-get install gawk wget git-core diffstat unzip \
texinfo gcc-multilib \
build-essential chrpath socat cpio python python3 python3-pip \
python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 \
libegl1-mesa libsdl1.2-dev \
pylint3 xterm rsync curl zstd pzstd lz4c lz4 libssl-dev "

but we are getting the below prints as well :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'git' instead of 'git-core'
Note, selecting 'python-is-python2' instead of 'python'
Note, selecting 'pylint' instead of 'pylint3'
E: Unable to locate package pzstd
E: Unable to locate package lz4c

Regards,



0 件の賞賛
返信

222件の閲覧回数
ParnaSankar
Contributor I

Hello @Chavira ,
For your additional information, I want to inform you that
I found out stdio.h and stdlib.h path and added in the CFLAGS
Example: 

CFLAGS += -I~/imx-yocto-bsp/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/util-linux/2.37.4-r0/recipe-sysroot/usr/include/
but after that if I start compilation again I a getting the another error:  fatal error: gnu/stubs-soft.h: No such file or directory 

Thanks,

0 件の賞賛
返信

210件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @ParnaSankar!

I understand better the problem now.

For this case, I recommend compiling the SDK in yocto to avoid this problem.

You can refer to the next community posts.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-Yocto-Project-Freescale-Yocto-Proje...

https://community.nxp.com/t5/i-MX-Processors/How-to-build-the-yocto-SDK/m-p/465026


Best Regards!
Chavira

0 件の賞賛
返信