Linux 编译应用程序报错:fatal error: gnu/stubs-soft.h: No such file or directory
2018-03-03 11:15
736 查看
自己编写Makefile编译应用程序报错如下:
wys@ubuntu:/mnt/hgfs/projects/bd3/zlg/lcd驱动$ make
make: Warning: File `Makefile' has modification time 6.5 s in the future
/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -o spidev_test spidev_test.c -lpthread -static -mfloat-abi=soft
In file included from /opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/features.h:389:0,
from /opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/stdint.h:25,
from /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/include/stdint.h:9,
from spidev_test.c:14:
/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory
# include <gnu/stubs-soft.h>
^
compilation terminated.
make: *** [modules] Error 1
解决办法:
cc has a builtin define to denote hard abi when in use, e.g. when using -mfloat-abi=hard it will define __ARM_PCS_VFP to 1 and therefore we should check that to determine which calling convention is in use and not __VFP_FP__ which merely indicates presence of VFP unit
这些其实是在编译选项里面设定的,如果你傻傻的去找 __ARM_PCS_VFP那就很惨了,你会完全没有头绪。其实只需要修改编译参数,-mfloat-abi=hard 或者 -mfloat-abi=soft
wys@ubuntu:/mnt/hgfs/projects/bd3/zlg/lcd驱动$ make
make: Warning: File `Makefile' has modification time 6.5 s in the future
/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -o spidev_test spidev_test.c -lpthread -static -mfloat-abi=soft
In file included from /opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/features.h:389:0,
from /opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/stdint.h:25,
from /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/include/stdint.h:9,
from spidev_test.c:14:
/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory
# include <gnu/stubs-soft.h>
^
compilation terminated.
make: *** [modules] Error 1
解决办法:
cc has a builtin define to denote hard abi when in use, e.g. when using -mfloat-abi=hard it will define __ARM_PCS_VFP to 1 and therefore we should check that to determine which calling convention is in use and not __VFP_FP__ which merely indicates presence of VFP unit
这些其实是在编译选项里面设定的,如果你傻傻的去找 __ARM_PCS_VFP那就很惨了,你会完全没有头绪。其实只需要修改编译参数,-mfloat-abi=hard 或者 -mfloat-abi=soft
相关文章推荐
- gcc编译报错,fatal error: gnu/stubs-soft.h: No such file or directory问题解决!!
- 64位linux下编译32位程序的错误“error: gnu/stubs-32.h: No such file or directory”
- 升级gcc4.8 遇到 fatal error: gnu/stubs-32.h: No such file or directory 问题的解决方法
- 编译GCC-4.8出现的错误 —— Linux gnu/stubs-32.h: No such file or directory
- 一种编译错误的解决办法。/usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or directory
- /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
- /usr/include/gnu/stubs.h:10:27: fatal error: gnu/stubs-64.h: No such file or directory
- 编译Linux内核时出现“fatal error: linux/netfilter/xt_dscp: No such file or directory”
- Linux程序make过程中库文件缺失:cannot find -lixxx && fatal error: xxx.h: No such file or directory 解决方法参考
- NDK编译:fatal error: GLES2/gl2platform.h: No such file or directory
- ap端编译时遇到fatal error:openssl/opensslv.h: No such file or directory
- fatal error: gnu/stubs-soft.h: No such file or directory
- /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h:No such file or directory的解决办法
- 【Redis】编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
- 使用bazel 编译tensorflow serving时报错:fatal error: Python.h: No such file or directory
- 编译Busybox时,出现错误fatal error: curses.h: No such file or directory
- python下安装模块报错:psutil/_psutil_linux.c:12:20: fatal error: Python.h: No such file or directory
- fatal error: linux/compiler-gcc5.h: No such file or directory
- error: gnu/stubs-32.h: No such file or directory
- BUG!!!======> 编译安装lua 时 lua.c:67:31: fatal error: readline/readline.h: No such file or directory