[Solved] Stuck at zaptel or dahdi compilation.

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

[Solved] Stuck at zaptel or dahdi compilation.

Postby Mika1974 » Thu May 20, 2010 3:51 pm

Hey guys,

I'll keep it short. I'm writing a guide for a CentOS 5.5 32-bit, Asterisk 1.4.21.2-vici, Vicidial 2.2 installation and running into two distinct issues no matter what I try.

I'm a Linux aficionado and have been using it for about 6 years now (Fedora, CentOS, Ubuntu) but as you all know there is something new to learn every day. So should you know anything educate me.

My raw code log of my config thus far:
Code: Select all
# add a second user
useradd mika -d /home/mika/
passwd mika

# set timezone
cp /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime

# set hostname
nano /etc/sysconfig/network
HOSTNAME=vici

# add hostname to hosts
nano /etc/hosts

# yum trickery and required installs
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
yum install foo

rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm
yum -y update

yum -y install yum-fastestmirror yum-cron httpd mod_evasive mod_security mod_ssl openssl denyhosts rkhunter apachetop htop ntop iftop mlocate mysql-server kernel-devel kernel-headers make bison flex gcc-c++ gcc httpd php php-cli php-mysql php-pear php-gd curl sox ncurses-devel openssl-devel mysql-devel gtk2-devel iftop lame screen sipsak subversion unrar unzip mysqltuner php-mysql links ftp gpg ncftp kernel-devel make bison flex gcc-c++ gcc httpd php php-cli php-mysql php-pear php-gd curl sox ncurses-devel openssl-devel mysql-devel gtk2-devel


### can't find these packages from
mysql-client libncurses ploticus mpg123 mytop php5- php-cli php5-dev php5-mysql subversion-tools mytop

# linode source
cd /usr/src/
wget http://linode.com/src/2.6.32.12-linode25.tar.bz2
tar xf 2.6.32.12-linode25.tar.bz2
ln -s linux-source-2.6.32.12-linode25 linux

# iptables config
iptables -F
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 5059:5061 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 4569 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 5036 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 2727 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -L
iptables-save

# enable services
chkconfig iptables on & chkconfig ntpd on & chkconfig denyhosts on & chkconfig httpd on & chkconfig mysqld on

# configuring cpan
cpan
quit
cpan
o conf commit
force install Scalar::Util
install DBI
force install DBD::mysql
install Net::Server Time::HiRes Net::Telnet Unicode::Map Jcode OLE::Storage_Lite Proc::ProcessTable Mail::Sendmail Spreadsheet::WriteExcel  Spreadsheet::ParseExcel

# secure some shit
nano /etc/httpd/conf/httpd.conf
nano /etc/ssh/sshd_config
rkhunter --update

# configure mysql root password
export MYSQL_ROOT_PW=UE8bH8bW3ZKDjwh6
mysqladmin -u root password ${MYSQL_ROOT_PW}

# install pear DB module
pear install db

# place source packages in standard place
cd /usr/src

# asterisk-perl module
cd /usr/src/
wget http://asterisk.gnuinter.net/files/asterisk-perl-1.01.tar.gz
tar xzf asterisk-perl-1.01.tar.gz
cd asterisk-perl-1.01
perl Makefile.PL
make all
cd ..

#ttyload
wget http://www.daveltd.com/src/util/ttyload/ttyload-0.5.tar.gz
tar xzf ttyload-0.5.tar.gz
cd ttyload-0.5
make; make install
cd ..

#e-accelerator
wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2
tar xf eaccelerator-0.9.6.tar.bz2
cd eaccelerator-0.9.6
phpize
./configure; make; make install

cp /usr/src/asterisk/eaccelerator-0.9.6/eaccelerator.ini /etc/php.d/eaccelerator.ini
nano /etc/php.d/eaccelerator.ini

eaccelerator.shm_size = "48"
eaccelerator.cache_dir = "/var/lib/eaccelerator"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

mkdir /var/lib/eaccelerator
chmod 0777 -R /var/lib/eaccelerator/
php -v

#libpri 1.4.10.2
wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
tar xfvz libpri-1.4-current.tar.gz
cd `find . -name "libpri-1.4.*" -print`
make
make install
cd ..

# dahdi
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
tar zxf dahdi-linux-complete-current.tar.gz
cd dahdi-linux-complete-2.3.0+2.3.0/
make all; make install

# asterisk 1.4.21.2-vici
wget http://downloads.vicidial.com/required-apps/asterisk-1.4.21.2-vici.tar.gz
… rest of the guide


My DAHDI compilation error:
Code: Select all
[root@vici dahdi-linux-complete-2.3.0+2.3.0]# make all
make -C linux all
make[1]: Entering directory `/usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory `/usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux/drivers/dahdi/firmware'
Attempting to download dahdi-fwload-vpmadt032-1.20.0.tar.gz
--2010-05-20 22:35:20--  http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.20.0.tar.gz
Resolving downloads.digium.com... 76.164.171.232, 2001:470:e0d4::e8
Connecting to downloads.digium.com|76.164.171.232|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 146556 (143K) [application/x-gzip]
Saving to: `dahdi-fwload-vpmadt032-1.20.0.tar.gz'

100%[================================================>] 146,556      269K/s   in 0.5s   

2010-05-20 22:35:21 (269 KB/s) - `dahdi-fwload-vpmadt032-1.20.0.tar.gz' saved [146556/146556]

make[2]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux/drivers/dahdi/firmware'
make -C /usr/src/linux SUBDIRS=/usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=no modules DAHDI_BUILD_ALL=m
make[2]: Entering directory `/usr/src/linux-source-2.6.32.12-linode25'
  CC [M]  /usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux/drivers/dahdi/dahdi-base.o
In file included from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from /usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux/drivers/dahdi/dahdi-base.c:40:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:258:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from /usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux/drivers/dahdi/dahdi-base.c:40:
include/linux/mmzone.h:300: error: 'MAX_NR_ZONES' undeclared here (not in a function)
In file included from /usr/src/linux-source-2.6.32.12-linode25/arch/x86/include/asm/pci.h:4,
                 from include/linux/pci.h:1131,
                 from /usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux/drivers/dahdi/dahdi-base.c:42:
include/linux/mm.h:454:63: warning: "NR_PAGEFLAGS" is not defined
include/linux/mm.h:502:62: warning: "NR_PAGEFLAGS" is not defined
make[3]: *** [/usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux/drivers/dahdi/dahdi-base.o] Error 1
make[2]: *** [_module_/usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux/drivers/dahdi] Error 2
make[2]: Leaving directory `/usr/src/linux-source-2.6.32.12-linode25'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/linux'
make: *** [all] Error 2
[root@vici dahdi-linux-complete-2.3.0+2.3.0]#


My Zaptel compilation error:
Code: Select all
                 from include/linux/pci.h:1131,
                 from /usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:50:
include/linux/mm.h:454:63: warning: "NR_PAGEFLAGS" is not defined
include/linux/mm.h:502:62: warning: "NR_PAGEFLAGS" is not defined
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c: In function 'pciradio_start_dma':
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: implicit declaration of function 'set_current_state'
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: (Each undeclared identifier is reported only once
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: for each function it appears in.)
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1702: error: implicit declaration of function 'schedule_timeout'
make[3]: *** [/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.o] Error 1
make[2]: *** [_module_/usr/src/asterisk/zaptel-1.4.12.1/kernel] Error 2
make[2]: Leaving directory `/usr/src/linux-source-2.6.32.12-linode25'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/asterisk/zaptel-1.4.12.1'
make: *** [all] Error 2
make[1]: Entering directory `/usr/src/asterisk/zaptel-1.4.12.1'
make -C /usr/src/linux ARCH=i386 SUBDIRS=/usr/src/asterisk/zaptel-1.4.12.1/kernel HOTPLUG_FIRMWARE=no KBUILD_OBJ_M="pciradio.o tor2.o torisa.o wcfxo.o wct1xxp.o wctdm.o wcte11xp.o wcusb.o zaptel.o ztd-eth.o ztd-loc.o ztdummy.o ztdynamic.o zttranscode.o wct4xxp/ wctc4xxp/ xpp/ wctdm24xxp/ wcte12xp/" modules
make[2]: Entering directory `/usr/src/linux-source-2.6.32.12-linode25'
  CC [M]  /usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.o
In file included from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from /usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:47:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:258:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from /usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:47:
include/linux/mmzone.h:300: error: 'MAX_NR_ZONES' undeclared here (not in a function)
In file included from /usr/src/linux-source-2.6.32.12-linode25/arch/x86/include/asm/pci.h:4,
                 from include/linux/pci.h:1131,
                 from /usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:50:
include/linux/mm.h:454:63: warning: "NR_PAGEFLAGS" is not defined
include/linux/mm.h:502:62: warning: "NR_PAGEFLAGS" is not defined
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c: In function 'pciradio_start_dma':
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: implicit declaration of function 'set_current_state'
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: (Each undeclared identifier is reported only once
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: for each function it appears in.)
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1702: error: implicit declaration of function 'schedule_timeout'
make[3]: *** [/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.o] Error 1
make[2]: *** [_module_/usr/src/asterisk/zaptel-1.4.12.1/kernel] Error 2
make[2]: Leaving directory `/usr/src/linux-source-2.6.32.12-linode25'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/asterisk/zaptel-1.4.12.1'
make: *** [all] Error 2
[root@vici zaptel-1.4.12.1]#


I've installed the kernel sources as instructed by my hosting provider as you can see in the code log. Please also note that using SVN versions of Zaptal or Dahdi do not make any difference.

My approach is based on how I install and configure other stand-alone FreePBX servers and an old guide written by another Vici forum user.

Any specific advice would be appreciated.

Best regards,

Mika :lol:
Mika1974
 
Posts: 22
Joined: Mon Jun 23, 2008 3:47 pm

Postby Mika1974 » Thu May 20, 2010 4:37 pm

Awesome ! I love the internets.

Credits to:
http://blog.weaverling.org/2009/01/11/personal-voip-pbx-asterisk-1/
http://blog.pathennessy.org/2009/01/01/compiling-dahdi-modules-on-linode/comment-page-1/

As I expected it's a Linode kernel specific thing.

Code: Select all
# prep kernel
# http://blog.pathennessy.org/2009/01/01/compiling-dahdi-modules-on-linode/ # http://blog.weaverling.org/2009/01/11/personal-voip-pbx-asterisk-1/

wget http://linode.com/src/2.6.32.12-linode25.tar.bz2
mv 2.6.32.12-linode25.tar.bz2 /tmp
mkdir /usr/src/kernel; cd /usr/src/kernel
tar xjvf /tmp/`uname -r`.tar.bz2
cd /lib/modules/`uname -r`
ln -s /usr/src/kernel/`uname -r` build
cd /usr/src/kernel/`uname -r`

nano linode-kernel-prep.sh
chmod +x linode-kernel-prep.sh
ln -s /usr/src/kernel/2.6.32.12-linode25/ /usr/src/linux
./linode-kernel-prep.sh

cd /usr/src/asterisk/dahdi-linux-complete-2.3.0+2.3.0/
make all; make install;
etc
Mika1974
 
Posts: 22
Joined: Mon Jun 23, 2008 3:47 pm

Postby Mika1974 » Fri May 21, 2010 5:27 am

I am currently debugging the following issue after a successful make all; make install; make config on the DADHI install :

Code: Select all
[root@vici dahdi-linux-complete-2.3.0+2.3.0]# service dahdi start 
Loading DAHDI hardware modules:
  wct4xxp:                                                 [  OK  ]
  wcte12xp:                                                [  OK  ]
  wct1xxp:                                                 [  OK  ]
  wcte11xp:                                                [  OK  ]
  wctdm24xxp:                                              [  OK  ]
  wcfxo:                                                   [  OK  ]
  wctdm:                                                   [  OK  ]
  wcb4xxp:                                                 [  OK  ]
  wctc4xxp:                                                [  OK  ]
  xpp_usb:  FATAL: Module xpp_usb not found.
                                                           [FAILED]

/usr/share/dahdi/waitfor_xpds: Missing astribank_is_starting
No hardware timing source found in /proc/dahdi, loading dahdi_dummy
Running dahdi_cfg:                                         [  OK  ]
[root@vici dahdi-linux-complete-2.3.0+2.3.0]#


Zaptel issue still exists though:

Code: Select all
make[3]: Leaving directory `/usr/src/asterisk/zaptel-1.4.12.1/menuselect/mxml'
gcc -o menuselect menuselect.o strcompat.o menuselect_curses.o mxml/libmxml.a mxml/libmxml.a -lncurses
make[2]: Leaving directory `/usr/src/asterisk/zaptel-1.4.12.1/menuselect'
make[1]: Leaving directory `/usr/src/asterisk/zaptel-1.4.12.1/menuselect'
Generating input for menuselect ...
make[1]: Entering directory `/usr/src/asterisk/zaptel-1.4.12.1'
make -C /lib/modules/2.6.32.12-linode25/build ARCH=i386 SUBDIRS=/usr/src/asterisk/zaptel-1.4.12.1/kernel HOTPLUG_FIRMWARE=no KBUILD_OBJ_M="pciradio.o tor2.o torisa.o wcfxo.o wct1xxp.o wctdm.o wcte11xp.o wcusb.o zaptel.o ztd-eth.o ztd-loc.o ztdummy.o ztdynamic.o zttranscode.o wct4xxp/ wctc4xxp/ xpp/ wctdm24xxp/ wcte12xp/" modules
make[2]: Entering directory `/usr/src/kernel/2.6.32.12-linode25'
gcc -o /usr/src/asterisk/zaptel-1.4.12.1/kernel/makefw /usr/src/asterisk/zaptel-1.4.12.1/kernel/makefw.c
/usr/src/asterisk/zaptel-1.4.12.1/kernel/makefw /usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.rbt radfw > /usr/src/asterisk/zaptel-1.4.12.1/kernel/radfw.h
Loaded 42096 bytes from file
  CC [M]  /usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.o
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c: In function 'pciradio_start_dma':
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: implicit declaration of function 'set_current_state'
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: (Each undeclared identifier is reported only once
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1701: error: for each function it appears in.)
/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.c:1702: error: implicit declaration of function 'schedule_timeout'
make[3]: *** [/usr/src/asterisk/zaptel-1.4.12.1/kernel/pciradio.o] Error 1
make[2]: *** [_module_/usr/src/asterisk/zaptel-1.4.12.1/kernel] Error 2
make[2]: Leaving directory `/usr/src/kernel/2.6.32.12-linode25'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/asterisk/zaptel-1.4.12.1'
make: *** [all] Error 2
[root@vici zaptel-1.4.12.1]#
Mika1974
 
Posts: 22
Joined: Mon Jun 23, 2008 3:47 pm

Postby Mika1974 » Fri May 21, 2010 6:45 am

This is turning into a hosting-provider specific issue - so I'll report back for future generations if there is ever a fix. Apparently Linode.com's VPS kernels do not support ztdummy/dahdi_dummy - however seeing those are all very old discussions from before they migrated to Xen, I'm creating a forum topic there.
Mika1974
 
Posts: 22
Joined: Mon Jun 23, 2008 3:47 pm


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 53 guests