关于linux下x86模块编译时遇到的问题

43 views
Skip to first unread message

Raiden Huang

unread,
Feb 27, 2012, 9:11:35 AM2/27/12
to tj...@googlegroups.com
fedora16, gcc 4.6.2, kernel 3.2.7
编译一个helloworld模块,报错:
In file included from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/kernel.h:13:0,
                 from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/cache.h:4,
                 from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/time.h:7,
                 from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/stat.h:60,
                 from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/module.h:10,
                 from helloworld.c:8:
/usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/linkage.h:5:25: 致命错误:asm/linkage.h:没有那个文件或目录

真心不懂,于是将kernel/include下的
asm-generic软链为asm,
于是报:

In file included from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/preempt.h:9:0,
                 from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/spinlock.h:50,
                 from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/seqlock.h:29,
                 from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/time.h:8,
                 from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/stat.h:60,
                 from /usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/module.h:10,
                 from helloworld.c:8:
/usr/src/kernels/3.2.7-1.fc16.i686.PAE/include/linux/thread_info.h:53:29: 致命错误:asm/thread_info.h:没有那个文件或目录

我是喂熟馍啊>_<?
Reply all
Reply to author
Forward
0 new messages