keywords: ip pbx voip gateway gsm gateway

×

Notice

The forum is in read only mode.
× Questions about A400/800/1200 Analog Interface Card

Trouble with trixbox 2.2

17 years 2 weeks ago #271 by superniko
hello!
im using trixbox 2.2 and kernel 2.6.9-34.0.2 and when i try to compile zaptel drivers i get this error:
hope you can help me
thanks!
nico

Error:

CC [M] /usr/src/zaptel-1.2.16/zaptel-base.o
/usr/src/zaptel-1.2.16/zaptel-base.c:385: error: syntax error before "zone_lock"
/usr/src/zaptel-1.2.16/zaptel-base.c:385: warning: type defaults to `int' in declaration of `zone_lock'
/usr/src/zaptel-1.2.16/zaptel-base.c:385: error: incompatible types in initialization
/usr/src/zaptel-1.2.16/zaptel-base.c:385: error: initializer element is not constant
/usr/src/zaptel-1.2.16/zaptel-base.c:385: warning: data definition has no type or storage class
/usr/src/zaptel-1.2.16/zaptel-base.c:386: error: syntax error before "chan_lock"
/usr/src/zaptel-1.2.16/zaptel-base.c:386: warning: type defaults to `int' in declaration of `chan_lock'
/usr/src/zaptel-1.2.16/zaptel-base.c:386: error: incompatible types in initialization
/usr/src/zaptel-1.2.16/zaptel-base.c:386: error: initializer element is not constant
/usr/src/zaptel-1.2.16/zaptel-base.c:386: warning: data definition has no type or storage class
/usr/src/zaptel-1.2.16/zaptel-base.c:188: warning: 'fcstab' defined but not used
make[2]: *** [/usr/src/zaptel-1.2.16/zaptel-base.o] Error 1
make[1]: *** [_module_/usr/src/zaptel-1.2.16] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.9-34.0.2.EL-i686'
make: *** [all] Error 2
[root@asterisk1 zaptel-1.2.16]#


then i tried with zaptel 1.4 current, got this error:

CC [M] /usr/src/zaptel-1.4.1/torisa.o
/usr/src/zaptel-1.4.1/torisa.c:134: error: syntax error before "torisa"
/usr/src/zaptel-1.4.1/torisa.c:134: warning: type defaults to `int' in declaration of `torisa'
/usr/src/zaptel-1.4.1/torisa.c:134: error: incompatible types in initialization
/usr/src/zaptel-1.4.1/torisa.c:134: error: initializer element is not constant
/usr/src/zaptel-1.4.1/torisa.c:134: warning: data definition has no type or storage class
make[3]: *** [/usr/src/zaptel-1.4.1/torisa.o] Error 1
make[2]: *** [_module_/usr/src/zaptel-1.4.1] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.9-34.0.2.EL-i686'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/zaptel-1.4.1'
make: *** [all] Error 2


and then i removed module torisa in makefile and got this error:

/usr/src/zaptel-1.4.1/zaptel-base.c:394: error: syntax error before "zone_lock"
/usr/src/zaptel-1.4.1/zaptel-base.c:394: warning: type defaults to `int' in declaration of `zone_lock'
/usr/src/zaptel-1.4.1/zaptel-base.c:394: error: incompatible types in initialization
/usr/src/zaptel-1.4.1/zaptel-base.c:394: error: initializer element is not constant
/usr/src/zaptel-1.4.1/zaptel-base.c:394: warning: data definition has no type or storage class
/usr/src/zaptel-1.4.1/zaptel-base.c:395: error: syntax error before "chan_lock"
/usr/src/zaptel-1.4.1/zaptel-base.c:395: warning: type defaults to `int' in declaration of `chan_lock'
/usr/src/zaptel-1.4.1/zaptel-base.c:395: error: incompatible types in initialization
/usr/src/zaptel-1.4.1/zaptel-base.c:395: error: initializer element is not constant
/usr/src/zaptel-1.4.1/zaptel-base.c:395: warning: data definition has no type or storage class
make[3]: *** [/usr/src/zaptel-1.4.1/zaptel-base.o] Error 1
make[2]: *** [_module_/usr/src/zaptel-1.4.1] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.9-34.0.2.EL-i686'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/zaptel-1.4.1'
make: *** [all] Error 2


its real strange because it is a new trixbox 2.2 installation.. i dont understand what is happening... help pleasee
17 years 2 weeks ago #272 by miaolin
it is due to the core source have some issue.

please use

yum install kernel kernel-devel

to update your kernel, then reboot and continue to make your drivers.

another alter way is modify the source code, change the code that define the lock variable.
17 years 2 weeks ago #273 by superniko
Hello, thanks for your answer. I executed "yum install kernel kernel-devel" and it said following:

[root@asterisk1 zaptel-1.2.16]# yum install kernel kernel-devel
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Excluding Packages from CentOS-4 - Updates
Finished
Excluding Packages from CentOS-4 - Base
Finished
Excluding Packages from CentOS-4 - Addons
Finished
Excluding Packages from CentOS-4 - Extras
Finished
Parsing package install arguments
No Match for argument: kernel
Nothing to do


when i try to complile zaptel drivers 1.2 and 1.4 current it has the same errors than before... strange not?
help me please... im stuck
thanks[/quote]
17 years 2 weeks ago #274 by superniko
Hello, thanks for your answer. I executed "yum install kernel kernel-devel" and it said following:

[root@asterisk1 zaptel-1.2.16]# yum install kernel kernel-devel
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Excluding Packages from CentOS-4 - Updates
Finished
Excluding Packages from CentOS-4 - Base
Finished
Excluding Packages from CentOS-4 - Addons
Finished
Excluding Packages from CentOS-4 - Extras
Finished
Parsing package install arguments
No Match for argument: kernel
Nothing to do


when i try to complile zaptel drivers 1.2 and 1.4 current it has the same errors than before... strange not?
help me please... im stuck
thanks[/quote]
17 years 2 weeks ago #276 by miaolin
well, check the line#385 in zaptel_base.c, you can see following :

#ifdef DEFINE_RWLOCK
static DEFINE_RWLOCK(zone_lock);
static DEFINE_RWLOCK(chan_lock);
#else
static rwlock_t zone_lock = RW_LOCK_UNLOCKED;
static rwlock_t chan_lock = RW_LOCK_UNLOCKED;
#endif

modify these line as below

/*#ifdef DEFINE_RWLOCK
static DEFINE_RWLOCK(zone_lock);
static DEFINE_RWLOCK(chan_lock);
#else*/
static rwlock_t zone_lock = RW_LOCK_UNLOCKED;
static rwlock_t chan_lock = RW_LOCK_UNLOCKED;
/*#endif*/



similar in zaptel 1.4.1 line#134

modify

#ifdef DEFINE_RWLOCK
static DEFINE_RWLOCK(torisa);
#else
static rwlock_t torisa = RW_LOCK_UNLOCKED;
#endif

to

//#ifdef DEFINE_RWLOCK
//static DEFINE_RWLOCK(torisa);
//#else
static rwlock_t torisa = RW_LOCK_UNLOCKED;
//#endif


seems that linux core source not match the version correctly
16 years 11 months ago #288 by Jeff
I'm having the same troubles with TrixBox 2.2. The above suggestions helped, but for some reason I don't have a zaptel_base.c file - I found the offending code in files called zaptel.c and torisa.c at the same line numbers given.

Now make process goes much further than it did, but I'm getting an error:

"No rule to make target '/usr/src/zaptel/\.c'
Time to create page: 0.042 seconds
Powered by Kunena Forum