Hi, I'm new to asterisk. I just checked out asterisk from CVS using the instructions in the Quick Install Guide and I'm having trouble compiling zaptel. Here's what happens when I type make: $ make gcc -I/usr/src/linux-2.4/include -O6 -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I/usr/src/linux/drivers/net -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I/usr/src/linux/drivers/net/wan -I /usr/src/linux/include -I/usr/src/linux/include/net -DECHO_CAN_MARK2 -DCONFIG_ZAPATA_PPP -DTORMENTA_BASE=0xd0000 -DDEFAULT_TONE_ZONE=0 -DSTANDALONE_ZAPATA -c zaptel.c In file included from zaptel.c:35: /usr/include/linux/module.h:21: linux/modversions.h: No such file or directory make: *** [zaptel.o] Error 1 I'm running Debian with the 2.4.16-686 kernel. I'm using the 2.4.16 kernel headers. Does anyone have any suggestions? I checked the mailing list and can't find any records of similar problems. Thanks! -Amos
You need to install kernel SOURCES and place it in /usr/src and then create a symlink to it called linux so you would have /usr/src/linux directory ..... regards Martin On Sat, 22 Feb 2003, Amos Latteier wrote:> Hi, > > I'm new to asterisk. I just checked out asterisk from CVS using the > instructions in the Quick Install Guide and I'm having trouble compiling > zaptel. Here's what happens when I type make: > > $ make > gcc -I/usr/src/linux-2.4/include -O6 -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB > -I/usr/src/linux/drivers/net -Wall -I. -Wstrict-prototypes > -fomit-frame-pointer -I/usr/src/linux/drivers/net/wan -I > /usr/src/linux/include -I/usr/src/linux/include/net -DECHO_CAN_MARK2 > -DCONFIG_ZAPATA_PPP -DTORMENTA_BASE=0xd0000 -DDEFAULT_TONE_ZONE=0 > -DSTANDALONE_ZAPATA -c zaptel.c > In file included from zaptel.c:35: > /usr/include/linux/module.h:21: linux/modversions.h: No such file or directory > make: *** [zaptel.o] Error 1 > > I'm running Debian with the 2.4.16-686 kernel. I'm using the 2.4.16 kernel > headers. Does anyone have any suggestions? I checked the mailing list and > can't find any records of similar problems. > > Thanks! > > -Amos > > > > > > > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users at lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users >
Martin Pycko wrote: > You need to install kernel SOURCES and place it in /usr/src > and then create a symlink to it called linux so you would have > /usr/src/linux directory ..... Thanks for the suggestion, however, I tried this but I still can't compile. $ make cc -I. -O4 -g -Wall -DBUILDING_TONEZONE -DSTANDALONE_ZAPATA -c -o gendigits.o gendigits.c cc -o gendigits gendigits.o -lm ./gendigits gcc -I/usr/src/linux-2.4/include -O6 -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I/usr/src/linux/drivers/net -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I/usr/src/linux/drivers/net/wan -I /usr/src/linux/include -I/usr/src/linux/include/net -DECHO_CAN_MARK2 -DCONFIG_ZAPATA_PPP -DTORMENTA_BASE=0xd0000 -DDEFAULT_TONE_ZONE=0 -DSTANDALONE_ZAPATA -c zaptel.c In file included from zaptel.c:35: /usr/src/linux/include/linux/module.h:21: linux/modversions.h: No such file or directory make: *** [zaptel.o] Error 1 I don't know very much about compiling, but it seems that module.h is looking for modversions.h. #ifdef __GENKSYMS__ # define _set_ver(sym) sym # undef MODVERSIONS # define MODVERSIONS #else /* ! __GENKSYMS__ */ # if !defined(MODVERSIONS) && defined(EXPORT_SYMTAB) # define _set_ver(sym) sym # include <linux/modversions.h> # endif #endif /* __GENKSYMS__ */ I don't have any modversions.h file on my computer. It appears to me that perhaps neither __GENKSYMS__ nor MODVERSIONS are defined, but EXPORT_SYMTAB is. I don't know what these variables mean, or if these settings are correct or not. There's also a line in the Makefile that seems to look for a modversions.h file and include it if it's found. KFLAGS+=$(shell [ -f $(KINCLUDES)/linux/modversions.h ] && echo "-DMODVERSIONS -include $(K\ INCLUDES)/linux/modversions.h") Should this also tweak some of the variables that module.h is looking for to let it know that it shouldn't include modversions.h? I'm way beyond my depth here. Thanks for any suggestions! -Amos
Martin Pycko wrote: > modversions.h is a part of kernel sources. If you don't have it in > /usr/src/linux/include/linux than I bet you didn't install the kernel > sources (not headers) or you have a symlink of /usr/src/linux/include/ > pointing to /usr/include Thanks to help from "Pericles" on IRC, I figured out that it's not sufficient to simply download the kernel sources, you need to: $ make config $ make dep in your kernel source directory in order to create modversions.h Thanks to everyone for their help! Now I can compile. -Amos