Unable to compile Zaptel on RHAT 2.6 kernel

I am trying to compile zaptel on RHAT server 5 w/ 2.6 kernel. I have downloaded and tar’d libpri, zaptel and asterisk. Here’s what my /usr/src/ directory looks like.

[root@ravenph01 ~]# cd /usr/src/
[root@ravenph01 src]# ls
asterisk-1.4.18 libpri-1.4-current.tar.gz
asterisk-1.4-current.tar.gz linux
build linux-2.6
index.html zaptel-1.4.9.2
kernels zaptel-1.4-current.tar.gz
libpri-1.4.3
[root@ravenph01 src]#

So here I follow the instructions:

[root@ravenph01 zaptel-1.4.9.2]# make clean
grep: /lib/modules/2.6.18-53.1.14.el5xen/build/include/linux/autoconf.h: No such file or directory
make[1]: Entering directory /usr/src/zaptel-1.4.9.2/menuselect' rm -f menuselect gmenuselect menuselect.o strcompat.o menuselect_curses.o menuselect_stub.o make[2]: Entering directory/usr/src/zaptel-1.4.9.2/menuselect/mxml’
/bin/rm -f mxmldoc.o testmxml.o mxml-attr.o mxml-entity.o mxml-file.o mxml-index.o mxml-node.o mxml-search.o mxml-set.o mxml-private.o mxml-string.o libmxml.a mxmldoc doc/mxml.3 doc/mxmldoc.1 testmxml mxml.xml
/bin/rm -f mxmldoc-static libmxml.a
/bin/rm -f *.bck .bak
/bin/rm -f config.cache config.log config.status config.h
/bin/rm -f -r autom4te
.cache
make[2]: Leaving directory /usr/src/zaptel-1.4.9.2/menuselect/mxml' make[1]: Leaving directory/usr/src/zaptel-1.4.9.2/menuselect’
rm -f torisatool
rm -f fxotune fxstest sethdlc-new ztcfg ztdiag ztmonitor ztspeed zttest ztscan
rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
rm -f libtonezone.so libtonezone.a *.lo
make -C /lib/modules/2.6.18-53.1.14.el5xen/build SUBDIRS=/usr/src/zaptel-1.4.9.2/kernel HOTPLUG_FIRMWARE=yes 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/” clean
make: *** /lib/modules/2.6.18-53.1.14.el5xen/build: No such file or directory. Stop.
make: *** [clean] Error 2
[root@ravenph01 zaptel-1.4.9.2]#

So already, make clean can’t find /lib/modules/2.6.18-53.1.14.el5xen/build/include/linux/autoconf.h. Unsure how to get something it will find there. Then I do configure, where everything appears OK:

[root@ravenph01 zaptel-1.4.9.2]# ./configure
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking how to run the C preprocessor… gcc -E
checking for a BSD-compatible install… /usr/bin/install -c
checking whether ln -s works… yes
checking for GNU make… make
checking for grep… /bin/grep
checking for sh… /bin/sh
checking for ln… /bin/ln
checking for wget… /usr/bin/wget
checking for grep that handles long lines and -e… (cached) /bin/grep
checking for egrep… /bin/grep -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for initscr in -lcurses… yes
checking curses.h usability… yes
checking curses.h presence… yes
checking for curses.h… yes
checking for initscr in -lncurses… yes
checking for curses.h… (cached) yes
checking for newtBell in -lnewt… yes
checking newt.h usability… yes
checking newt.h presence… yes
checking for newt.h… yes
checking for usb_init in -lusb… yes
checking usb.h usability… yes
checking usb.h presence… yes
checking for usb.h… yes
configure: creating ./config.status
config.status: creating build_tools/menuselect-deps
config.status: creating makeopts
config.status: creating build_tools/make_firmware_object
configure: *** Zaptel build successfully configured ***
[root@ravenph01 zaptel-1.4.9.2]#

‘Make’ seems to have the same missing source:

[root@ravenph01 zaptel-1.4.9.2]# make
grep: /lib/modules/2.6.18-53.1.14.el5xen/build/include/linux/autoconf.h: No such file or directory
make[1]: Entering directory /usr/src/zaptel-1.4.9.2/menuselect' make[2]: Entering directory/usr/src/zaptel-1.4.9.2/menuselect’
gcc -g -c -D_GNU_SOURCE -Wall -c -o menuselect.o menuselect.c
gcc -g -c -D_GNU_SOURCE -Wall -c -o strcompat.o strcompat.c
gcc -g -c -D_GNU_SOURCE -Wall -c -o menuselect_curses.o menuselect_curses.c
make[3]: Entering directory /usr/src/zaptel-1.4.9.2/menuselect/mxml' if test -f config.status; then \ ./config.status --recheck; \ ./config.status; \ else \ ./configure; \ fi checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for a BSD-compatible install... /usr/bin/install -c checking for ranlib... ranlib checking for ar... /usr/bin/ar checking for cp... /bin/cp checking for ln... /bin/ln checking for mkdir... /bin/mkdir checking for nroff... /usr/bin/nroff checking for rm... /bin/rm checking for strdup... yes checking for vsnprintf... yes configure: creating ./config.status config.status: creating Makefile config.status: creating mxml.list config.status: creating mxml.pc config.status: creating config.h touch config.h gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -c mxml-attr.c gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -c mxml-entity.c gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -c mxml-file.c gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -c mxml-index.c gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -c mxml-node.c gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -c mxml-search.c gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -c mxml-set.c gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -c mxml-private.c gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -c mxml-string.c /bin/rm -f libmxml.a /usr/bin/ar crvs libmxml.a mxml-attr.o mxml-entity.o mxml-file.o mxml-index.o mxml-node.o mxml-search.o mxml-set.o mxml-private.o mxml-string.o a - mxml-attr.o a - mxml-entity.o a - mxml-file.o a - mxml-index.o a - mxml-node.o a - mxml-search.o a - mxml-set.o a - mxml-private.o a - mxml-string.o ranlib libmxml.a make[3]: Leaving directory/usr/src/zaptel-1.4.9.2/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/zaptel-1.4.9.2/menuselect' make[1]: Leaving directory/usr/src/zaptel-1.4.9.2/menuselect’
grep: /lib/modules/2.6.18-53.1.14.el5xen/build/include/linux/autoconf.h: No such file or directory
grep: /lib/modules/2.6.18-53.1.14.el5xen/build/include/linux/autoconf.h: No such file or directory
make[1]: Entering directory /usr/src/zaptel-1.4.9.2' You do not appear to have the sources for the 2.6.18-53.1.14.el5xen kernel installed. make[1]: *** [modules] Error 1 make[1]: Leaving directory/usr/src/zaptel-1.4.9.2’
make: *** [all] Error 2
[root@ravenph01 zaptel-1.4.9.2]#

Finally, make install fails as well:

[root@ravenph01 zaptel-1.4.9.2]# make install
grep: /lib/modules/2.6.18-53.1.14.el5xen/build/include/linux/autoconf.h: No such file or directory
grep: /lib/modules/2.6.18-53.1.14.el5xen/build/include/linux/autoconf.h: No such file or directory
make[1]: Entering directory /usr/src/zaptel-1.4.9.2' You do not appear to have the sources for the 2.6.18-53.1.14.el5xen kernel installed. make[1]: *** [modules] Error 1 make[1]: Leaving directory/usr/src/zaptel-1.4.9.2’
make: *** [all] Error 2

Can anyone tell me what I need to do to get the sources where make will find them? I’ve trtied several symbolic links and nothing ever changes.

Hi,

The sorce may be on one of the CDs that you installed from or what about www.redhat.com?

On FC5 and CentOS 4X creating these symbolic links works for me.

ln -s /usr/src/kernels/2.6.17-1.2187_FC5-i686/ /usr/src/linux

ln -s /usr/src/kernels/2.6.17-1.2187_FC5-i686/ /usr/src/linux-26

I do have the DVD media kit from Red Hat. OK, I’m a newbie… Do I need to perform some procedure with the kernel before making the symbolic links? Because I did try those symbolic links to my particular kernels directory file with no change. It seems like what/where it is looking for is /lib/modules/2.6.18-53.1.14.el5xen/build/include/linux/autoconf.h. Do I need to build some kind of link at that path? Also, as root, is there anything different than default stuff that I need in the PATH?

I finally gave up trying to do this, and abandoned Red Hat Server 5. Maybe some guru can figure out what was not going to the right place. I reverted to CentOS 4.6 and followed the install instructions in the Asteriskâ„¢: The Future of Telephony (O’Reilly) book on preparation and install, line for line.
I had no problems compiling and installing everything. Finally!
Then I realized I forgot to configure my RAID 1 @#%&!!!.. life in the computer world is challenging sometimes. er, most of the time.