QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 776|回复: 1

编译kstat出错的问题

[复制链接]
发表于 2005-2-21 11:13:04 | 显示全部楼层 |阅读模式
我的操作系统是rhel as 3.0
内核是操作系统默认的2.4.21-20.ELsmp,我现在在http://www.s0ftpj.org/en/site.html 下了一个kstat24_v1.1-2.tgz,想看看我的机器有没有lkm,但是在编译的时候出错了,编译出错信息如下:

[code:1]Have you compiled IPv6 support in your kernel ? [y/n] n

        --------------------------------
        |  kstat  Linux 2.4.x version  |
        |  by FuSyS  [email][email protected][/email]  |
        |    [url]http://www.s0ftpj.org/[/url]    |
        | please look at README_FIRST. |
        | If you still have _not_ it's |
        | a good time to press Ctrl-C  |
        |    Else just press RETURN.   |
        --------------------------------



Compiling kstat on game...

gcc -O2 -Wall -Werror -I./include/ -I/usr/src/linux/include -c ./src/procex.c
cc1: warnings being treated as errors
In file included from ./src/procex.c:23:
/usr/include/linux/proc_fs.h:50: warning: `struct file' declared inside parameter list
/usr/include/linux/proc_fs.h:50: warning: its scope is only this definition or declaration, which is probably not what you want.
/usr/include/linux/proc_fs.h:70: parse error before `atomic_t'
/usr/include/linux/proc_fs.h:70: warning: no semicolon at end of struct or union
/usr/include/linux/proc_fs.h:73: parse error before `}'
/usr/include/linux/proc_fs.h:199: warning: `struct tty_driver' declared inside parameter list
/usr/include/linux/proc_fs.h:200: warning: `struct tty_driver' declared inside parameter list
/usr/include/linux/proc_fs.h:203: parse error before `void'
./src/procex.c: In function `get_kstat_proc_syms':
./src/procex.c:52: `proc_net' undeclared (first use in this function)
./src/procex.c:52: (Each undeclared identifier is reported only once
./src/procex.c:52: for each function it appears in.)
./src/procex.c:53: warning: implicit declaration of function `sprintf'
./src/procex.c:53: invalid use of undefined type `struct proc_dir_entry'
./src/procex.c:54: invalid use of undefined type `struct proc_dir_entry'
./src/procex.c:55: invalid use of undefined type `struct proc_dir_entry'
./src/procex.c:56: invalid use of undefined type `struct proc_dir_entry'
./src/procex.c:57: dereferencing pointer to incomplete type
./src/procex.c:59: dereferencing pointer to incomplete type
./src/procex.c:61: warning: implicit declaration of function `strcmp'
./src/procex.c:61: dereferencing pointer to incomplete type
./src/procex.c:62: dereferencing pointer to incomplete type
./src/procex.c:64: dereferencing pointer to incomplete type
./src/procex.c:50: warning: `s' might be used uninitialized in this function
make: *** [kstat] Error 1
[/code:1]
 楼主| 发表于 2005-2-21 16:32:23 | 显示全部楼层
我现在修改了Makefile的-I参数后面的参数,将该参数改为了我linux内核的实际目录,但是还是不行

[code:1]gcc -O2 -Wall -Werror -I./include/ [COLOR=red]-I/usr/src/linux-2.4.21-20.EL/include[/COLOR]  -c ./src/procex.c
cc1: warnings being treated as errors
In file included from /usr/src/linux-2.4.21-20.EL/include/linux/swap.h:6,
                 from /usr/src/linux-2.4.21-20.EL/include/linux/mm.h:31,
                 from /usr/src/linux-2.4.21-20.EL/include/linux/slab.h:14,
                 from /usr/src/linux-2.4.21-20.EL/include/linux/proc_fs.h:5,
                 from ./src/procex.c:23:
/usr/src/linux-2.4.21-20.EL/include/linux/brlock.h:88: warning: `always_inline' attribute directive ignored
/usr/src/linux-2.4.21-20.EL/include/linux/brlock.h:101: warning: `always_inline' attribute directive ignored
/usr/src/linux-2.4.21-20.EL/include/linux/brlock.h:171: warning: `always_inline' attribute directive ignored
/usr/src/linux-2.4.21-20.EL/include/linux/brlock.h:179: warning: `always_inline' attribute directive ignored
make: *** [kstat] Error 1[/code:1]
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-6 13:52 , Processed in 0.058687 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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