FYI: I am trying to build zaptel-1.2.4 against the recently updated kernel version 2.6.9-34.EL on Centos 4.2. but I am getting errors and it will not build. This is apparently due to a typo in a kernel header spinlock.h although I have not successfully modified the kernel and built zaptel against it yet. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180568 This bug report has a typo as well. It should read: #define DEFINE_RWLOCK(x) rwlock_t x = RW__LOCK_UNLOCKED make -C /lib/modules/2.6.9-34.EL/build SUBDIRS=/usr/src/zaptel-1.2.4 XPPMOD= modules make[1]: Entering directory `/usr/src/kernels/2.6.9-34.EL-i686' CC [M] /usr/src/zaptel-1.2.4/zaptel.o /usr/src/zaptel-1.2.4/zaptel.c:384: error: syntax error before "zone_lock" /usr/src/zaptel-1.2.4/zaptel.c:384: warning: type defaults to `int' in declaration of `zone_lock' /usr/src/zaptel-1.2.4/zaptel.c:384: error: incompatible types in initialization /usr/src/zaptel-1.2.4/zaptel.c:384: error: initializer element is not constant /usr/src/zaptel-1.2.4/zaptel.c:384: warning: data definition has no type or storage class /usr/src/zaptel-1.2.4/zaptel.c:385: error: syntax error before "chan_lock" /usr/src/zaptel-1.2.4/zaptel.c:385: warning: type defaults to `int' in declaration of `chan_lock' /usr/src/zaptel-1.2.4/zaptel.c:385: error: incompatible types in initialization /usr/src/zaptel-1.2.4/zaptel.c:385: error: initializer element is not constant /usr/src/zaptel-1.2.4/zaptel.c:385: warning: data definition has no type or storage class /usr/src/zaptel-1.2.4/zaptel.c:188: warning: 'fcstab' defined but not used make[2]: *** [/usr/src/zaptel-1.2.4/zaptel.o] Error 1 make[1]: *** [_module_/usr/src/zaptel-1.2.4] Error 2 make[1]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-i686' make: *** [linux26] Error 2 -- Chris Mason NetConcepts (264) 497-5670 Fax: (264) 497-8463 Int: (305) 704-7249 Fax: (815)301-9759 UK 44.207.183.0271 Cell: 264-235-5670 Yahoo IM: netconcepts_anguilla@yahoo.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Hello
I've been trying to compile zaptel 1.2.4 on Mandriva 10.2 , kernel
2.6.11-6mdk and i keep getting these errors:
#make linux26
cc -I. -O4 -g -Wall -DBUILDING_TONEZONE -Drw_lock_t="rwlock_t"
-DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -c -o
gendigits.o gendigits.c
cc -o gendigits gendigits.o -lm
./gendigits
cc -I. -O4 -g -Wall -DBUILDING_TONEZONE -Drw_lock_t="rwlock_t"
-DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" makefw.c
-o makefw
./makefw tormenta2.rbt tor2fw > tor2fw.h
Loaded 69900 bytes from file
./makefw pciradio.rbt radfw > radfw.h
Loaded 42096 bytes from file
ZAPTELVERSION="1.2.4" build_tools/make_version_h > version.h.tmp
if cmp -s version.h.tmp version.h ; then echo; else \
mv version.h.tmp version.h ; \
fi
rm -f version.h.tmp
cc -I. -O4 -g -Wall -DBUILDING_TONEZONE -Drw_lock_t="rwlock_t"
-DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -c -o
ztcfg.o
ztcfg.c
cc -c -fPIC -I. -O4 -g -Wall -DBUILDING_TONEZONE
-Drw_lock_t="rwlock_t" -DSTANDALONE_ZAPATA
-DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DBUILDING_TONEZONE -o
zonedata.lo
zonedata.c
cc -c -fPIC -I. -O4 -g -Wall -DBUILDING_TONEZONE
-Drw_lock_t="rwlock_t" -DSTANDALONE_ZAPATA
-DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DBUILDING_TONEZONE -o
tonezone.lo
tonezone.c
ar rcs libtonezone.a zonedata.lo tonezone.lo
cc -o ztcfg ztcfg.o libtonezone.a -lm
cc -I. -O4 -g -Wall -DBUILDING_TONEZONE -Drw_lock_t="rwlock_t"
-DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -c -o
torisatool.o torisatool.c
cc -o torisatool torisatool.o
cc -I. -O4 -g -Wall -DBUILDING_TONEZONE -Drw_lock_t="rwlock_t"
-DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -c -o
ztmonitor.o ztmonitor.c
cc -o ztmonitor ztmonitor.o
cc -o ztspeed.o -c ztspeed.c
cc -o ztspeed ztspeed.o
cc -I. -O4 -g -Wall -DBUILDING_TONEZONE -Drw_lock_t="rwlock_t"
-DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" zttest.c
-o zttest
cc -I. -O4 -g -Wall -DBUILDING_TONEZONE -Drw_lock_t="rwlock_t"
-DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -c -o
fxotune.o fxotune.c
cc -o fxotune fxotune.o -lm
/lib/modules/2.6.11-6mdk/build
make -C /lib/modules/2.6.11-6mdk/build SUBDIRS=/usr/src/zaptel-1.2.4
XPPMOD= modules
make[1]: Entering directory `/lib/modules/2.6.11-6mdk/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/2.6.11-6mdk/build'
make: *** [linux26] Error 2
I've made all the modifications to the spinlock.h file
[ #define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED]
suggested on this list and also the changes to the Zaptel Makefile
[CFLAGS+=$(shell if uname -r | grep -q 2.6.11-6mdk ; then echo
"-Drw_lock_t=\"rwlock_t\""; fi) ] ,
but the problem persists .
Any ideas ?
--
Assaf Flatto
Atelis IT Manager
Cellular: +972-54-5679230
e-mail: assaf@atelis.net
Chris Mason (Lists) wrote:> FYI: > I am trying to build zaptel-1.2.4 against the recently updated kernel > version 2.6.9-34.EL on Centos 4.2. but I am getting errors and it will > not build. This is apparently due to a typo in a kernel header > spinlock.h although I have not successfully modified the kernel and > built zaptel against it yet. > > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180568 > > This bug report has a typo as well. It should read: > > #define DEFINE_RWLOCK(x) rwlock_t x = RW__LOCK_UNLOCKED > ><snipped> This solution worked for me. Scroll down until you find rebuilding zaptel. http://nerdvittles.com/index.php?p=123 Thanks, Mike Clark