keywords: ip pbx voip gateway gsm gateway

×

Notice

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

Ubuntu 11.10 + Dahdi compile problems

12 years 5 months ago #7553 by bjornmed
Hi,Built a new server based on Ubuntu 11.10 (3.0.0-12-server).

First I downloaded openvox_dahdi-linux-complete-2.4.1.2+2.4.1.tar.gz from http://downloads.openvox.cn/pub/drivers/dahdi-linux-complete/ and started the build.
This generated /usr/local/src/openvox-dahdi-linux-complete-2.4.1.2+2.4.1/linux/drivers/dahdi/dahdi_transcode.c:49:31: error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)

Tried an older (?) 2.4.0 version with another error:openvox-dahdi-linux-complete-2.4.0/linux/drivers/dahdi/dahdi-base.c:52:28:fatal error: linux/smp_lock.h: No such file or directory

I then downloaded DAHDI Complete 2.5.0.2+2.5.0.2 from asterisk.org and copied the opvxa1200 directory from the 2.4.1 above and patched the Kbuild filefor opvxa1200.
This gave the following error:/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/drivers/dahdi/opvxa1200/base.c:2459:2: error: ‘struct dahdi_span’ has no member named ‘maintq’

The 11.10 solves some other problems so I would like to get my A800P card to work.
Help!

/Björn
12 years 5 months ago #7556 by tim.june
please paste your kernel version and full error log here, not just few lines.

Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
Skype: tim.jjune
12 years 5 months ago #7560 by bjornmed
$ uname -s -r -v -m -p -i -o
Linux 3.0.0-12-server #20-Ubuntu SMP Fri Oct 7 16:36:30 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

dahdi based on "DAHDI Complete 2.5.0.2+2.5.0.2" from http://www.asterisk.org/downloads. Builds
nicely from source tree with no errors (before adding opvxa1200 target). If I
include opvxa1200 in the targets I get the error log below.

$ grep opvxa linux/drivers/dahdi/Kbuild
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OPVXA1200) += opvxa1200/


$ ls -l linux/drivers/dahdi/opvxa1200
total 96
-rw-r--r-- 1 user user 89169 2011-11-12 16:59 base.c
-rw-r--r-- 1 user user 799 2011-11-12 16:59 Kbuild
-rw-r--r-- 1 user user 182 2011-11-12 16:59 Makefile

Where /opvxa1200 is a copy from openvox_dahdi-linux-complete-2.4.1.2+2.4.1.tar.gz

$ make
make -C linux all
make[1]: Entering directory `/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory `/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/drivers/dahdi/firmware'
make[2]: Leaving directory `/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/drivers/dahdi/firmware'
make -C /lib/modules/3.0.0-12-server/build SUBDIRS=/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/drivers/dahdi DAHDI_INCLUDE=/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[2]: Entering directory `/usr/src/linux-headers-3.0.0-12-server'
CC [M] /usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/drivers/dahdi/opvxa1200/base.o
/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/drivers/dahdi/opvxa1200/base.c: In function ‘wctdm_initialize’:
/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/drivers/dahdi/opvxa1200/base.c:2459:2: error: ‘struct dahdi_span’ has no member named ‘maintq’
make[4]: *** [/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/drivers/dahdi/opvxa1200/base.o] Error 1
make[3]: *** [/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/drivers/dahdi/opvxa1200] Error 2
make[2]: *** [_module_/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux/drivers/dahdi] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.0.0-12-server'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/local/src/dahdi-linux-complete-2.5.0.2+2.5.0.2/linux'
make: *** [all] Error 2
12 years 5 months ago #7565 by svolta
Hi,
Please find "init_waitqueue_head(&wc->span.maintq);" in opvxa1200.c and delete this line!
12 years 5 months ago #7566 by Joe.Yung
Hi,
With regard to the error "error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)"
Please patch this file below:

dahdi-linux-2.4.1.2/drivers/dahdi/dahdi_transcode.c

from

static spinlock_t translock = SPIN_LOCK_UNLOCKED;

to

static DEFINE_SPINLOCK(translock);

Then recompile it again.

12 years 5 months ago #7579 by bjornmed
Hi,

Deleteing "init_waitqueue_head(&wc->span.maintq);" in opvxa1200/base.c did fix the compile error.

Thanks!

/Björn
Time to create page: 0.049 seconds
Powered by Kunena Forum