[Asterisk-Users] Problem compiling zaptel

Amos Latteier amos at aracnet.com
Sun Feb 23 16:11:48 MST 2003


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




More information about the asterisk-users mailing list