Yocto项目找不到asm / errno.h

时间:2018-03-12 05:56:33

标签: gcc cross-compiling yocto openembedded

我正在尝试编译需要asm/errno.h标头的程序。

Building C object CMakeFiles/modem.dir/src/client.c.o
| /home/kristupas/yocto/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc  -Dmodem_EXPORTS -std=gnu99  -march=armv7-a -mfloat-abi=softfp -mfpu=neon  --sysroot=/home/kristupas/yocto/oe-core/build/tmp-glibc/sysroots/mdm9607  -O2 -fexpensive-optimizations -frename-registers -fomit-frame-pointer -fPIC -I/home/kristupas/yocto/oe-core/build/tmp-glibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libmodem/1.0-r0/libmodem/src -I/home/kristupas/yocto/oe-core/build/tmp-glibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libmodem/1.0-r0/libmodem/include    -o CMakeFiles/modem.dir/src/client.c.o   -c /home/kristupas/yocto/oe-core/build/tmp-glibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libmodem/1.0-r0/libmodem/src/client.c
| [ 83%] /home/kristupas/yocto/oe-core/build/tmp-glibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libmodem/1.0-r0/libmodem/src/client.c:14:25: fatal error: asm/ernno.h: No such file or directory
|  #include <asm/ernno.h>
                         ^

--sysroot参数已正确设置到我的目标sysroot,但是gcc仍然找不到标题,即使它显然在那里:

ls -la /home/kristupas/yocto/oe-core/tmp-glibc/sysroots/mdm9607/usr/include/asm/ | grep "errno\.h"
-rw-r--r--  3 kristupas kristupas    31 Kov  9 16:06 errno.h

echo | /home/kristupas/yocto/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc -R -Wp. -v -

返回:

--includedir=/home/kristupas/yocto/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/include

这是主机的include目录,不包含asm/errno.h。它不应该指向sysroot目标吗?

1 个答案:

答案 0 :(得分:0)

原来我拼写错误errno并且几个小时都没注意到它!