当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 6 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [讨论]编译内核老是出错误
帖子发表于 : 2006-05-09 15:29 
头像

注册: 2006-04-08 23:12
帖子: 38
地址: 上海
送出感谢: 0 次
接收感谢: 0 次
GCC装了3.4的root@leonix:/usr/src/linux# make mrproper
root@leonix:/usr/src/linux# make menuconfig
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:105:23: sys/types.h: 没有那个文件或目录
scripts/basic/fixdep.c:106:22: sys/stat.h: 没有那个文件或目录
scripts/basic/fixdep.c:107:22: sys/mman.h: 没有那个文件或目录
scripts/basic/fixdep.c:108:20: unistd.h: 没有那个文件或目录
scripts/basic/fixdep.c:109:19: fcntl.h: 没有那个文件或目录
scripts/basic/fixdep.c:110:20: string.h: 没有那个文件或目录
scripts/basic/fixdep.c:111:20: stdlib.h: 没有那个文件或目录
scripts/basic/fixdep.c:112:19: stdio.h: 没有那个文件或目录
In file included from /usr/lib/gcc/i486-linux-gnu/3.4.5/include/syslimits.h:7,
from /usr/lib/gcc/i486-linux-gnu/3.4.5/include/limits.h:11,
from scripts/basic/fixdep.c:113:
/usr/lib/gcc/i486-linux-gnu/3.4.5/include/limits.h:122:61: limits.h: 没有那个文件或目录
scripts/basic/fixdep.c:114:19: ctype.h: 没有那个文件或目录
scripts/basic/fixdep.c:115:23: arpa/inet.h: 没有那个文件或目录
scripts/basic/fixdep.c: In function `usage':
scripts/basic/fixdep.c:129: warning: implicit declaration of function `fprintf'
scripts/basic/fixdep.c:129: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:129: error: (Each undeclared identifier is reported only once
scripts/basic/fixdep.c:129: error: for each function it appears in.)
scripts/basic/fixdep.c:130: warning: implicit declaration of function `exit'
scripts/basic/fixdep.c: In function `print_cmdline':
scripts/basic/fixdep.c:135: warning: implicit declaration of function `printf'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:138: error: `NULL' undeclared here (not in a function)
scripts/basic/fixdep.c: In function `grow_config':
scripts/basic/fixdep.c:151: warning: implicit declaration of function `realloc'
scripts/basic/fixdep.c:151: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:153: warning: implicit declaration of function `perror'
scripts/basic/fixdep.c: In function `is_defined_config':
scripts/basic/fixdep.c:169: warning: implicit declaration of function `memcmp'
scripts/basic/fixdep.c: In function `define_config':
scripts/basic/fixdep.c:182: warning: implicit declaration of function `memcpy'
scripts/basic/fixdep.c: In function `use_config':
scripts/basic/fixdep.c:201: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:215: warning: implicit declaration of function `tolower'
scripts/basic/fixdep.c:201: warning: unused variable `s'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:220: error: parse error before "size_t"
scripts/basic/fixdep.c:221: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:222: error: `map' undeclared (first use in this function)
scripts/basic/fixdep.c:222: error: `len' undeclared (first use in this function)
scripts/basic/fixdep.c:228: warning: implicit declaration of function `ntohl'
scripts/basic/fixdep.c:239: warning: implicit declaration of function `isalnum'
scripts/basic/fixdep.c: In function `strrcmp':
scripts/basic/fixdep.c:252: warning: implicit declaration of function `strlen'
scripts/basic/fixdep.c: In function `do_config_file':
scripts/basic/fixdep.c:263: error: storage size of 'st' isn't known
scripts/basic/fixdep.c:267: warning: implicit declaration of function `open'
scripts/basic/fixdep.c:267: error: `O_RDONLY' undeclared (first use in this function)
scripts/basic/fixdep.c:269: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:273: warning: implicit declaration of function `fstat'
scripts/basic/fixdep.c:275: warning: implicit declaration of function `close'
scripts/basic/fixdep.c:278: warning: implicit declaration of function `mmap'
scripts/basic/fixdep.c:278: error: `PROT_READ' undeclared (first use in this function)
scripts/basic/fixdep.c:278: error: `MAP_PRIVATE' undeclared (first use in this function)
scripts/basic/fixdep.c:278: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:287: warning: implicit declaration of function `munmap'
scripts/basic/fixdep.c:263: warning: unused variable `st'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:292: error: parse error before "size_t"
scripts/basic/fixdep.c:293: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_dep_file':
scripts/basic/fixdep.c:294: error: `map' undeclared (first use in this function)
scripts/basic/fixdep.c:295: error: `len' undeclared (first use in this function)
scripts/basic/fixdep.c:297: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:299: warning: implicit declaration of function `strchr'
scripts/basic/fixdep.c:301: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:297: warning: unused variable `s'
scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:334: error: storage size of 'st' isn't known
scripts/basic/fixdep.c:338: error: `O_RDONLY' undeclared (first use in this function)
scripts/basic/fixdep.c:340: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:350: error: `PROT_READ' undeclared (first use in this function)
scripts/basic/fixdep.c:350: error: `MAP_PRIVATE' undeclared (first use in this function)
scripts/basic/fixdep.c:350: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:334: warning: unused variable `st'
scripts/basic/fixdep.c: In function `traps':
scripts/basic/fixdep.c:369: error: `stderr' undeclared (first use in this function)
make[1]: *** [scripts/basic/fixdep] 错误 1
make: *** [scripts_basic] 错误 2


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2006-05-09 16:53 

注册: 2006-01-03 20:44
帖子: 869
送出感谢: 0 次
接收感谢: 6
检查一下以下这些包都装了没有
module-init-tools
libc6-dev
libncurses5-dev
modutils


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2006-05-09 20:42 
头像

注册: 2006-04-08 23:12
帖子: 38
地址: 上海
送出感谢: 0 次
接收感谢: 0 次
谢谢上面的朋友了,不过我装了,可又出现下面的错误了又


root@www:/usr/src/linux# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h:122,
from /usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h:7,
from /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h:11,
from scripts/basic/fixdep.c:113:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: 没有那个文件或目录
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from /usr/include/arpa/inet.h:23,
from scripts/basic/fixdep.c:115:
/usr/include/bits/socket.h:304:24: error: asm/socket.h: 没有那个文件或目录
scripts/basic/fixdep.c: 在函数 ‘use_config’ 中:
scripts/basic/fixdep.c:201: 错误:‘PATH_MAX’ 未声明 (在此函数内第一次使用)
scripts/basic/fixdep.c:201: 错误:(即使在一个函数内多次出现,每个未声明的标识符 在其
scripts/basic/fixdep.c:201: 错误:所在的函数内只报告一次。)
scripts/basic/fixdep.c:201: 警告:未使用的变量 ‘s’
scripts/basic/fixdep.c: 在函数 ‘parse_config_file’ 中:
scripts/basic/fixdep.c:245: 警告:传递参数 1 (属于 ‘use_config’) 给指针时目标与 指针有/无符号不一致
scripts/basic/fixdep.c: 在函数 ‘parse_dep_file’ 中:
scripts/basic/fixdep.c:297: 错误:‘PATH_MAX’ 未声明 (在此函数内第一次使用)
scripts/basic/fixdep.c:299: 警告:传递参数 1 (属于 ‘__builtin_strchr’) 给指针时 目标与指针有/无符号不一致
scripts/basic/fixdep.c:299: 警告:对指针赋值时目标与指针有/无符号不一致
scripts/basic/fixdep.c:297: 警告:未使用的变量 ‘s’
make[1]: *** [scripts/basic/fixdep] 错误 1
make: *** [scripts_basic] 错误


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2006-05-10 22:14 

注册: 2006-01-03 20:44
帖子: 869
送出感谢: 0 次
接收感谢: 6
你编译的是什么版本的内核呢。
这个我倒没碰到过。你可以这样试试看。
sudo aptitude search linux-image
可以搜到许多内核版本
然后
sudo apt-get build-dep linux-image***(从上面搜索到的内核版本找一个和你要编译的内核版本相近的版本号)
看看提示要安装什么依赖的包,安装上再编译试试。


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2006-05-11 16:20 
头像

注册: 2006-04-08 23:12
帖子: 38
地址: 上海
送出感谢: 0 次
接收感谢: 0 次
已经弄好了,少了个LIBDTC


页首
 用户资料  
 
6 楼 
 文章标题 : Re: [讨论]编译内核老是出错误
帖子发表于 : 2010-11-29 19:08 

注册: 2010-11-29 19:05
帖子: 1
送出感谢: 0 次
接收感谢: 0 次
楼主,作为linux新手的我在编译内核时出现你一样的错误如下:
root@www:/usr/src/linux# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h:122,
from /usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h:7,
from /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h:11,
from scripts/basic/fixdep.c:113:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: 没有那个文件或目录
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from /usr/include/arpa/inet.h:23,
from scripts/basic/fixdep.c:115:
/usr/include/bits/socket.h:304:24: error: asm/socket.h: 没有那个文件或目录
scripts/basic/fixdep.c: 在函数 ‘use_config’ 中:
scripts/basic/fixdep.c:201: 错误:‘PATH_MAX’ 未声明 (在此函数内第一次使用)
scripts/basic/fixdep.c:201: 错误:(即使在一个函数内多次出现,每个未声明的标识符 在其
scripts/basic/fixdep.c:201: 错误:所在的函数内只报告一次。)
scripts/basic/fixdep.c:201: 警告:未使用的变量 ‘s’
scripts/basic/fixdep.c: 在函数 ‘parse_config_file’ 中:
scripts/basic/fixdep.c:245: 警告:传递参数 1 (属于 ‘use_config’) 给指针时目标与 指针有/无符号不一致
scripts/basic/fixdep.c: 在函数 ‘parse_dep_file’ 中:
scripts/basic/fixdep.c:297: 错误:‘PATH_MAX’ 未声明 (在此函数内第一次使用)
scripts/basic/fixdep.c:299: 警告:传递参数 1 (属于 ‘__builtin_strchr’) 给指针时 目标与指针有/无符号不一致
scripts/basic/fixdep.c:299: 警告:对指针赋值时目标与指针有/无符号不一致
scripts/basic/fixdep.c:297: 警告:未使用的变量 ‘s’
make[1]: *** [scripts/basic/fixdep] 错误 1
make: *** [scripts_basic] 错误



后来你说少一个LIBDTC就能解决这个问题,求详细答案,再此感谢。。。。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 6 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:Exabot [Bot] 和 4 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译