Zaptel 1.2.6 not compiling on CentOS 4.3

I have problems compiling zaptel 1.2.6 on my CentOS 4.3. CentOS is updated and I believe I have installed all the dependencies.

The error seems to be a syntax error and I don’t now what to do with it, Can someone please give me some idea of what’s wrong?

/lib/modules/2.6.9-34.0.1.EL/build
make -C /lib/modules/2.6.9-34.0.1.EL/build SUBDIRS=/usr/src/zaptel-1.2.6 modules
make[1]: Entering directory /usr/src/kernels/2.6.9-34.0.1.EL-i686' CC [M] /usr/src/zaptel-1.2.6/zaptel.o /usr/src/zaptel-1.2.6/zaptel.c:384: error: syntax error before "zone_lock" /usr/src/zaptel-1.2.6/zaptel.c:384: warning: type defaults toint’ in declaration of zone_lock' /usr/src/zaptel-1.2.6/zaptel.c:384: error: incompatible types in initialization /usr/src/zaptel-1.2.6/zaptel.c:384: error: initializer element is not constant /usr/src/zaptel-1.2.6/zaptel.c:384: warning: data definition has no type or storage class /usr/src/zaptel-1.2.6/zaptel.c:385: error: syntax error before "chan_lock" /usr/src/zaptel-1.2.6/zaptel.c:385: warning: type defaults toint’ in declaration of chan_lock' /usr/src/zaptel-1.2.6/zaptel.c:385: error: incompatible types in initialization /usr/src/zaptel-1.2.6/zaptel.c:385: error: initializer element is not constant /usr/src/zaptel-1.2.6/zaptel.c:385: warning: data definition has no type or storage class /usr/src/zaptel-1.2.6/zaptel.c:188: warning: 'fcstab' defined but not used make[2]: *** [/usr/src/zaptel-1.2.6/zaptel.o] Error 1 make[1]: *** [_module_/usr/src/zaptel-1.2.6] Error 2 make[1]: Leaving directory/usr/src/kernels/2.6.9-34.0.1.EL-i686’
make: *** [linux26] Error 2

did yo fix spinlock.h?

Thank you, you saved my day. Compiled without problems. I am so grateful.
I new about this issue when I test installed trixbox, but tout it was a minor bug for sound quality, read it on kennonsoft.org.

edit: okay i got the drivers to compile successfully, and load successfully. i have a different problem now, but it’s for a different forum =)

I think I am missing something:

I have applied the spinlock fix. But when I try to compile zaptel, I get this error:

zaptel.c:188: warning: ‘fcstab’ defined but not used

followed by:

warning: ‘set_tor_base’ defined but not used

But zaptel does compile and works okay, but I am running into random issues with my asterisk server, and now I am wondering if this is the culprit.

any ideas why I can;t get this to compile without any errors?

Rick

I know this will sound dumb, but im a newbie :smile:

I dont have a dir /usr/src/ for some reason…

I only see:

a2billing freepbx nwebmail-0.1.80 sipsak-0.8.11 xplhub asterisk-perl-0.08 linux-2.6 redhat xplast zaptel

in /usr/src directory?

Where can i kind my kernel directory so i may find my spinlock.h file?

[quote=“steve006”]I know this will sound dumb, but im a newbie :smile:

I dont have a dir /usr/src/ for some reason…

I only see:

a2billing freepbx nwebmail-0.1.80 sipsak-0.8.11 xplhub asterisk-perl-0.08 linux-2.6 redhat xplast zaptel

in /usr/src directory?

Where can i kind my kernel directory so i may find my spinlock.h file?[/quote]

Login to your box with your su or root account

to install the kernel source type:

yum install kernel-devel
(note the current kernel already has the fix for centos)

to get the source for the zaptel type:
wget yum.trixbox.org/centos/4/SRPMS/z … 04.src.rpm

Install zaptel source type:
rpm -ivh zaptel-1.2.6-1.1104.src.rpm

once you have done the above type:
make clean
make
make install

hope this helps

hkemmery you are my hero I had the same problems and all is sorted now !!!

Ok, Looks like kernel is installed now. I also nano’ed the spinlock.h file in the kernel.

It seemed like it was already ok.

Then I downloaded the file: zaptel-1.2.6-1.1104.src.rpm with the wget command.

did the: rpm -ivh zaptel-1.2.6-1.1104.src.rpm command

Then i tried to do the:

make clean - command and result is:

make: *** No rule to make target `clean’. Stop.

It was going so smooth!

Did i download file and run the make clean command in the wrong directory?

why use Zaptel 1.2.6 when 1.2.9.1 is the latest Digium source for Zaptel ?

get the tarball from asterisk.org/ untar in /usr/src, then change to the created directory and run “make linux26;make install”

I downloaded the new zaptel 1.2.9.1

tar’d it into a directory under /usr/src/zaptel-1.2.9.1

went into dir

typed: make linux26

things started to go then error:

You do not appear to have the sources for the 2.6.9-42.0.2.EL kernel installed.
make: *** [linux26] Error 1

[root@asterisk1 zaptel-1.2.9.1]#

What happened? Did I do a step wrong?

either your symlink is broken (shouldn’t actually matter) or you don’t have the sources installed. have you installed them ?

ftp://mirrors.kernel.org/centos/4.4/upd … EL.src.rpm

Im not to sure baconbuttie, Im a real newbie :smile:

I tried to execute the ftp:// in CLI and get a error:

-bash: ftp://mirrors.kernel.org/centos/4.4/upd … EL.src.rpm: No such file or directory
[root@asterisk1 src]#

:frowning:

if you want to install kernel source on centos use YUM-

yum update
(updates all installed packages including kernel)
yum install kernel-devel
(installs kernel sources)

i used the:

yum update command, it installed a bunch of files.

yum install kernel-devel

install 1 file 3.7 meg

then i went to asterisk.org, downloaded the zaptel 1.2.9.1 tar file.

tar extracted in the /usr/src directory

cd zaptel-1.2.9.1

tried the:

make clean - got a error: make: *** SUBDIRS=/usr/src/zaptel-1.2.9.1: No such file or directory. Stop.
make: *** [clean] Error 2

make linux26 - got a error: You do not appear to have the sources for the 2.6.9-42.0.2.EL kernel installed.
make: *** [linux26] Error 1

Im sure the next command will not work also

make install - so i didnt attempt this command.

Please advise of my error?

to update Steve’s situation (he gave me access to SSH into his box) :

the /usr/src directory was missing symlinks to his kernel source directoryln -s /usr/src/kernels/<insert appropriate directory here> /usr/src/linux-2.6 ln -s /usr/src/kernels/<insert appropriate directory here> /usr/src/linux
that allowed zaptel to compile.

i then “cleaned” /etc/modprobe.conf, /etc/init.d/zaptel and /etc/sysconfig/zaptel removing all the additional modules he wasn’t going to use.

/etc/zaptel.conf was missing an “fxsks=1” statement for his X100P clone.

/etc/asterisk/zapata.conf was missing a “channel => 1” definition.

b0rked by default !

Thanks much for this informative thread from yet another * newbie (but not for long)!

I just installed Centos 4.4, did a yum update, and downloaded all the asterisk stuff. Zaptel compiled without any trouble at all.

Thank you very much Baconbuttie!

Now to add another card and see if i can get 2 lines PSTN into the box :smile:

I have tried installing both CentOS 4.3 and 4.4.

I do a yum -y update
I reboot
I download packages from svn
I attempt to compile zaptel, I get the linux sources error as above. So I use the fix recommended by baconbuttie this lets me compile zaptel and install. I then compile asterisk etc and reboot.
I get an error: Fatal: Module Zaptel not found

But zaptel compiled without any errors.

I have tried not using yum update, I have trield ‘yum remove kernel-devel’ then ‘yum install kernel-devel’ Still same issues.

I have searched non stop for two days, I have never had an issue like this compiling asterisk. The only difference I can see is the CPU is a PentiumD.

If anybody has any hints please let me know, thanks in advance!

EDIT: I noticed this time when CentOS boots it boots the 2.6.9-42.0.3.ELsmp kernel, but when I download the kernel soruce using :yum install kernel-devel" it downloads 2.6.9-42.0.3.EL (ie no “smp”)

Is this the issue?