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
/usr/home/bwright/zaptel-1.0.2/zconfig.h:66:41: missing binary operator before token "("
In file included from include/linux/kernel.h:11,
from /usr/home/bwright/zaptel-1.0.2/zaptel.c:42:
include/linux/linkage.h:5:25: asm/linkage.h: No such file or directory
In file included from include/linux/types.h:13,
from include/linux/kernel.h:13,
from /usr/home/bwright/zaptel-1.0.2/zaptel.c:42:
include/linux/posix_types.h:47:29: asm/posix_types.h: No such file or directory
In file included from include/linux/kernel.h:13,
from /usr/home/bwright/zaptel-1.0.2/zaptel.c:42:
include/linux/types.h:14:23: asm/types.h: No such file or directory
In file included from include/linux/kernel.h:13,
from /usr/home/bwright/zaptel-1.0.2/zaptel.c:42:
include/linux/types.h:18: error: syntax error before "__kernel_dev_t"
include/linux/types.h:18: warning: type defaults to `int' in declaration of `__kernel_dev_t'
include/linux/types.h:18: warning: data definition has no type or storage class
include/linux/types.h:21: error: syntax error before "dev_t"
include/linux/types.h:21: warning: type defaults to `int' in declaration of `dev_t'
include/linux/types.h:21: warning: data definition has no type or storage class
include/linux/types.h:22: error: syntax error before "ino_t"
include/linux/types.h:22: warning: type defaults to `int' in declaration of `ino_t'
include/linux/types.h:22: warning: data definition has no type or storage class
[long errors blah blah blah snipped]


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.

Thanks.

--
Brian Wright <[EMAIL PROTECTED]>
Manager of Network Operations
Boomerang.com
650-798-1017

_______________________________________________
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

Reply via email to