Bug#510140: zaptel-source: Zaptel modules fail to build under etch-and-a-half

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Dec 29 22:21:27 UTC 2008


Hi

On Mon, Dec 29, 2008 at 12:29:57PM -0600, Karl Schmidt wrote:
> Package: zaptel-source
> Version: 1:1.4.11~dfsg-3
> Severity: important
> 
> I have a Wildcard X100P (uses wct1xxp module) 

X100P (Single span analog card, or rather an analog modem) uses wcfxo.

> that has just stopped working on upgrading the kernel to 
> 2.6.24-etchnhalf.1-amd64

There have been various build fixes required to get Zaptel built on
kernel 2.6.24 . They have been applied in various Zaptel versions.

> 
> I updated to 2.6.24-etchnhalf.1-amd64 and would not build zaptel-source 1:1.2.11.dfsg-1 (See build log below) , so I loaded 1:1.4.11~dfsg-3 
> which would build but still won't work as shown below.
> 
> 
> 
> #build-log:
> dh_testdir
> dh_testroot
> rm -f *-stamp
> # Add here commands to clean up after the build process.
> rm -rf modexamples
> /usr/bin/make clean
> make[1]: Entering directory `/usr/src/modules/zaptel'
> rm -f torisatool makefw tor2fw.h radfw.h
> rm -f ztcfg ztmonitor ztspeed  zttest fxotune ztpty
> rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
> rm -f zonedata.lo tonezone.lo libtonezone.so *.lo
> /usr/bin/make -C /lib/modules/2.6.24-etchnhalf.1-amd64/build SUBDIRS=/usr/src/modules/zaptel clean
> make[2]: Entering directory `/usr/src/linux-headers-2.6.24-etchnhalf.1-amd64'
>   CLEAN   /usr/src/modules/zaptel/.tmp_versions
>   make[2]: Leaving directory `/usr/src/linux-headers-2.6.24-etchnhalf.1-amd64'
>   rm -rf .tmp_versions
>   rm -f gendigits tones.h
>   rm -f libtonezone*
>   rm -f tor2ee
>   rm -f fxotune
>   rm -f core
>   rm -f ztcfg-shared fxstest
>   rm -rf misdn*
>   rm -rf mISDNuser*
>   make[1]: Leaving directory `/usr/src/modules/zaptel'
>   #rm -f debian/manpage.links  debian/manpage.refs debian/*.8
>   dh_clean
>   /usr/bin/make  -f debian/rules kdist_clean kdist_config binary-modules
>   make[1]: Entering directory `/usr/src/modules/zaptel'
>   dh_testdir
>   dh_testroot
>   rm -f *-stamp
>   # Add here commands to clean up after the build process.
>   rm -rf modexamples
>   /usr/bin/make clean
>   make[2]: Entering directory `/usr/src/modules/zaptel'
>   rm -f torisatool makefw tor2fw.h radfw.h
>   rm -f ztcfg ztmonitor ztspeed  zttest fxotune ztpty
>   rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
>   rm -f zonedata.lo tonezone.lo libtonezone.so *.lo
>   /usr/bin/make -C /lib/modules/2.6.24-etchnhalf.1-amd64/build SUBDIRS=/usr/src/modules/zaptel clean
>   make[3]: Entering directory `/usr/src/linux-headers-2.6.24-etchnhalf.1-amd64'
>   make[3]: Leaving directory `/usr/src/linux-headers-2.6.24-etchnhalf.1-amd64'
>   rm -rf .tmp_versions
>   rm -f gendigits tones.h
>   rm -f libtonezone*
>   rm -f tor2ee
>   rm -f fxotune
>   rm -f core
>   rm -f ztcfg-shared fxstest
>   rm -rf misdn*
>   rm -rf mISDNuser*
>   make[2]: Leaving directory `/usr/src/modules/zaptel'
>   #rm -f debian/manpage.links  debian/manpage.refs debian/*.8
>   dh_clean
>   for templ in ; do \
>       cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.24-etchnhalf.1-amd64/g'` ; \
>         done
>         for templ in `ls debian/*.modules.in` ; do \
>             test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
>                 sed -e 's/##KVERS##/2.6.24-etchnhalf.1-amd64/g ;s/#KVERS#/2.6.24-etchnhalf.1-amd64/g ; s/_KVERS_/2.6.24-etchnhalf.1-amd64/g ; s/##KDREV##/2.6.24-6~etchnhalf.7/g ; s/#KDREV#/2.6.24-6~etchnhalf.7/g ; s/_KDREV_/2.6.24-6~etchnhalf.7/g  ' < $templ > ${templ%.modules.in}; \
>                   done
>                   dh_testdir
>                   dh_testroot
>                   dh_clean -k
>                   make modules KERNEL_SOURCES=/lib/modules/2.6.24-etchnhalf.1-amd64/build MODVERSIONS=detect KERNEL=linux-2.6.24-etchnhalf.1-amd64
>                   make[2]: Entering directory `/usr/src/modules/zaptel'
>                   cp cwain/cwain.c cwain.c
>                   cp qozap/qozap.c qozap.c
>                   cp zaphfc/zaphfc.c zaphfc.c
>                   cp ztgsm/ztgsm.c ztgsm.c
>                   cp cwain/cwain.h cwain.h
>                   cp qozap/qozap.h qozap.h
>                   cp zaphfc/zaphfc.h zaphfc.h
>                   cp ztgsm/ztgsm.h ztgsm.h
>                   gcc-4.1 -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DHOTPLUG_FIRMWARE  -lm  gendigits.c   -o gendigits
>                   ./gendigits > tones.h
>                   gcc-4.1 -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DHOTPLUG_FIRMWARE    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.11" 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
>                                           gcc-4.1 -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DHOTPLUG_FIRMWARE   -c -o ztcfg.o ztcfg.c
>                                           gcc-4.1 -c -fPIC -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DBUILDING_TONEZONE -o zonedata.lo zonedata.c
>                                           gcc-4.1 -c -fPIC -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DBUILDING_TONEZONE -o tonezone.lo tonezone.c
>                                           ar rcs libtonezone.a zonedata.lo tonezone.lo
>                                           gcc-4.1 -o ztcfg ztcfg.o libtonezone.a -lm
>                                           gcc-4.1 -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DHOTPLUG_FIRMWARE -o ztmonitor.o -c ztmonitor.c
>                                           gcc-4.1 -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DHOTPLUG_FIRMWARE -o ztmonitor ztmonitor.o
>                                           gcc-4.1  -o ztspeed.o -c ztspeed.c
>                                           gcc-4.1  -o ztspeed ztspeed.o
>                                           gcc-4.1 -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DHOTPLUG_FIRMWARE    zttest.c   -o zttest
>                                           gcc-4.1 -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DHOTPLUG_FIRMWARE -o fxotune.o -c fxotune.c
>                                           gcc-4.1 -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DHOTPLUG_FIRMWARE -o fxotune fxotune.o -lm
>                                           gcc-4.1 -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 -g -Wall -DBUILDING_TONEZONE   -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DHOTPLUG_FIRMWARE    ztpty.c   -o ztpty
>                                           ztpty.c: In function ‘main’:
>                                           ztpty.c:80: warning: implicit declaration of function ‘ioctl’
>                                           /lib/modules/2.6.24-etchnhalf.1-amd64/build
>                                           make -C /lib/modules/2.6.24-etchnhalf.1-amd64/build SUBDIRS=/usr/src/modules/zaptel modules
>                                           make[3]: Entering directory `/usr/src/linux-headers-2.6.24-etchnhalf.1-amd64'
>                                           scripts/Makefile.build:46: *** CFLAGS was changed in "/usr/src/modules/zaptel/Makefile". Fix it to use EXTRA_CFLAGS.  Stop.

That's really odd. The CFLAGS/EXTRA_CFLAGS error was fixed in earlier
versions of Zaptel. I did check slightly later versions of upstream 
Zaptel to build with etchandahalf.

A long shot:
Some previous versions of the package Zaptel had a bad 'make clean' and
thus m-a left a dirty modules tree. Could you please try this again but
first delete /usr/src/modules/zaptel ?

But also:

>                                           make[3]: *** [_module_/usr/src/modules/zaptel] Error 2
>                                           make[3]: Leaving directory `/usr/src/linux-headers-2.6.24-etchnhalf.1-amd64'
>                                           make[2]: *** [linux26] Error 2
>                                           make[2]: Leaving directory `/usr/src/modules/zaptel'
>                                           make[1]: *** [binary-modules] Error 2
>                                           make[1]: Leaving directory `/usr/src/modules/zaptel'
>                                           make: *** [kdist_build] Error 2
>                                           
> #End of build log                                          
> 
> # ztcfg
> ZT_CHANCONFIG failed on channel 1: Inappropriate ioctl for device (25)

Which reminds me: the resulting Zaptel modules will probably be 
incompatible with your current Asterisk packages.

> 
> Is this the card/driver you needed testing? I would like it to work again (or know what newer card to move to).
> 
> 
> Asterisk version 1:1.2.13~dfsg-2etch4
> 
> 
> 
> # asterisk -vvvc
> .....
> [chan_zap.so] => (Zapata Telephony w/PRI)
>   == Parsing '/etc/asterisk/zapata.conf': Found
>   Dec 28 00:07:31 WARNING[6588]: chan_zap.c:921 zt_open: Unable to specify channel 1: No such device or address
>   Dec 28 00:07:31 ERROR[6588]: chan_zap.c:7001 mkintf: Unable to open channel 1: No such device or address
>   here = 0, tmp->channel = 1, channel = 1
>   Dec 28 00:07:31 ERROR[6588]: chan_zap.c:10476 setup_zap: Unable to register channel '1'
>   Dec 28 00:07:31 WARNING[6588]: loader.c:414 __load_resource: chan_zap.so: load_module failed, returning -1
>   Dec 28 00:07:31 WARNING[6588]: loader.c:554 load_modules: Loading module chan_zap.so failed!
>   
>   
>   /etc/zaptel.conf file has three lines:
>    fxsks=1
>     loadzone = us
>      defaultzone=us
>      
>      the modules don't seem to get loaded by default - loading them manually fails to help but I get:
>      
>      lsmod|grep wct
>      wct1xxp                19232  0
>      zaptel                203976  3 wct1xxp,wcfxo,wcopenpci 
> 
> 
> -- System Information:
> Debian Release: 4.0
>   APT prefers stable
>   APT policy: (500, 'stable')
> Architecture: amd64 (x86_64)
> Shell:  /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.24-etchnhalf.1-amd64
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf-8)
> 
> Versions of packages zaptel-source depends on:
> ii  bzip2                         1.0.3-6    high-quality block-sorting file co
> ii  debhelper                     5.0.42     helper programs for debian/rules
> ii  module-assistant              0.10.8     tool to make module package creati
> 
> Versions of packages zaptel-source recommends:
> ii  zaptel                   1:1.2.11.dfsg-1 zapata telephony utilities
> 
> -- no debconf information
> 
> 
> 
> _______________________________________________
> Pkg-voip-maintainers mailing list
> Pkg-voip-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-voip-maintainers
-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir





More information about the Pkg-voip-maintainers mailing list