[asterisk-users] zaptel compilation problems with linux 2.6.19

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Dec 2 02:37:45 MST 2006


On Fri, Dec 01, 2006 at 10:55:24AM +0200, Roman Yeryomin wrote:
> On Thursday 30 November 2006 21:49, Tzafrir Cohen wrote::
> > On Thu, Nov 30, 2006 at 07:19:14PM +0200, Roman Yeryomin wrote:
> > > Hello!
> > >
> > > I have problems compiling zaptel (tried 1.2.11, 1.2.10 and 1.4.0-beta2 --
> > > all give the same error) with 2.6.19 kernel
> > >
> > >   CC [M]  /home/roman/install/asterisk/zaptel-1.4.0-beta2/xpp/card_fxo.o
> > > In file included
> > > from /home/roman/install/asterisk/zaptel-1.4.0-beta2/xpp/xpd.h:26,
> > > from /home/roman/install/asterisk/zaptel-1.4.0-beta2/xpp/card_fxo.c:28:
> > > /home/roman/install/asterisk/zaptel-1.4.0-beta2/xpp/xdefs.h:93: error:
> > > conflicting types for 'bool'
> > > include/linux/types.h:36: error: previous declaration of 'bool' was here
> > > In file included
> > > from /home/roman/install/asterisk/zaptel-1.4.0-beta2/zconfig.h:9,
> > > from /home/roman/install/asterisk/zaptel-1.4.0-beta2/zaptel.h:34,
> > > from /home/roman/install/asterisk/zaptel-1.4.0-beta2/xpp/xproto.h:29,
> > > from /home/roman/install/asterisk/zaptel-1.4.0-beta2/xpp/xpd.h:27,
> > > from /home/roman/install/asterisk/zaptel-1.4.0-beta2/xpp/card_fxo.c:28:
> > > include/linux/config.h:10:3: warning: no newline at end of file
> > > make[3]: ***
> > > [/home/roman/install/asterisk/zaptel-1.4.0-beta2/xpp/card_fxo.o] Error 1
> > > make[2]: *** [/home/roman/install/asterisk/zaptel-1.4.0-beta2/xpp] Error
> > > 2 make[1]: *** [_module_/home/roman/install/asterisk/zaptel-1.4.0-beta2]
> > > Error 2 make[1]: Leaving directory
> > > `/home/roman/install/kernel/linux-2.6.19' make: *** [linux26] Error 2
> > >
> > > seems that commenting out "typedef int bool;" in xpp/xdefs.h on line 93
> > > works that out, but don't know if it's completely right thing to do
> >
> > Simply replacing that int with a _Bool will give several "incompatible
> > pointer type" warnings. The following is from our internal working copy,
> > with pathes removed for clarity:
> >
> >   CC [M]  xpp/card_fxo.o
> > xpp/card_fxo.c: In function `__check_report_battery':
> > xpp/card_fxo.c:38: warning: return from incompatible pointer type
> >   CC [M]  xpp/card_fxs.o
> > xpp/card_fxs.c: In function `__check_poll_digital_inputs':
> > xpp/card_fxs.c:37: warning: return from incompatible pointer type
> >   CC [M]  xpp/xbus-core.o
> >   CC [M]  xpp/xpp_zap.o
> > xpp/xpp_zap.c: In function `__check_zap_autoreg':
> > xpp/xpp_zap.c:67: warning: return from incompatible pointer type
> > xpp/xpp_zap.c: In function `__check_prefmaster':
> > xpp/xpp_zap.c:68: warning: return from incompatible pointer type
> > xpp/xpp_zap.c: In function `__check_xpp_ec':
> > xpp/xpp_zap.c:70: warning: return from incompatible pointer type
> > xpp/xpp_zap.c: In function `xpd_read_proc':
> > xpp/xpp_zap.c:437: warning: unused variable `chans'
> > xpp/xpp_zap.c: In function `proc_sync_write':
> > xpp/xpp_zap.c:748: warning: int format, bool arg (arg 5)
> > xpp/xpp_zap.c: In function `proc_xpd_ztregister_write':
> > xpp/xpp_zap.c:816: warning: int format, bool arg (arg 3)
> >
> > Most of them seem to be related to the procfs interface. If you don't
> > need xpp for yourself and can leave with those warnings, go ahead.
> >
> > I'll try to resolve them.
> 
> hmm... make install also gives an error
> 
> install -D -m 644 zaptel.h /usr/include/linux/zaptel.h
> install -D -m 644 torisa.h /usr/include/linux/torisa.h
> install -D -m 644 tonezone.h /usr/include/tonezone.h
> install -m 644 doc/ztcfg.8 /usr/share/man/man8
> install -m 644 doc/zttool.8 /usr/share/man/man8
> [ `id -u` = 0 ] && /sbin/depmod -a 2.6.19 || :
> [ -f /etc/zaptel.conf ] || install -D -m 644 
> zaptel.conf.sample /etc/zaptel.conf
> build_tools/genmodconf linux26 "" "tor2 torisa wcusb wcfxo wctdm wctdm24xxp 
> ztdynamic ztd-eth wct1xxp wcte11xp pciradio ztd-loc ztdummy"
> [: 66: ==: unexpected operator
> [: 66: ==: unexpected operator
> Unknown kernel build version requested... exiting.
> make: *** [install] Error 1

This is because of using non-standard '==' in the shell's test ([).
Fixed in the SVN. 

As a quick-fix:

  sed -i -e 's/==/=/g' build_tools/genmodconf 

(replace every '==' with a single '=' in the genmod script)

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-users mailing list