Anthony Rodgers
2006-Mar-10 14:01 UTC
[Asterisk-Users] Problem compiling zaptel on latest RHEL kernel (2.6.9-34.EL)
Greetings, I have just updated our test server to 2.6.9-34.EL and get the following error messages when compiling zaptel: make[1]: Entering directory `/usr/src/kernels/2.6.9-34.EL-i686' CC [M] /usr/src/zaptel/zaptel-1.2.1/zaptel.o /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: error: syntax error before "zone_lock" /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: warning: type defaults to `int' in declaration of `zone_lock' /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: error: incompatible types in initialization /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: error: initializer element is not constant /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: warning: data definition has no type or storage class /usr/src/zaptel/zaptel-1.2.1/zaptel.c:384: error: syntax error before "chan_lock" /usr/src/zaptel/zaptel-1.2.1/zaptel.c:384: warning: type defaults to `int' in declaration of `chan_lock' /usr/src/zaptel/zaptel-1.2.1/zaptel.c:384: error: incompatible types in initialization /usr/src/zaptel/zaptel-1.2.1/zaptel.c:384: error: initializer element is not constant /usr/src/zaptel/zaptel-1.2.1/zaptel.c:384: warning: data definition has no type or storage class /usr/src/zaptel/zaptel-1.2.1/zaptel.c:187: warning: 'fcstab' defined but not used make[2]: *** [/usr/src/zaptel/zaptel-1.2.1/zaptel.o] Error 1 make[1]: *** [_module_/usr/src/zaptel/zaptel-1.2.1] Error 2 make[1]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-i686' make: *** [linux26] Error 2 If I reboot from the previous kernel 2.6.9-22.0.2.EL, zaptel compiles just fine. This behavior is true for both zaptel-1.2.1 (shown above) and zaptel-1.2.4. Thoughts? Regards, -- Anthony Rodgers Business Systems Analyst District of North Vancouver Web: http://www.dnv.org RSS Feed: http://www.dnv.org/rss.asp
Adrian Carter
2006-Mar-10 21:14 UTC
[Asterisk-Users] Problem compiling zaptel on latest RHEL kernel (2.6.9-34.EL)
Yes, I see the same behavior on CentOS 4.2 Anthony Rodgers wrote:> Greetings, > > I have just updated our test server to 2.6.9-34.EL and get the > following error messages when compiling zaptel: > > make[1]: Entering directory `/usr/src/kernels/2.6.9-34.EL-i686' > CC [M] /usr/src/zaptel/zaptel-1.2.1/zaptel.o > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: error: syntax error before > "zone_lock" > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: warning: type defaults to > `int' in declaration of `zone_lock' > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: error: incompatible types > in initialization > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: error: initializer element > is not constant > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: warning: data definition > has no type or storage class > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:384: error: syntax error before > "chan_lock" > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:384: warning: type defaults to > `int' in declaration of `chan_lock' > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:384: error: incompatible types > in initialization > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:384: error: initializer element > is not constant > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:384: warning: data definition > has no type or storage class > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:187: warning: 'fcstab' defined > but not used > make[2]: *** [/usr/src/zaptel/zaptel-1.2.1/zaptel.o] Error 1 > make[1]: *** [_module_/usr/src/zaptel/zaptel-1.2.1] Error 2 > make[1]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-i686' > make: *** [linux26] Error 2 > > If I reboot from the previous kernel 2.6.9-22.0.2.EL, zaptel compiles > just fine. > > This behavior is true for both zaptel-1.2.1 (shown above) and > zaptel-1.2.4. > > Thoughts? > > Regards,-- Adrian Carter Technical Manager Leading Edge Internet Web http://www.lei.net.au http://support.lei.net.au Direct +61 2 6163 6162 Support 1 300 662 415 E-mail cartera@lei.net.au
Russ Price
2006-Mar-11 08:33 UTC
[Asterisk-Users] Problem compiling zaptel on latest RHEL kernel (2.6.9-34.EL)
Anthony Rodgers wrote:> Greetings, > > I have just updated our test server to 2.6.9-34.EL and get the following > error messages when compiling zaptel: > > make[1]: Entering directory `/usr/src/kernels/2.6.9-34.EL-i686' > CC [M] /usr/src/zaptel/zaptel-1.2.1/zaptel.o > /usr/src/zaptel/zaptel-1.2.1/zaptel.c:383: error: syntax error before > "zone_lock"[snipped] This bit me with CentOS 4.2 as well. The problem is actually a typo in the kernel spinlock.h file. See: <http://bugs.digium.com/view.php?id=6425> and <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180568> for more information. Here's a quick fix. In your zaptel Makefile, add the following (line 38 for 1.2.4) - THIS SHOLD BE ALL ONE LINE: CFLAGS+=$(shell if uname -r | grep -q 2.6.9-34.EL; then echo "-Drw_lock_t=\"rwlock_t\""; fi) This way, if this is fixed in the next kernel release, you won't need to make another change to the Makefile. Russ