Cannot rebuild dahdi-2.5.0.1+dfsg-1ubuntu2 (dahdi-linux) because it cannot find asm/system.h

Asked by Raubvogel on 2013-07-08

I am installing Asterisk 1.8 + dahdi + wanpipe (which I will be installing manually) in ubuntu 12.04LTS. So I begin by doing

apt-get install asterisk asterisk-dahdi asterisk-dev asterisk-mysql mysql-server curl asterisk-mp3 unzip
apt-get install build-essential libncurses5-dev flex bison libtool automake autoconf

So, I decided to find out if dkms knows of dahdi (in reality, when I was compiling wanpipe, it barked about not finding dahdi):

dpkg -l |grep dahdi
ii asterisk-dahdi 1:1.8.22.0-1digium1~precise DAHDI devices support for the Asterisk PBX
ii dahdi 1:2.4.1-1ubuntu2 utilities for using the DAHDI kernel modules
ii dahdi-dkms 1:2.5.0.1+dfsg-1ubuntu2 DAHDI telephony interface (dkms kernel driver)
ii dahdi-linux 1:2.5.0.1+dfsg-1ubuntu2 DAHDI telephony interface - Linux userspace parts
ii dahdi-source 1:2.5.0.1+dfsg-1ubuntu2 DAHDI telephony interface - source code for kernel driver

dkms status
dahdi, 2.5.0.1+dfsg-1ubuntu2: added

Let's check if it is all well:

modprobe dahdi_dummy
FATAL: Module dahdi_dummy not found.

Not good, so we will try installing it manually:

DAHDI_VERSION=`dkms status | grep dahdi | head -n 1 | awk '{ print $2}' | tr -d :` && dkms build -m dahdi -v ${DAHDI_VERSION}

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....
(make modules KERNVER=3.5.0-36-generic MODULES_EXTRA='dahdi_dummy wcopenpci dah)
Error! Bad return status for module build on kernel: 3.5.0-36-generic (x86_64)
Consult /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/make.log for more infor.

In /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/make.log we find that it cannot find asm/system.h:

/opvxd115.o
  CC [M] /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/voicebus
/voicebus.o
  CC [M] /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/voicebus
/GpakCust.o
  CC [M] /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/voicebus
/GpakApi.o
  CC [M] /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/voicebus
/voicebus_net.o
  CC [M] /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/voicebus
/vpmoct.o
  LD [M] /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/voicebus
/dahdi_voicebus.o
  CC [M] /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/wcb4xxp/
base.o
/var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/wcb4xxp/base.c:38:
46: fatal error: asm/system.h: No such file or directory
compilation terminated.
make[3]: *** [/var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/wcb4
xxp/base.o] Error 1
make[2]: *** [/var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/wcb4
xxp] Error 2
make[1]: *** [_module_/var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/da
hdi] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-36-generic'
make: *** [modules] Error 2
make -C /lib/modules/3.5.0-36-generic/build SUBDIRS=/var/lib/dkms/dahdi/2.5.0.1+
dfsg-1ubuntu2/build/drivers/dahdi DAHDI_INCLUDE=/var/lib/dkms/dahdi/2.5.0.1+dfsg
-1ubuntu2/build/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAH
DI_BUILD_ALL=m
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-36-generic'
  CC [M] /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/wcb4xxp/
base.o
/var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/wcb4xxp/base.c:38:
46: fatal error: asm/system.h: No such file or directory
compilation terminated.
make[3]: *** [/var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/wcb4
xxp/base.o] Error 1
make[2]: *** [/var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/dahdi/wcb4
xxp] Error 2
make[1]: *** [_module_/var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu2/build/drivers/da
hdi] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-36-generic'
make: *** [modules] Error 2
make -C drivers/dahdi/firmware firmware-loaders

which reminds me of https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/993506 (i.e. "drop asm/system.h already!"). I have no issues compiling from source (per http://wiki.sangoma.com/wanpipe-linux-asterisk-dahdi).

Any suggestions?

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu dahdi-linux Edit question
Assignee:
No assignee Edit question
Last query:
2013-07-08
Last reply:
Raubvogel (raubvogel) said : #1

So it seems that the lin asm/system.h, as in

#include <linux/init.h>

#include <linux/kernel.h> /* printk() */
#include <linux/errno.h> /* error codes */
#include <linux/module.h>
#include <linux/types.h> /* size_t */
#include <linux/fcntl.h> /* O_ACCMODE */
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/pci.h> /* for PCI structures */
#include <linux/delay.h>
#include <asm/io.h>
#include <linux/spinlock.h>
#include <linux/device.h> /* dev_err() */
#include <linux/interrupt.h>
#include <asm/system.h> /* cli(), *_flags */ <-------------------------------------------
#include <asm/uaccess.h> /* copy_*_user */
#include <linux/workqueue.h> /* work_struct */
#include <linux/timer.h> /* timer_struct */
#include <linux/moduleparam.h>
#include <linux/proc_fs.h>

in drivers/dahdi/wcb4xxp/base.c in dahdi-linux 2.5.0.1 no longer exists in the 2.7.0. I did not check the intermediate versions.

Raubvogel (raubvogel) said : #2

Ok, they dropped it in 2.5.1.

Can you help with this problem?

Provide an answer of your own, or ask Raubvogel for more information if necessary.

To post a message you must log in.