
building error & bugs
lamdoc
这个作者很懒,什么都没留下…
展开
-
错误: 隐式声明函数‘kmalloc’ [-Werror=implicit-function-declaration]
编译时遇到这个错误,原因是没有包含头文件linux/slab.h./home/xxha/study/char/memdev.c:152:2: 错误: 隐式声明函数‘kmalloc’ [-Werror=implicit-function-declaration]隐式声明函数错误的意思是函数在未声明之前就被调用了,需要先声明这两个函数,版本变化导致这个错误的出现。解决方法:找到原创 2012-07-24 14:15:20 · 4333 阅读 · 0 评论 -
warning: passing argument 2 of 'get_reboot_reason'
warning: passing argument 2 of 'get_reboot_reason' from incompatible pointer type这类警告是函数类型 有差异,需要强制转换。如:iconv(cd, &inbuf, ,&inlen, &outbuf, &outlen);改为:iconv(cd, (const char **)&inbuf,原创 2012-07-06 10:22:13 · 1196 阅读 · 0 评论 -
编译内核时遇到的问题 SEGMENT_SIZE undeclared
错误如下:fs/binfmt_aout.c: In function 'load_aout_binary':fs/binfmt_aout.c:271: error: 'SEGMENT_SIZE' undeclared (first use in this function)fs/binfmt_aout.c:271: error: (Each undeclared identifier is原创 2012-06-25 11:44:04 · 515 阅读 · 0 评论 -
undefined reference to 'pthread_create' 问题
所以现在才开始接触线程编程,照着GUN/Linux编程指南中的一个例子输入编译,结果出现如下错误:undefined reference to 'pthread_create'undefined reference to 'pthread_join'问题原因: pthread 库不是 Linux 系统默认的库,连接时需要使用静态库 libpthread.a,所以在使用pt原创 2012-07-18 17:01:09 · 392 阅读 · 0 评论 -
fatal error: stdio.h: 没有那个文件或目录
今天编译一个程序,遇到这个问题。fatal error: stdio.h: 没有那个文件或目录查了一下才知道,原来是少一个libc6-dev的软件包。sudo apt-get install libc6-dev之后就可以成功编译了。原创 2012-06-10 14:55:44 · 2055 阅读 · 0 评论 -
ext2文件系统错误
attempt to access beyond end of device ram0: rw=0, want=16482, limit=8192 EXT2-fs error (device ram0): ext2_ge原创 2012-09-13 15:22:42 · 625 阅读 · 0 评论 -
sync_supers() NULL pointer导致的内核崩溃
这BUG随机出现,可能4小时就出现,也可能40多小时才出现。。真是恐怖呀,生生卡了我2周。内核空指针崩溃 现场如下:[107943.320000] Unable to handle kernel NULL pointer dereference at virtual address 00000000[107943.320000] pgd = c0004000[107943.330000原创 2013-08-06 16:16:47 · 809 阅读 · 0 评论