Cannot rebuild dahdi-dkms (1:2.5.0.1+dfsg-1ubuntu3) : unknown field ‘drv_attrs’ specified in initializer .drv_attrs = xpp_attrs

Bug #1312421 reported by ano
60
This bug affects 11 people
Affects Status Importance Assigned to Milestone
dahdi-linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

root@s1:~# lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
root@s1:~#

root@s1:~# uname -a
Linux s1 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
root@s1:~#

root@s1:~# aptitude install dahdi-dkms
Les NOUVEAUX paquets suivants vont être installés :
  dahdi-dkms
0 paquets mis à jour, 1 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de télécharger 0 o/1 178 ko d'archives. Après dépaquetage, 6 6 37 ko seront utilisés.
Sélection du paquet dahdi-dkms précédemment désélectionné.
(Lecture de la base de données... 73504 fichiers et répertoires déjà installés.)
Préparation du décompactage de .../dahdi-dkms_1%3a2.5.0.1+dfsg-1ubuntu3_all.deb ...
Décompactage de dahdi-dkms (1:2.5.0.1+dfsg-1ubuntu3) ...
Paramétrage de dahdi-dkms (1:2.5.0.1+dfsg-1ubuntu3) ...
Loading new dahdi-2.5.0.1+dfsg-1ubuntu3 DKMS files...
First Installation: checking all kernels...
Building only for 3.13.0-24-generic
Building for architecture x86_64
Building initial module for 3.13.0-24-generic
Error! Bad return status for module build on kernel: 3.13.0-24-generic (x86_64)
Consult /var/lib/dkms/dahdi/2.5.0.1+dfsg-1ubuntu3/build/make.log for more information.

root@s1:~#

root@s1:~# apt-cache policy dahdi-dkms
dahdi-dkms:
  Installé : 1:2.5.0.1+dfsg-1ubuntu3
  Candidat : 1:2.5.0.1+dfsg-1ubuntu3
 Table de version :
 *** 1:2.5.0.1+dfsg-1ubuntu3 0
        500 http://fr.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
root@s1:~#

Same problem http://forum.ubuntu.ru/index.php?topic=242929.0 ?

Tags: patch
Revision history for this message
ano (f-bnxns-launchpad) wrote :
ano (f-bnxns-launchpad)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dahdi-linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Russ Dill (russ-dill) wrote :
Revision history for this message
Russ Dill (russ-dill) wrote :
Revision history for this message
Robert J. (tekkitan) wrote :

The second link to the patch for dahdi-sysfs.c does not match the code currently in the package.

Revision history for this message
ano (f-bnxns-launchpad) wrote :

In https://github.com/asterisk/dahdi-linux/commit/f5d3b3 we have a drivers/dahdi/dahdi-sysfs.c patch.
But https://launchpadlibrarian.net/173682153/make.log shows that drivers/dahdi/dahdi-sysfs.o is compiled correctly.

The error occurs when compiling drivers/dahdi/xpp/xbus-sysfs.c, so have a look at http://lists.digium.com/pipermail/dahdi-commits/2013-December/003881.html and at http://web.archiveorange.com/archive/v/hQ43p4dy2nRg6J8F8GRB ...

Revision history for this message
Gino (ginoputrino) wrote :

Hi Guys,
   I can confirm that applying Russ's first patch ( https://github.com/asterisk/dahdi-linux/commit/2e7acd2 ) to the version of dahdi in ubuntu 14.04 allows xbus-sysfs.c to compile, and so dkms now builds the dahdi module correctly.

His second patch is probably necessary for versions of dahdi later than what is in 14.04, but isn't needed for current ubuntu.

So if using ubuntu 14.04, apply the first patch to /usr/src/dahdi-2.5.0.1+dfsg-1ubuntu3/drivers dahdi

then run sudo /var/lib/dpkg/info/dahdi-dkms.postinst configure

and you should be fine.

Revision history for this message
ano (f-bnxns-launchpad) wrote :
Download full text (7.9 KiB)

Thank you Gino, it works fine :

root@s1:~# patch -p1 < patch.diff
root@s1:~# /var/lib/dpkg/info/dahdi-dkms.postinst configure
Removing old dahdi-2.5.0.1+dfsg-1ubuntu3 DKMS files...

------------------------------
Deleting module version: 2.5.0.1+dfsg-1ubuntu3
completely from the DKMS tree.
------------------------------
Done.
Loading new dahdi-2.5.0.1+dfsg-1ubuntu3 DKMS files...
First Installation: checking all kernels...
Building only for 3.13.0-27-generic
Building for architecture x86_64
Building initial module for 3.13.0-27-generic
Done.

dahdi_dummy:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

dahdi_dynamic_eth.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

dahdi_dynamic.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

dahdi_dynamic_loc.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

dahdi_echocan_jpah.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

dahdi_echocan_kb1.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

dahdi_echocan_mg2.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

dahdi_echocan_sec2.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

dahdi_echocan_sec.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

dahdi.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

dahdi_transcode.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

pciradio.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-generic/updates/dkms/

tor2.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.13.0-27-gene...

Read more...

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch for Ubuntu 14.04 /usr/src/dahdi-2.5.0.1+dfsg-1ubuntu3/drivers/dahdi/xpp/xbus-sysfs.c" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
paoletto (paoletto) wrote :

Hi, I have the same problem now (2014 07).
I tried to patch /usr/src/dahdi-2.5.0.1+dfsg-1ubuntu3/ like in post #8, but patch fails not finding the file to patch.
I also trie to modify xbus-sysfs.c y hand following the patch changes, and then it compiles but it fails to load, complaining like:

kern.log.1:Jul 22 10:46:33 testmachine kernel: [ 29.154412] dahdi: disagrees about version of symbol device_create
kern.log.1:Jul 22 10:46:33 testmachine kernel: [ 29.154417] dahdi: Unknown symbol device_create (err -22)
kern.log.1:Jul 22 10:46:33 testmachine kernel: [ 29.154454] dahdi: disagrees about version of symbol device_destroy
kern.log.1:Jul 22 10:46:33 testmachine kernel: [ 29.154456] dahdi: Unknown symbol device_destroy (err -22)
....

Can someone point me to a working solution? or even better fix the package? this is an LTS release after all.. and asterisk is used by a lot of people!

Revision history for this message
paoletto (paoletto) wrote :

I must also report that uninstalling the two packages (dahdi-linux and dahdi-dkms), downloading dahdi from asterisk website (version 2.9.something) and compiling from sources against the ubuntu kernel works, and the module seems to load fine

Revision history for this message
Thiago (thiago-natanael) wrote :

This bug is happening with me too...

I updated from 12.04 to 14.04 and dahdi not load the dahdi and wcfxo module to kernel, the solution patch posted here not work too...

To solve i needed to compile dahdi from source, make him to do kernel modules install and before, install dahdi from repo...

This work to me...

Revision history for this message
ano (f-bnxns-launchpad) wrote :

I can not understand why such a simple problem easy to fix (patch available and tested), is still not corrected.

Revision history for this message
Jared Biel (jared-biel) wrote :

+1 - the attached patch works for us and (IMO) a bug like this should be squashed from an LTS ASAP.

Revision history for this message
Gino (ginoputrino) wrote :

This is still broken in 14.10 :-(
Additionally, kernel 3.15 deprecated interruptible_sleep_on_timeout, so now in 14.10, to get dahdi to work, in addition to the above patch for xbus, pciradio.c also needs to be patched as per here:

https://github.com/pld-linux/dahdi-linux/blob/master/linux-3.15.patch

Changed in dahdi-linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
ano (f-bnxns-launchpad) wrote :

https://bugs.launchpad.net/ubuntu/+source/dahdi-linux/+bug/1336253

The same bug recently reported and treated more seriously . And nothing stated here? It's cool !

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.