无法解决“/usr/include/linux/errno.h:1:23: 致命错误:asm/errno.h: 没有此文件或目录”

无法解决“/usr/include/linux/errno.h:1:23: 致命错误:asm/errno.h: 没有此文件或目录”

我尝试使用makegcc4.6.2 来构建 android 2.3.7 系统。我安装了linux-libc-dev不同的版本( 3.8.0& 4.4.0) 和不同的体系结构( linux-libc-dev& linux-libc-dev:i386),但仍然遇到以下错误:

在网站上查看了有关此问题的各种讨论后,我不知道如何修复 gcc4.6.2 的制作。有人可以帮我解决这个问题吗?

In file included from /usr/include/bits/errno.h:24:0,
                 from /usr/include/errno.h:35,
                 from ../../../gcc-4.6.2/libgcc/../gcc/tsystem.h:93,
                 from ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c:29:
/usr/include/linux/errno.h:1:23: fatal error: asm/errno.h: No such file or directory
compilation terminated.
make[3]: *** [_muldi3.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /usr/include/bits/errno.h:24:0,
                 from /usr/include/errno.h:35,
                 from ../../../gcc-4.6.2/libgcc/../gcc/tsystem.h:93,
                 from ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c:29:
/usr/include/linux/errno.h:1:23: fatal error: asm/errno.h: No such file or directory
compilation terminated.
make[3]: *** [_negdi2.o] Error 1
In file included from /usr/include/bits/errno.h:24:0,
                 from /usr/include/errno.h:35,
                 from ../../../gcc-4.6.2/libgcc/../gcc/tsystem.h:93,
                 from ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c:29:
/usr/include/linux/errno.h:1:23: fatal error: asm/errno.h: No such file or directoryIn file included from /usr/include/bits/errno.h:24:0,
                 from /usr/include/errno.h:35,
                 from ../../../gcc-4.6.2/libgcc/../gcc/tsystem.h:93,
                 from ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c:29:
/usr/include/linux/errno.h:1:23: fatal error: asm/errno.h: No such file or directory
compilation terminated.
make[3]: *** [_ucmpdi2.o] Error 1

compilation terminated.
make[3]: *** [_lshrdi3.o] Error 1
In file included from /usr/include/bits/errno.h:24:0,
                 from /usr/include/errno.h:35,
                 from ../../../gcc-4.6.2/libgcc/../gcc/tsystem.h:93,
                 from ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c:29:
/usr/include/linux/errno.h:1:23: fatal error: asm/errno.h: No such file or directoryIn file included from /usr/include/bits/errno.h:24:0,
                 from /usr/include/errno.h:35,
                 from ../../../gcc-4.6.2/libgcc/../gcc/tsystem.h:93,
                 from ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c:29:
/usr/include/linux/errno.h:1:23: fatal error: asm/errno.h: No such file or directory
compilation terminated.
In file included from /usr/include/bits/errno.h:24:0,
                 from /usr/include/errno.h:35,
                 from ../../../gcc-4.6.2/libgcc/../gcc/tsystem.h:93,
                 from ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c:29:
/usr/include/linux/errno.h:1:23: fatal error: asm/errno.h: No such file or directorymake[3]: *** [_ashldi3.o] Error 1

compilation terminated.

make[3]: *** [_cmpdi2.o] Error 1
compilation terminated.
make[3]: *** [_ashrdi3.o] Error 1
make[5]: Entering directory `/home/paultsai/gcc/x86_64-linux-gnu/32/libgcc'
# If this is the top-level multilib, build all the other

答案1

在我的 Ubuntu 14.05.5 系统上(YMMV),/usr/include/asm/errno.h由以下软件包提供:

linux-headers-*
linux-libc-dev:amd64
linux-libc-dev:i386

相关内容