On Mon, 29 Nov 2004 17:08:23 -0800, Brian Wright <[EMAIL PROTECTED]> wrote: > I'm trying to get zaptel 1.0.2 compiled on FC2 or FC3 and I'm getting > compile time errors. Systems include: > > FC2: Linux xxxxxxxxxxxx 2.6.9-1.3_FC2 #1 Mon Nov 15 14:46:43 EST 2004 > i686 i686 i386 GNU/Linux > FC3: Linux xxxxxxxxxxxx 2.6.9-1.681_FC3 #1 Thu Nov 18 15:13:22 EST 2004 > x86_64 x86_64 x86_64 GNU/Linux > > /usr/home/bwright/zaptel-1.0.2> make linux26 > ... > make -C /usr/src/linux-2.6 SUBDIRS=/usr/home/bwright/zaptel-1.0.2 modules > make[1]: Entering directory `/usr/src/linux-2.6.9' > Makefile:461: .config: No such file or directory > CC [M] /usr/home/bwright/zaptel-1.0.2/zaptel.o > In file included from /usr/home/bwright/zaptel-1.0.2/zconfig.h:9, > from /usr/home/bwright/zaptel-1.0.2/zaptel.c:40: > include/linux/config.h:4:28: linux/autoconf.h: No such file or directory > In file included from /usr/home/bwright/zaptel-1.0.2/zaptel.c:40: > /usr/home/bwright/zaptel-1.0.2/zconfig.h:10:27: linux/version.h: No such > file or directory [snip] > > What appears to be happening is that the #include statement is trying to > include linux/*.h from both /usr/src/linux-2.6/include/linux and > /usr/include/linux. Apparently, this conflicting include directory > namespace doesn't work when compiling kernel drivers on Fedora Core. > So, it appears to be ignoring /usr/include/linux entirely. The compile, > thus, fails finding autoconf.h, version.h and possibly other header > files located in /usr/include/linux which shouldn't be in > /usr/src/linux-2.6/include/linux. > > The other thing I've noticed is the following: > > >more /usr/include/linux/autoconf.h > #error Invalid kernel header included in userspace > > >more /usr/include/linux/config.h > #ifndef _LINUX_CONFIG_H > #define _LINUX_CONFIG_H > > #ifdef __KERNEL__ > #error Incorrectly using glibc headers for a kernel module > #endif > > #endif > > Clearly, if creating a kernel driver on FC2 or FC3, they don't really > want you including these header files anyway and will error out anyway > if you do manage to include them. So, I'd have to say that the zaptel > drivers are going to need a bit of work to compile properly under FC2 or > FC3 anyway. This might also explain why the compiler is ignoring > /usr/include/linux. > > So, is there any way around this problem? I've already had my hand at > editing the Makefile, but I can't seem to make it do anything different > than this. If anyone has any ideas, please let me know. I'd like to > get this driver compiled. >
Did you make the symlink from /usr/src/linux-2.6 to /lib/modules/`uname -r`/build/? As stated in README.Linux26, it says that creating a kernel module no longer requires the full kernel source to compile against. Do that and it should work. Its worked for me on both FC2 and FC3. Nathan _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
