QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1374|回复: 6

帮我看看为什么我不能编译

[复制链接]
发表于 2004-10-21 20:30:25 | 显示全部楼层 |阅读模式
[root@localhost root]# cd /usr/src/linux-2.6.5-1.358
[root@localhost linux-2.6.5-1.358]# make xconfig
  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c:97:23: sys/types.h: ?????????
scripts/basic/fixdep.c:98:22: sys/stat.h: ?????????
scripts/basic/fixdep.c:99:22: sys/mman.h: ?????????
scripts/basic/fixdep.c:100:20: unistd.h: ?????????
scripts/basic/fixdep.c:101:19: fcntl.h: ?????????
scripts/basic/fixdep.c:102:20: string.h: ?????????
scripts/basic/fixdep.c:103:20: stdlib.h: ?????????
scripts/basic/fixdep.c:104:19: stdio.h: ?????????
In file included from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h:7,
                 from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/limits.h:11,
                 from scripts/basic/fixdep.c:105:
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/limits.h:122:75: limits.h: ?????????
scripts/basic/fixdep.c:106:19: ctype.h: ?????????
scripts/basic/fixdep.c:107:24: netinet/in.h: ?????????
scripts/basic/fixdep.c: In function `usage':
scripts/basic/fixdep.c:121: warning: implicit declaration of function `fprintf'
scripts/basic/fixdep.c:121: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:121: error: (Each undeclared identifier is reported only once
scripts/basic/fixdep.c:121: error: for each function it appears in.)
scripts/basic/fixdep.c:122: warning: implicit declaration of function `exit'
scripts/basic/fixdep.c: In function `print_cmdline':
scripts/basic/fixdep.c:127: warning: implicit declaration of function `printf'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:130: error: `NULL' undeclared here (not in a function)
scripts/basic/fixdep.c: In function `grow_config':
scripts/basic/fixdep.c:143: warning: implicit declaration of function `realloc'
scripts/basic/fixdep.c:143: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:144: error: `NULL' undeclared (first use in this function)
scripts/basic/fixdep.c:145: warning: implicit declaration of function `perror'
scripts/basic/fixdep.c: In function `is_defined_config':
scripts/basic/fixdep.c:161: warning: implicit declaration of function `memcmp'
scripts/basic/fixdep.c: In function `define_config':
scripts/basic/fixdep.c:174: warning: implicit declaration of function `memcpy'
scripts/basic/fixdep.c: In function `use_config':
scripts/basic/fixdep.c:193: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:207: warning: implicit declaration of function `tolower'
scripts/basic/fixdep.c:193: warning: unused variable `s'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:212: error: syntax error before "size_t"
scripts/basic/fixdep.c:213: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:214: error: `map' undeclared (first use in this function)scripts/basic/fixdep.c:214: error: `len' undeclared (first use in this function)scripts/basic/fixdep.c:220: warning: implicit declaration of function `ntohl'
scripts/basic/fixdep.c:231: warning: implicit declaration of function `isalnum'
scripts/basic/fixdep.c: In function `strrcmp':
scripts/basic/fixdep.c:244: warning: implicit declaration of function `strlen'
scripts/basic/fixdep.c: In function `do_config_file':
scripts/basic/fixdep.c:255: error: storage size of `st' isn't known
scripts/basic/fixdep.c:259: warning: implicit declaration of function `open'
scripts/basic/fixdep.c:259: error: `O_RDONLY' undeclared (first use in this function)
scripts/basic/fixdep.c:261: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:265: warning: implicit declaration of function `fstat'
scripts/basic/fixdep.c:267: warning: implicit declaration of function `close'
scripts/basic/fixdep.c:270: warning: implicit declaration of function `mmap'
scripts/basic/fixdep.c:270: error: `NULL' undeclared (first use in this function)
scripts/basic/fixdep.c:270: error: `PROT_READ' undeclared (first use in this function)
scripts/basic/fixdep.c:270: error: `MAP_PRIVATE' undeclared (first use in this function)
scripts/basic/fixdep.c:270: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:279: warning: implicit declaration of function `munmap'
scripts/basic/fixdep.c:255: warning: unused variable `st'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:284: error: syntax error before "size_t"
scripts/basic/fixdep.c:285: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_dep_file':
scripts/basic/fixdep.c:286: error: `map' undeclared (first use in this function)scripts/basic/fixdep.c:287: error: `len' undeclared (first use in this function)scripts/basic/fixdep.c:289: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:291: warning: implicit declaration of function `strchr'
scripts/basic/fixdep.c:293: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:289: warning: unused variable `s'
scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:325: error: storage size of `st' isn't known
scripts/basic/fixdep.c:329: error: `O_RDONLY' undeclared (first use in this function)
scripts/basic/fixdep.c:331: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:341: error: `NULL' undeclared (first use in this function)
scripts/basic/fixdep.c:341: error: `PROT_READ' undeclared (first use in this function)
scripts/basic/fixdep.c:341: error: `MAP_PRIVATE' undeclared (first use in this function)
scripts/basic/fixdep.c:341: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:325: warning: unused variable `st'
scripts/basic/fixdep.c: In function `traps':
scripts/basic/fixdep.c:360: error: `stderr' undeclared (first use in this function)
make[1]: *** [scripts/basic/fixdep] ?? 1
make: *** [scripts_basic] 错误 2
发表于 2004-10-24 12:31:01 | 显示全部楼层
先make mrproper 然后试度make menuconfig或make config
回复

使用道具 举报

 楼主| 发表于 2004-10-25 11:02:22 | 显示全部楼层
[quote:a4ac8def48="Axin"]先make mrproper 然后试度make menuconfig或make config[/quote]


编译的命令make mrproper,make menuconfig,make gconfig,make xconfig,make config都试过了都不行,总是出现上面的错误。
回复

使用道具 举报

发表于 2004-10-25 15:12:06 | 显示全部楼层
编译内核前的工作:
下载modutils-2.4.21-23.src.rpm
rpm -e --nodeps modutils (强行卸载原有的modutilsRPM包)
#rpm -ivh modutils-2.4.21-23.src.rpm (把源代码包安装到了/usr/src/redhat目录下)
#cd /usr/src/redhat/SPECS (进入规范文件目录下)
#rpmbuild --bb modutils.spec (生成二进制的RPM包)
#cd ../RPMS/i386 (转入刚生成的二进制的RPM包所在位置)
#rpm -ivh modutils*.rpm (刚生成两个[modutils-2.4.21-23.i386.rpm与modutils-debuginfo-2.4.21.23.i386.rpm]二进制的RPM包
然后在make menuconfig,make gconfig,make xconfig,make config
回复

使用道具 举报

 楼主| 发表于 2004-10-26 10:23:57 | 显示全部楼层
我的系统是fc2,内核是2.6.5-1.358.系统里带的modutils版本嫌低吗?还是这个版本有问题?
回复

使用道具 举报

发表于 2004-11-8 10:11:00 | 显示全部楼层
fc就不用了!自带够用了,如果升级可能会带来不必要的麻烦!
回复

使用道具 举报

发表于 2004-11-14 15:38:41 | 显示全部楼层
可能一些重要组件没安装,察看一下changlog
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-2 16:40 , Processed in 0.060760 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表