Error Compiling Dahdi For Recent Kernels

Home » Asterisk Users » Error Compiling Dahdi For Recent Kernels
Asterisk Users 6 Comments

Seems like I post about this about once a year, when it’s time to upgrade Fedora.

I first got this error trying to compile a patched version of dahdi-linux-2.11.1; I noticed that there is now a dahdi-linux-complete-3.0.0+3.0.0, so I tried that one with the same result.

If I compile it while running kernel-4.16.8-300.fc28.x86_64, it compiles fine, but when I try to compile it while running kernel-5.0.16-100.fc28.x86_64, I get this error:

CC [M]
/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.o
/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.c:
In function ‘Oct6100UserGetTime’:
/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.c:38:2:
error: implicit declaration of function ‘do_gettimeofday’; did you mean
‘do_settimeofday64’? [-Werror=implicit-function-declaration]
do_gettimeofday(&tv);
^~~~~~~~~~~~~~~
do_settimeofday64
cc1: some warnings being treated as errors make[4]: *** [scripts/Makefile.build:277:
/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.o]
Error 1
make[3]: *** [scripts/Makefile.build:492:
/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x]
Error 2
make[2]: *** [Makefile:1581:
_module_/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi]
Error 2
make[2]: Leaving directory ‘/usr/src/kernels/5.0.16-100.fc28.x86_64’
make[1]: *** [Makefile:74: modules] Error 2
make[1]: Leaving directory
‘/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux’
make: *** [Makefile:9: all] Error 2

At first I thought this might be due to using a newer version of gcc that was being stricter about turning warnings into errors, but it compiles fine with the older kernel. So I tried some stupid stuff like calling do_gettimeofday64() instead; same error. I also tried the suggestion of using settimeofday64() instead; different error (argument type mismatch, but even if it had compiled, I wouldn’t have expected that code to actually work). Also tried explicitly declaring “void do_gettimeofday()” (since the return value isn’t being used); different error.

I expect this isn’t a hard thing to fix, but it has been many years since I’ve done any C programming and I am quite rusty.

Anyone else run into this, and have a fix?

Thanks,
–Greg

6 thoughts on - Error Compiling Dahdi For Recent Kernels

  • Howdy,

    There’s a dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1.tar.gz.

    Try that.

  • I noticed that was there, but I didn’t try it originally because it’s obviously a beta version. However, I did download it and try it. It does compile, but doesn’t work correctly. For one thing, it thinks my Digium card is an Ethernet controller:

    # lspci | grep Digium
    07:01.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog card (rev 11)

    Attempting to start the dahdi service results in:

    Short version:Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: using
    ‘/etc/dahdi/assigned-spans.conf’
    Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: DAHDI_CHANCONFIG failed on channel 1: Invalid argument (22)
    Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: Selected signaling not supported Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: Possible causes:
    Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: FXO signaling is being used on a FXO interface (use a FXS signaling variant)
    Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: RBS signaling is being used on a E1 CCS span Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: Signaling is being assigned to channel 16 of an E1 CAS span Jun 06 13:11:38 worldsys.gregandeva.net systemd[1]: dahdi.service: Main process exited, code=exited, status=1/FAILURE
    Jun 06 13:11:38 worldsys.gregandeva.net systemd[1]: dahdi.service: Failed with result ‘exit-code’. Jun 06 13:11:38 worldsys.gregandeva.net systemd[1]: Failed to start The DAHDI drivers allow you to use your linux computer to accept incoming data and voice interfaces.

    (The assigned-spans.conf file has nothing in it but comments)

    Long version:
    Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 1:
    Invalid argument Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 1: Invalid argument Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
    ‘1’
    Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel ‘1’ failure ignored: ignore_failed_channels. Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 2:
    Invalid argument Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 2: Invalid argument Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
    ‘2’
    Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel ‘2’ failure ignored: ignore_failed_channels. Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 3:
    Invalid argument Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 3: Invalid argument Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
    ‘3’
    Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel ‘3’ failure ignored: ignore_failed_channels. Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 4:
    Invalid argument Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 4: Invalid argument Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
    ‘4’
    Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel ‘4’ failure ignored: ignore_failed_channels. Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to
    ‘userbase’ (on reload) at line 23. Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to
    ‘vmsecret’ (on reload) at line 31. Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to
    ‘hassip’ (on reload) at line 35. Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to
    ‘hasiax’ (on reload) at line 39. Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:42]
    WARNING[1333]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to
    ‘hasmanager’ (on reload) at line 47. Jun 06 13:11:43 worldsys.gregandeva.net asterisk[1333]: [Jun 6 13:11:43]
    ERROR[1333]: codec_dahdi.c:813 find_transcoders: Failed to open
    /dev/dahdi/transcode: No such file or directory

    It basically looks like the dahdi service is not finding the hardware.

    # lsmod | grep -i wctdm24xxp wctdm24xxp 122880 0
    dahdi_voicebus 73728 1 wctdm24xxp dahdi 241664 2 wctdm24xxp,dahdi_voicebus

    So it looks like the modules get loaded, but don’t actually work.

    –Greg

  • Doesn’t DAHDI 3.0 remove support for a bunch of older cards, including the TDM400 and 410?

    John Novack

    Greg Woods wrote:

  • If it does, they have a funny way of implementing it, since the proper modules are still being loaded.

    This is a $600+ card, which is about 2/3 of the price of an entire PC built from parts, and I really don’t want to have to buy a new telephony card. If this is true, then I’ll have to go back to finding a way to make 2.11.1
    work.

    –Greg

  • Howdy,

    That is correct.

    The list of supported cards is in the README file (not the -complete package README, but the dahdi-linux README)

    Cheers

  • Too bad.

    LOTS of users will still want to continue to use these cards, example the OP!

    Good news it probably suppresses prices on used cards!

    John Novack

    Malcolm Davenport wrote: