免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3147 | 回复: 4

[内核入门] make menuconfig编译内核出现的错误,求解 [复制链接]

论坛徽章:
0
发表于 2012-05-12 11:51 |显示全部楼层
[root@bogon:linux]#make menuconfig
  HOSTCC  scripts/basic/docproc
In file included from /usr/include/signal.h:339:0,
                 from /usr/include/sys/wait.h:31,
                 from scripts/basic/docproc.c:44:
/usr/include/bits/sigcontext.h:28:29: fatal error: asm/sigcontext.h: No such file or directory
compilation terminated.
make[1]: *** [scripts/basic/docproc] Error 1
make: *** [scripts_basic] Error 2

论坛徽章:
6
金牛座
日期:2013-10-08 10:19:10技术图书徽章
日期:2013-10-14 16:24:09CU十二周年纪念徽章
日期:2013-10-24 15:41:34狮子座
日期:2013-11-24 19:26:19未羊
日期:2014-01-23 15:50:002015年亚洲杯之阿联酋
日期:2015-05-09 14:36:15
发表于 2012-05-12 19:08 |显示全部楼层
回复 1# 308938969
[root@bogon:linux]#make menuconfig
  HOSTCC  scripts/basic/docproc
In file included from /usr/include/signal.h:339:0,
                 from /usr/include/sys/wait.h:31,
                 from scripts/basic/docproc.c:44:
/usr/include/bits/sigcontext.h:28:29: fatal error: asm/sigcontext.h: No such file or directory
compilation terminated.
make[1]: *** [scripts/basic/docproc] Error 1
make: *** [scripts_basic] Error 2

你的环境?
内核版本、gcc版本、硬件平台、是否交叉编译
   

论坛徽章:
0
发表于 2012-05-14 10:27 |显示全部楼层
环境:
fedora14 内核2.6.35.6
[root@bogon:~]#uname -r
2.6.35.14-106.fc14.i686
[root@bogon:~]#gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.5.1/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)

[root@bogon:proc]# head -n 1 /etc/issue
Fedora release 14 (Laughlin)
You have new mail in /var/spool/mail/root
[root@bogon:proc]#cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Pentium(R) Dual-Core  CPU      E5300  @ 2.60GHz
stepping        : 10
cpu MHz         : 2621.549
cache size      : 2048 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss nx lm constant_tsc up arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf pni ssse3 cx16 xsave hypervisor lahf_lm
bogomips        : 5243.09
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

[root@bogon:proc]#lspci -tv
-[0000:00]-+-00.0  Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge
           +-01.0-[01]--
           +-07.0  Intel Corporation 82371AB/EB/MB PIIX4 ISA
           +-07.1  Intel Corporation 82371AB/EB/MB PIIX4 IDE
           +-07.3  Intel Corporation 82371AB/EB/MB PIIX4 ACPI
           +-07.7  VMware Virtual Machine Communication Interface
           +-0f.0  VMware SVGA II Adapter
           +-10.0  LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
           +-11.0-[02]--+-00.0  VMware USB1.1 UHCI Controller
           |            +-01.0  Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
           |            +-02.0  Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
           |            +-03.0  Ensoniq ES1371 [AudioPCI-97]
           |            \-04.0  VMware USB2 EHCI Controller
           +-15.0-[03]--
           +-15.1-[04]--
           +-15.2-[05]--
           +-15.3-[06]--
           +-15.4-[07]--
           +-15.5-[08]--
           +-15.6-[09]--
           +-15.7-[0a]--

论坛徽章:
0
发表于 2012-05-14 14:03 |显示全部楼层
用find命令查找文件sigcontext.h,我的查找结果包括:

/usr/include/i386-linux-gnu/asm/sigcontext.h

而且我的bits/sigcontext.h在/usr/include/i386-linux-gnu/目录下,其中包含一条#include <asm/sigcontext.h>预处理命令

如果你能找到asm/sigcontext.h,你可以在make的时候指定CTAGS变量,或者根据cpp搜索目录及顺序,创建相应的链接等

论坛徽章:
0
发表于 2012-05-17 09:25 |显示全部楼层
谢谢回复 4# whxlovehy


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP