[问题]编译2.6.18的内核,make config报错

为当前最终发行版之前的所有版本提供支持
回复
monimonipo
帖子: 4
注册时间: 2006-10-17 17:45
送出感谢: 0
接收感谢: 0

[问题]编译2.6.18的内核,make config报错

#1

帖子 monimonipo » 2006-10-17 17:52

原来的内核就是ubuntu 6.06.1的2.6.16,想自己编译一下2.6.18的内核,gcc是4.0.3的,make等都已经安装,在make mrproper和make clean后出了问题


t@ubuntu-xlu:/usr/src/linux# make config
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:105:23: error: sys/types.h: No such file or directory
scripts/basic/fixdep.c:106:22: error: sys/stat.h: No such file or directory
scripts/basic/fixdep.c:107:22: error: sys/mman.h: No such file or directory
scripts/basic/fixdep.c:108:20: error: unistd.h: No such file or directory
scripts/basic/fixdep.c:109:19: error: fcntl.h: No such file or directory
scripts/basic/fixdep.c:110:20: error: string.h: No such file or directory
scripts/basic/fixdep.c:111:20: error: stdlib.h: No such file or directory
scripts/basic/fixdep.c:112:19: error: stdio.h: No such file or directory
In file included from /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:7,
from /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:11,
from scripts/basic/fixdep.c:113:
/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:122:61: error: limits.h: No s uch file or directory
scripts/basic/fixdep.c:114:19: error: ctype.h: No such file or directory
scripts/basic/fixdep.c:115:23: error: arpa/inet.h: No such file or directory
scripts/basic/fixdep.c: In function ‘usage’:
scripts/basic/fixdep.c:129: warning: implicit declaration of function ‘fprintf’
scripts/basic/fixdep.c:129: warning: incompatible implicit declaration of built- in function ‘fprintf’
scripts/basic/fixdep.c:129: error: ‘stderr’ undeclared (first use in this functi on)
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:130: warning: incompatible implicit declaration of built- in function ‘exit’
scripts/basic/fixdep.c: In function ‘print_cmdline’:
scripts/basic/fixdep.c:138: warning: implicit declaration of function ‘printf’
scripts/basic/fixdep.c:138: warning: incompatible implicit declaration of built- in function ‘printf’
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:141: error: ‘NULL’ undeclared here (not in a function)
scripts/basic/fixdep.c: In function ‘grow_config’:
scripts/basic/fixdep.c:154: warning: implicit declaration of function ‘realloc’
scripts/basic/fixdep.c:154: warning: assignment makes pointer from integer witho ut a cast
scripts/basic/fixdep.c:156: warning: implicit declaration of function ‘perror’
scripts/basic/fixdep.c:156: warning: incompatible implicit declaration of built- in function ‘exit’
scripts/basic/fixdep.c: In function ‘is_defined_config’:
scripts/basic/fixdep.c:172: warning: implicit declaration of function ‘memcmp’
scripts/basic/fixdep.c: In function ‘define_config’:
scripts/basic/fixdep.c:185: warning: implicit declaration of function ‘memcpy’
scripts/basic/fixdep.c:185: warning: incompatible implicit declaration of built- in function ‘memcpy’
scripts/basic/fixdep.c: In function ‘use_config’:
scripts/basic/fixdep.c:204: error: ‘PATH_MAX’ undeclared (first use in this func tion)
scripts/basic/fixdep.c:212: warning: incompatible implicit declaration of built- in function ‘memcpy’
scripts/basic/fixdep.c:218: warning: implicit declaration of function ‘tolower’
scripts/basic/fixdep.c:220: warning: incompatible implicit declaration of built- in function ‘printf’
scripts/basic/fixdep.c:204: warning: unused variable ‘s’
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:223: error: syntax error before ‘size_t’
scripts/basic/fixdep.c:224: warning: function declaration isn’t a prototype
scripts/basic/fixdep.c: In function ‘parse_config_file’:
scripts/basic/fixdep.c:225: error: ‘map’ undeclared (first use in this function)
scripts/basic/fixdep.c:225: error: ‘len’ undeclared (first use in this function)
scripts/basic/fixdep.c:231: warning: implicit declaration of function ‘ntohl’
scripts/basic/fixdep.c:242: warning: implicit declaration of function ‘isalnum’
scripts/basic/fixdep.c: In function ‘strrcmp’:
scripts/basic/fixdep.c:255: warning: implicit declaration of function ‘strlen’
scripts/basic/fixdep.c:255: warning: incompatible implicit declaration of built- in function ‘strlen’
scripts/basic/fixdep.c: In function ‘do_config_file’:
scripts/basic/fixdep.c:266: error: storage size of ‘st’ isn’t known
scripts/basic/fixdep.c:270: warning: implicit declaration of function ‘open’
scripts/basic/fixdep.c:270: error: ‘O_RDONLY’ undeclared (first use in this func tion)
scripts/basic/fixdep.c:272: warning: incompatible implicit declaration of built- in function ‘fprintf’
scripts/basic/fixdep.c:272: error: ‘stderr’ undeclared (first use in this functi on)
scripts/basic/fixdep.c:274: warning: incompatible implicit declaration of built- in function ‘exit’
scripts/basic/fixdep.c:276: warning: implicit declaration of function ‘fstat’
scripts/basic/fixdep.c:278: warning: implicit declaration of function ‘close’
scripts/basic/fixdep.c:281: warning: implicit declaration of function ‘mmap’
scripts/basic/fixdep.c:281: error: ‘PROT_READ’ undeclared (first use in this fun ction)
scripts/basic/fixdep.c:281: error: ‘MAP_PRIVATE’ undeclared (first use in this f unction)
scripts/basic/fixdep.c:281: warning: assignment makes pointer from integer witho ut a cast
scripts/basic/fixdep.c:290: warning: implicit declaration of function ‘munmap’
scripts/basic/fixdep.c:266: warning: unused variable ‘st’
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:295: error: syntax error before ‘size_t’
scripts/basic/fixdep.c:296: warning: function declaration isn’t a prototype
scripts/basic/fixdep.c: In function ‘parse_dep_file’:
scripts/basic/fixdep.c:297: error: ‘map’ undeclared (first use in this function)
scripts/basic/fixdep.c:298: error: ‘len’ undeclared (first use in this function)
scripts/basic/fixdep.c:300: error: ‘PATH_MAX’ undeclared (first use in this func tion)
scripts/basic/fixdep.c:302: warning: implicit declaration of function ‘strchr’
scripts/basic/fixdep.c:302: warning: incompatible implicit declaration of built- in function ‘strchr’
scripts/basic/fixdep.c:304: warning: incompatible implicit declaration of built- in function ‘fprintf’
scripts/basic/fixdep.c:304: error: ‘stderr’ undeclared (first use in this functi on)
scripts/basic/fixdep.c:305: warning: incompatible implicit declaration of built- in function ‘exit’
scripts/basic/fixdep.c:307: warning: incompatible implicit declaration of built- in function ‘memcpy’
scripts/basic/fixdep.c:308: warning: incompatible implicit declaration of built- in function ‘printf’
scripts/basic/fixdep.c:300: warning: unused variable ‘s’
scripts/basic/fixdep.c: In function ‘print_deps’:
scripts/basic/fixdep.c:337: error: storage size of ‘st’ isn’t known
scripts/basic/fixdep.c:341: error: ‘O_RDONLY’ undeclared (first use in this func tion)
scripts/basic/fixdep.c:343: warning: incompatible implicit declaration of built- in function ‘fprintf’
scripts/basic/fixdep.c:343: error: ‘stderr’ undeclared (first use in this functi on)
scripts/basic/fixdep.c:345: warning: incompatible implicit declaration of built- in function ‘exit’
scripts/basic/fixdep.c:349: warning: incompatible implicit declaration of built- in function ‘fprintf’
scripts/basic/fixdep.c:353: error: ‘PROT_READ’ undeclared (first use in this fun ction)
scripts/basic/fixdep.c:353: error: ‘MAP_PRIVATE’ undeclared (first use in this f unction)
scripts/basic/fixdep.c:353: warning: assignment makes pointer from integer witho ut a cast
scripts/basic/fixdep.c:337: warning: unused variable ‘st’
scripts/basic/fixdep.c: In function ‘traps’:
scripts/basic/fixdep.c:372: warning: incompatible implicit declaration of built- in function ‘fprintf’
scripts/basic/fixdep.c:372: error: ‘stderr’ undeclared (first use in this functi on)
scripts/basic/fixdep.c:374: warning: incompatible implicit declaration of built- in function ‘exit’
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2


用make menuconfig和make xconfig以及make gconfig问题类似。
发现/usr/lib/gcc/i486-linux-gnu/4.0.3/include下面似乎少了什么头文件。


请问有人也碰到过这样的情况吗?
本人是ubuntu新手,请达人指教
头像
xjflyttp
帖子: 281
注册时间: 2006-10-18 0:36
来自: Core
送出感谢: 0
接收感谢: 0
联系:

#2

帖子 xjflyttp » 2006-10-18 1:44

你应该是少了这些头文件 sys/types.h:这些什么的
是不是应该装dev包?我也不太清楚ubuntu需要装什么``等高人来吧 ·
NICMICHAEL
帖子: 309
注册时间: 2006-01-04 19:26
送出感谢: 0
接收感谢: 0

#3

帖子 NICMICHAEL » 2006-10-18 11:47

应该是没有.config配置文件
仅供参考
Athlon 64 X2 Dual Core Processor 4200+ Socket 939 OC 2.8 GHZ
G.Skill DDR400 2 3 2 5 1GB *2 Dual Channel OC DDR500
Szgalaxy 8600 GTE 650MHZ/2000MHZ
Seagate 80GB *2 RAID 0+Maxtor 80G
DFI LanParty UT NF4-D
kernel 2.6.22-ck1 再见,Con Kolivas!
头像
xjflyttp
帖子: 281
注册时间: 2006-10-18 0:36
来自: Core
送出感谢: 0
接收感谢: 0
联系:

#4

帖子 xjflyttp » 2006-10-18 13:34

NICMICHAEL 写了:应该是没有.config配置文件
仅供参考
郁闷一下`` 我自己也下了个18.1的内核 我把原来boot/里面的默认.config复制过去 还是一样......
T60p/T7600/2G/WD1600BJKT/BT/AR5008/V5200/15' QXGA
头像
xjflyttp
帖子: 281
注册时间: 2006-10-18 0:36
来自: Core
送出感谢: 0
接收感谢: 0
联系:

#5

帖子 xjflyttp » 2006-10-18 13:51

找到了.........
需要安装这个libavahi-glib-dev包

代码: 全选

sudo apt-get install libavahi-glib-dev
跟着会找到一堆依存关系的包

代码: 全选

libavahi-common-data libavahi-common-dev libavahi-common3 libavahi-glib-dev libavahi-glib1 libc6-dev libglib2.0-0 libglib2.0-dev linux-kernel-headers
另外可能还需要

代码: 全选

http://ftp.gnu.org/pub/gnu/ncurses
这里的组件 ··其他的正在弄 ``不知道还少什么
T60p/T7600/2G/WD1600BJKT/BT/AR5008/V5200/15' QXGA
回复

回到 “老旧版本支持”