[Home]

Summary:DAHLIN-00192: Errors compiling Dahdi 2.2.1.2+2.2.1.1 from source
Reporter:Warren Selby (wcselby)Labels:
Date Opened:2010-05-27 13:02:40Date Closed:2010-06-02 14:13:35
Priority:BlockerRegression?No
Status:Closed/CompleteComponents:dahdi (the module)
Versions:2.2.1 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I was at a client site to install OSLEC on his machine running
asterisk 1.6.0.22 and DAHDI 2.2.1 installed via yum.  I stopped asterisk and
DAHDI, downloaded the source of the latest version of DAHDI 2.2.1
(dahdi-linux-complete-2.2.1.2+2.2.1.1) and made the necessary changes to
compile OSLEC with DAHDI, but I ran into compilation issues that I had never
seen before.  

As a test I deleted my /usr/src/dahdi/ directory,
re-expanded my tarball (so that I had a vanilla DAHDI package), and tried to
compile it again, and I got the same errors.  I have not seen these errors
before, and I'm not sure what would cause them.  Can anyone help shed some
light on this?  I've included the make output below.

If you need any other information, please ask.

****** ADDITIONAL INFORMATION ******

The 'make' output:

dahdi]# make
make -C drivers/dahdi/firmware firmware-loaders
make[1]: Entering directory `/usr/src/dahdi/drivers/dahdi/
firmware'
make[1]: Leaving directory `/usr/src/dahdi/drivers/dahdi/firmware'
make -C /lib/modules/2.6.18-164.11.1.el5/build
SUBDIRS=/usr/src/dahdi/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi/include
DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.11.1.el5-i686'
 CC [M]  /usr/src/dahdi/drivers/dahdi/dahdi-base.o
In file included from include/linux/spinlock.h:8,
                from include/linux/capability.h:45,
                from include/linux/sched.h:44,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/config.h:6:2: warning: #warning Including config.h is
deprecated.
In file included from include/linux/spinlock.h:39,
                from include/linux/capability.h:45,
                from include/linux/sched.h:44,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/asm/spinlock.h:60: error: expected â)â before â*â token
include/asm/spinlock.h:71: error: expected â)â before â*â token
include/asm/spinlock.h:77: error: expected â)â before â*â token
include/asm/spinlock.h:115: error: expected â)â before â*â token
include/asm/spinlock.h:162: error: expected â)â before â*â token
include/asm/spinlock.h:167: error: expected â)â before â*â token
include/asm/spinlock.h:172: error: expected â)â before â*â token
include/asm/spinlock.h:182: error: expected â)â before â*â token
include/asm/spinlock.h:191: error: expected â)â before â*â token
include/asm/spinlock.h:196: error: expected â)â before â*â token
In file included from include/linux/capability.h:45,
                from include/linux/sched.h:44,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/spinlock.h:43: error: expected â)â before â*â token
include/linux/spinlock.h:44: error: expected â)â before â*â token
include/linux/spinlock.h:45: error: expected â)â before â*â token
include/linux/spinlock.h:46: error: expected â)â before â*â token
include/linux/spinlock.h:47: error: expected â)â before â*â token
include/linux/spinlock.h:48: error: expected â)â before â*â token
include/linux/spinlock.h:49: error: expected â)â before â*â token
include/linux/spinlock.h:50: error: expected â)â before â*â token
include/linux/spinlock.h:51: error: expected â)â before â*â token
include/linux/spinlock.h:52: error: expected â)â before â*â token
include/linux/spinlock.h:53: error: expected â)â before â*â token
include/linux/spinlock.h:54: error: expected â)â before â*â token
include/linux/spinlock.h:55: error: expected â)â before â*â token
include/linux/spinlock.h:56: error: expected â)â before â*â token
include/linux/spinlock.h:57: error: expected â)â before â*â token
include/linux/spinlock.h:58: error: expected â)â before â*â token
include/linux/spinlock.h:59: error: expected â)â before â*â token
include/linux/spinlock.h:60: error: expected â)â before â*â token
include/linux/spinlock.h:61: error: expected â)â before â*â token
include/linux/spinlock.h:62: error: expected â)â before â*â token
include/linux/spinlock.h:63: error: expected â)â before â*â token
include/linux/spinlock.h:64: error: expected â)â before â*â token
include/linux/spinlock.h:65: error: expected â)â before â*â token
include/linux/spinlock.h:66: error: expected â)â before â*â token
include/linux/spinlock.h:67: error: expected â)â before â*â token
include/linux/spinlock.h:68: error: expected â)â before â*â token
include/linux/spinlock.h:69: error: expected â)â before â*â token
include/linux/spinlock.h:70: error: expected â)â before â*â token
include/linux/spinlock.h:477: error: expected declaration specifiers or
â...â before âspinlock_tâ
In file included from include/linux/time.h:7,
                from include/linux/timex.h:57,
                from include/linux/sched.h:48,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/seqlock.h:34: error: expected specifier-qualifier-list before
âspinlock_tâ
include/linux/seqlock.h: In function âwrite_seqlockâ:
include/linux/seqlock.h:62: error: implicit declaration of function
â_spin_lockâ
include/linux/seqlock.h:62: error: âseqlock_tâ has no member named âlockâ
include/linux/seqlock.h: In function âwrite_sequnlockâ:
include/linux/seqlock.h:71: error: implicit declaration of function
â_spin_unlockâ
include/linux/seqlock.h:71: error: âseqlock_tâ has no member named âlockâ
include/linux/seqlock.h: In function âwrite_tryseqlockâ:
include/linux/seqlock.h:76: error: implicit declaration of function
â_spin_trylockâ
include/linux/seqlock.h:76: error: âseqlock_tâ has no member named âlockâ
In file included from include/asm/semaphore.h:41,
                from include/linux/sched.h:57,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/wait.h: At top level:
include/linux/wait.h:51: error: expected specifier-qualifier-list before
âspinlock_tâ
include/linux/wait.h: In function âwaitqueue_activeâ:
include/linux/wait.h:108: error: âwait_queue_head_tâ has no member named
âtask_listâ
include/linux/wait.h: In function â__add_wait_queueâ:
include/linux/wait.h:126: error: âwait_queue_head_tâ has no member named
âtask_listâ
include/linux/wait.h: In function â__add_wait_queue_tailâ:
include/linux/wait.h:135: error: âwait_queue_head_tâ has no member named
âtask_listâ
In file included from include/linux/rwsem.h:24,
                from include/asm/semaphore.h:42,
                from include/linux/sched.h:57,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/asm/rwsem.h: At top level:
include/asm/rwsem.h:63: error: expected specifier-qualifier-list before
âspinlock_tâ
In file included from include/linux/sem.h:4,
                from include/linux/sched.h:64,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/ipc.h:59: error: expected specifier-qualifier-list before
âspinlock_tâ
In file included from include/linux/sched.h:64,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/sem.h:133: error: expected specifier-qualifier-list before
âspinlock_tâ
In file included from include/linux/sched.h:67,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/fs_struct.h:9: error: expected specifier-qualifier-list before
ârwlock_tâ
In file included from include/linux/gfp.h:4,
                from include/linux/slab.h:14,
                from include/linux/percpu.h:4,
                from include/linux/rcupdate.h:41,
                from include/linux/pid.h:4,
                from include/linux/sched.h:71,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/mmzone.h:166: error: expected specifier-qualifier-list before
âspinlock_tâ
In file included from include/linux/mutex.h:14,
                from include/linux/notifier.h:13,
                from include/linux/memory_hotplug.h:7,
                from include/linux/mmzone.h:339,
                from include/linux/gfp.h:4,
                from include/linux/slab.h:14,
                from include/linux/percpu.h:4,
                from include/linux/rcupdate.h:41,
                from include/linux/pid.h:4,
                from include/linux/sched.h:71,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/spinlock_types.h:91:1: warning: "DEFINE_SPINLOCK" redefined
In file included from include/linux/capability.h:45,
                from include/linux/sched.h:44,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/spinlock.h:406:1: warning: this is the location of the
previous definition
In file included from include/linux/mutex.h:14,
                from include/linux/notifier.h:13,
                from include/linux/memory_hotplug.h:7,
                from include/linux/mmzone.h:339,
                from include/linux/gfp.h:4,
                from include/linux/slab.h:14,
                from include/linux/percpu.h:4,
                from include/linux/rcupdate.h:41,
                from include/linux/pid.h:4,
                from include/linux/sched.h:71,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/spinlock_types.h:92:1: warning: "DEFINE_RWLOCK" redefined
In file included from include/linux/capability.h:45,
                from include/linux/sched.h:44,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/spinlock.h:407:1: warning: this is the location of the
previous definition
In file included from include/linux/gfp.h:4,
                from include/linux/slab.h:14,
                from include/linux/percpu.h:4,
                from include/linux/rcupdate.h:41,
                from include/linux/pid.h:4,
                from include/linux/sched.h:71,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/mmzone.h: In function âpopulated_zoneâ:
include/linux/mmzone.h:374: error: âstruct zoneâ has no member named
âpresent_pagesâ
include/linux/mmzone.h: In function âis_highmemâ:
include/linux/mmzone.h:395: error: âstruct zoneâ has no member named
âzone_pgdatâ
include/linux/mmzone.h: In function âis_normalâ:
include/linux/mmzone.h:400: error: âstruct zoneâ has no member named
âzone_pgdatâ
include/linux/mmzone.h: In function âis_dma32â:
include/linux/mmzone.h:405: error: âstruct zoneâ has no member named
âzone_pgdatâ
include/linux/mmzone.h: In function âis_dmaâ:
include/linux/mmzone.h:410: error: âstruct zoneâ has no member named
âzone_pgdatâ
In file included from include/linux/slab.h:14,
                from include/linux/percpu.h:4,
                from include/linux/rcupdate.h:41,
                from include/linux/pid.h:4,
                from include/linux/sched.h:71,
                from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/gfp.h: In function âalloc_pages_thisnodeâ:
include/linux/gfp.h:134: error: âstruct zoneâ has no member named
âzone_pgdatâ
include/linux/gfp.h:143: error: âstruct zoneâ has no member named
âzone_pgdatâ
In file included from include/linux/module.h:9,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:40:
include/linux/sched.h: In function âdequeue_signal_lockâ:
include/linux/sched.h:1326: error: implicit declaration of function
â_spin_lock_irqsaveâ
include/linux/sched.h:1328: error: implicit declaration of function
â_spin_unlock_irqrestoreâ
In file included from include/asm/pci.h:32,
                from include/linux/pci.h:804,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:42:
include/linux/mm.h: In function âpage_to_nidâ:
include/linux/mm.h:534: error: âstruct zoneâ has no member named
âzone_pgdatâ
In file included from include/linux/mm.h:568,
                from include/asm/pci.h:32,
                from include/linux/pci.h:804,
                from /usr/src/dahdi/drivers/dahdi/dahdi-base.c:42:
include/linux/vmstat.h: In function âzone_page_state_addâ:
include/linux/vmstat.h:89: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h: In function âzone_page_stateâ:
include/linux/vmstat.h:106: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h: In function âzap_zone_vm_statsâ:
include/linux/vmstat.h:157: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h:157: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h:157: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h:157: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h:157: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h:157: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h:157: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h:157: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h:157: error: âstruct zoneâ has no member named
âvm_statâ
include/linux/vmstat.h:157: error: âstruct zoneâ has no member named
âvm_statâ
/usr/src/dahdi/drivers/dahdi/dahdi-base.c: In function
âdahdi_register_echocan_factoryâ:
/usr/src/dahdi/drivers/dahdi/dahdi-base.c:406: error: implicit declaration
of function â_write_lockâ
/usr/src/dahdi/drivers/dahdi/dahdi-base.c:411: error: implicit declaration
of function â_write_unlockâ
/usr/src/dahdi/drivers/dahdi/dahdi-base.c: In function âfind_echocanâ:
/usr/src/dahdi/drivers/dahdi/dahdi-base.c:1129: error: implicit declaration
of function â_read_lockâ
/usr/src/dahdi/drivers/dahdi/dahdi-base.c:1134: error: implicit declaration
of function â_read_unlockâ
/usr/src/dahdi/drivers/dahdi/dahdi-base.c: In function âdahdi_chan_regâ:
/usr/src/dahdi/drivers/dahdi/dahdi-base.c:1496: error: implicit declaration
of function âspin_lock_initâ
/usr/src/dahdi/drivers/dahdi/dahdi-base.c:1506: error: implicit declaration
of function â_write_lock_irqsaveâ
/usr/src/dahdi/drivers/dahdi/dahdi-base.c:1515: error: implicit declaration
of function â_write_unlock_irqrestoreâ
make[2]: *** [/usr/src/dahdi/drivers/dahdi/dahdi-base.o] Error 1
make[1]: *** [_module_/usr/src/dahdi/drivers/dahdi] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.11.1.el5-i686'
make: *** [modules] Error 2
Comments:By: Michael Spiceland (mspiceland) 2010-05-28 11:09:20

Do you get this same compilation issue with the fresh checkout before making the OSLEC changes?

What distribution of Linux are you using?

By: Warren Selby (wcselby) 2010-05-28 12:02:01

Yes, the same issue occured with the vanilla checkout, without any changes.  I even downloaded DAHDI 2.3.0.1+2.3.0 and tried that, with the same results (wouldn't compile past dahdi-base.o).

Running CentOS 5.4.  I recreated the system in a Sun VirtualBox (as best I could...), and DAHDI compiled through the make properly.

Any other information that might be pertinent:

This system has a Digium TDM410E board, with 4 FXO ports in it.  I don't know if that makes a difference, I'm not even getting to the point where I'd be configuring that.  I can't get past 'make' in the DAHDI source.  The TDM410E works fine with the DAHDI installed via yum (2.2.1).

This is the DAHDI stuff currently installed via yum:

]# yum list installed | grep dahdi
asterisk16-dahdi.i386              1.6.0.22-2_trixbox                  installed
dahdi-firmware.noarch              2.0.0-1_centos5                     installed
dahdi-firmware-oct6114-064.noarch  1.05.01-1_centos5                   installed
dahdi-firmware-oct6114-128.noarch  1.05.01-1_centos5                   installed
dahdi-firmware-tc400m.noarch       MR6.12-1_centos5                    installed
dahdi-firmware-vpmadt032.noarch    1.07-1_centos5                      installed
dahdi-linux.i386                   2.2.1-1_trixbox                     installed
dahdi-tools.i386                   2.2.1-2_trixbox                     installed
dahdi-tools-doc.i386               2.2.0-4_trixbox                     installed
kmod-dahdi-linux.i686              2.2.0-4_trixbox.2.6.18_128.1.10.el5 installed
kmod-dahdi-linux.i686              2.2.1-1_trixbox.2.6.18_164.11.1.el5 installed

The output of uname -a:
# uname -a
Linux xxxxxx.xxxxx.xxx 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:39:04 EST 2010 i686 athlon i386 GNU/Linux


Let me know if there's anything else I can provide...

By: Shaun Ruffell (sruffell) 2010-06-01 12:08:19

I suspect a problem with the actual download.  Could you verify the md5sum of dahdi-base.c for 2.2.1.2 matches what I have below?

[2.2.1.2+2.2.1.1]$ md5sum linux/drivers/dahdi/dahdi-base.c
6c3808fcc0c3538b2de85e416e4a15cc  linux/drivers/dahdi/dahdi-base.c
[2.2.1.2+2.2.1.1]$

By: Warren Selby (wcselby) 2010-06-02 12:00:00

Same md5sum....

]# md5sum drivers/dahdi/dahdi-base.c
6c3808fcc0c3538b2de85e416e4a15cc  drivers/dahdi/dahdi-base.c

By: Shaun Ruffell (sruffell) 2010-06-02 12:23:53

Hmm...then something still looks odd with the kernel headers on that machine.

Are you able to compile any version of dahdi on this system?  If not, could you 'yum remove kernel-devel' and 'yum install kernel-devel' to reinstall the headers and try to compile dahdi again?

By: Shaun Ruffell (sruffell) 2010-06-02 12:39:15

Also, I checked against the exact kernel version you're using, and I'm able to build fine here:

make -C drivers/dahdi/firmware firmware-loaders
make[1]: Entering directory `/home/sruffell/dahdi-linux/drivers/dahdi/firmware'
make[1]: Leaving directory `/home/sruffell/dahdi-linux/drivers/dahdi/firmware'
make -C /usr/src/kernels/2.6.18-164.11.1.el5-i686 SUBDIRS=/home/sruffell/dahdi-linux/drivers/dahdi DAHDI_INCLUDE=/home/sruffell/dahdi-linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.11.1.el5-i686'
 CC [M]  /home/sruffell/dahdi-linux/drivers/dahdi/dahdi-base.o
 CC [M]  /home/sruffell/dahdi-linux/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.o

By: Warren Selby (wcselby) 2010-06-02 14:11:16

Uninstalling the kernel-devel package and reinstalling it following sruffell's steps above (https://issues.asterisk.org/view.php?id=17411#122806) seem to have resolved the issue.  After I did that I was able to successfully compile DAHDI.

I ran make clean, made the appropriate changes to DAHDI to enable OSLEC, and recompiled again, and it compiled just fine.

Thanks for your help!

By: Shaun Ruffell (sruffell) 2010-06-02 14:13:35

Thanks for the update.