LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-27-2018, 08:52 PM   #1
boozah
LQ Newbie
 
Registered: Nov 2006
Posts: 18

Rep: Reputation: 0
Unhappy DAHDI 'make' fails because required kernel sources are not found


I'm trying to get Asterisk to build and having big problems.

I'm pretty rusty at using Linux, so I've probably made some mistakes...
(Several years ago, I built ffmpeg "from scratch" and had to install lots of modules on a dedicated server before it would build. I got it built, running, and doing some pretty great things for audio and video podcasts. So...I have some related experience, just not recently.)

I'm working on a VirtualMachine on a server hosted elsewhere.

Operating System: CentOS 7

Initially, the VM was running the 3.10.0-862.3.2.el7.x86_64 kernel

First, I did sudo bash to become root. I did that before installing a lot of other modules on this Virtual Machine...

Pretty much everything is owned by root.

Following these instructions: https://wiki.asterisk.org/wiki/displ...stalling+DAHDI

I've downloaded dahdi-linux-complete-current.tar.gz, libpri-current.tar.gz, and asterisk-14-current.tar.gz into /usr/src

I've run:
tar -zxvf libpri-current.tar.gz
tar -zxvf dahdi-linux-complete-2.X.Y+2.X.Y.tar.gz
tar -zxvf asterisk-14-current.tar.gz

So, I have the source-code folders for the builds.

Now I need to build and install DAHDI (can't install libpri without it because of dependencies)

So...
cd /usr/src/dahdi-linux-complete-2.11.1+2.11.1
make
Fails with this:
You do not appear to have the sources for the 4.16.11-1.el7.elrepo.x86_64 kernel installed.

Previously, I had been running the 3.10.0-862.3.2.el7.x86_64 kernel and had gotten the error
You do not appear to have the sources for the 3.10.0-862.3.2.el7.x86_64 kernel installed.

So I tried installing the latest (as of that day) kernel, which was 4.16.11-1.el7.elrepo.x86_64, in the (false?) hope that it would put the source files in /usr/src/kernels. It didn't. But after a reboot, it's running the newer kernel.

Currently,

uname -r gives me:
4.16.11-1.el7.elrepo.x86_64

uname -a gives me:
Linux ip-192-168-100-8.us-east-2.compute.internal 4.16.11-1.el7.elrepo.x86_64 #1 SMP Tue May 22 15:34:16 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux

In /usr/src/kernels, ls gives me:
3.10.0-862.3.2.el7.x86_64

That looks to me like source code for the 3.10.0-862.3.2.el7.x86_64 kernel. (Is that correct?)

Doing "ls -l" in /usr/libs/modules gives me:
drwxr-xr-x 7 root root 4096 Jan 4 15:31 3.10.0-693.11.6.el7.x86_64
drwxr-xr-x. 7 root root 4096 Nov 27 22:12 3.10.0-693.5.2.el7.x86_64
drwxr-xr-x 7 root root 4096 May 24 19:52 3.10.0-862.3.2.el7.x86_64
drwxr-xr-x 7 root root 4096 May 25 20:32 4.16.11-1.el7.elrepo.x86_64
drwxr-xr-x 7 root root 4096 May 27 17:35 4.16.12-1.el7.elrepo.x86_64

I think that that means all four of those kernels have been built. Is that true?

Hindsight being oh-so-useful, I decided to add /usr/src/kernels to the PATH
echo $PATH reports:
/root/perl5/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/src/kernels

The problem is still that I don't have the kernel sources for 4.16.11-1.el7.elrepo.x86_64 anywhere that the make utility can find them when attempting to build DAHDI.

I've Googled for hours looking for a solution to the missing-sources problem and come up empty. Oh, sure, there were plenty of suggested fixes. I've tried them all without success.

Is it possible to change back to running the 3.10.0-862.3.2.el7.x86_64 kernel so that it would match up with the sources in /usr/src/kernels?

Or is there a way to copy the 4.16.11-1.el7.elrepo.x86_64 from SOMEWHERE into /usr/src/kernels?

Getting DADHDI to build is the 1st hurdle. Hopefully, once that's done the rest will be more straightforward. I ultimately need Asterisk installed and working so that we can build and run VICIdial.

This quote from http://asteriskfaqs.org seems to sum up the problem: "You need to make sure the kernel and kernel-devel packages are the same versions, and that you are running from the same kernel too (make sure you rebooted after any update of the kernel)."

Any help would be greatly appreciated.
 
Old 05-29-2018, 01:15 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,918

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
so it was written, kernel source mean you need to install kernel-devel package (the same version as your kernel itself)
 
Old 05-31-2018, 09:14 AM   #3
boozah
LQ Newbie
 
Registered: Nov 2006
Posts: 18

Original Poster
Rep: Reputation: 0
I'm not sure why it worked the 3rd time and not the 1st or 2nd time, but...

Setting the kernel for which I had sources installed to be the default running kernel (again) and rebooting the system (again) finally worked.

DAHDI is now built and installed.
 
Old 05-31-2018, 01:42 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,918

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
so if your problem is solved please mark the thread solved.
 
Old 06-01-2018, 08:57 AM   #5
boozah
LQ Newbie
 
Registered: Nov 2006
Posts: 18

Original Poster
Rep: Reputation: 0
One problem remains. The DAHDA module refuses to start!
 
Old 06-01-2018, 09:14 AM   #6
boozah
LQ Newbie
 
Registered: Nov 2006
Posts: 18

Original Poster
Rep: Reputation: 0
According to: https://wiki.asterisk.org/wiki/displ...r+Installation, I should be able to start dahdi like this:

service dahdi start (Redhat/Centos version)

but the result of that command is:

Redirecting to /bin/systemctl start dahdi.service
Failed to start dahdi.service: Unit not found.

Likewise for:
systemctl start dahdi.service
Failed to start dahdi.service: Unit not found.

Not surprisingly,

lsmod | grep dahdi

returns nothing at all.
 
Old 06-01-2018, 10:22 AM   #7
boozah
LQ Newbie
 
Registered: Nov 2006
Posts: 18

Original Poster
Rep: Reputation: 0
Solved (I hope):

Whew! Figured out that somehow(??), /etc/init.d/dahdi was created as an empty folder. It should have been a file containing a shell script. So, I removed the empty /etc/init.d/dahdi directory. Then I fetched the contents of that shell script, created a new file using nano, inserted the code and saved it as /etc/init.d/dahdi.

I had to:

chmod 755 dahdi

so it could execute and now the start command works...sort of.

systemctl status dahdi.service -> gives this output:
● dahdi.service - LSB: DAHDI kernel modules
Loaded: loaded (/etc/rc.d/init.d/dahdi; bad; vendor preset: disabled)
Active: active (exited) since Fri 2018-06-01 14:41:07 UTC; 10min ago
Docs: man:systemd-sysv-generator(8)
Process: 29345 ExecStart=/etc/rc.d/init.d/dahdi start (code=exited, status=0/SUCCESS)

systemctl status dahdi.service gives:
Loaded: loaded (/etc/rc.d/init.d/dahdi; bad; vendor preset: disabled)
Active: active (exited) since Fri 2018-06-01 14:41:07 UTC; 24min ago
Docs: man:systemd-sysv-generator(8)

Jun 01 14:41:07 ip-192-168-100-8.us-east-2.compute.internal systemd[1]: Starting LSB: DAHDI kernel modules...
Jun 01 14:41:07 ip-192-168-100-8.us-east-2.compute.internal dahdi[29345]: /etc/dahdi/system.conf not found. Nothing to do.
Jun 01 14:41:07 ip-192-168-100-8.us-east-2.compute.internal systemd[1]: Started LSB: DAHDI kernel modules.

Looks like I need to work on /etc/rc.d/init.d/dahdi and some configuration file(s)
 
Old 06-01-2018, 02:08 PM   #8
boozah
LQ Newbie
 
Registered: Nov 2006
Posts: 18

Original Poster
Rep: Reputation: 0
Can someone tell me what these lines mean:

Loaded: loaded (/etc/rc.d/init.d/dahdi; bad; vendor preset: disabled)
Active: active (exited) since Fri 2018-06-01 15:58:59 UTC; 1h 49min ago

My guess is that dahd started and then something went wrong. I just don't know what or why.
 
Old 06-02-2018, 12:46 PM   #9
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
There are some other messages below those, Please post them inside [code] tags.
 
Old 06-03-2018, 09:43 AM   #10
boozah
LQ Newbie
 
Registered: Nov 2006
Posts: 18

Original Poster
Rep: Reputation: 0
To: Awesome Machine -- If I'm understanding you right, here's what you asked for. (CentOS 7.5 system)
Command:
# systemctl status dahdi.service
Response:
● dahdi.service - LSB: DAHDI kernel modules
Loaded: loaded (/etc/rc.d/init.d/dahdi; bad; vendor preset: disabled)
Active: active (exited) since Sat 2018-06-02 12:05:51 EDT; 22h ago
Code:
     Docs: man:systemd-sysv-generator(8)
  Process: 27192 ExecStart=/etc/rc.d/init.d/dahdi start (code=exited, status=0/SUCCESS)

Jun 02 12:05:51 ip-192-168-100-8.us-east-2.compute.internal dahdi[27192]: wcaxx:  [  OK  ]
Jun 02 12:05:51 ip-192-168-100-8.us-east-2.compute.internal dahdi[27192]: wcfxo:  [  OK  ]
Jun 02 12:05:51 ip-192-168-100-8.us-east-2.compute.internal dahdi[27192]: wctdm:  [  OK  ]
Jun 02 12:05:51 ip-192-168-100-8.us-east-2.compute.internal dahdi[27192]: wcb4xxp:  [  OK  ]
Jun 02 12:05:51 ip-192-168-100-8.us-east-2.compute.internal dahdi[27192]: wctc4xxp:  [  OK  ]
Jun 02 12:05:51 ip-192-168-100-8.us-east-2.compute.internal dahdi[27192]: xpp_usb:  [  OK  ]
Jun 02 12:05:51 ip-192-168-100-8.us-east-2.compute.internal dahdi[27192]: /usr/share/dahdi/waitfor_xpds: line 106: astribank_is_starting: command not found
Jun 02 12:05:51 ip-192-168-100-8.us-east-2.compute.internal dahdi[27192]: using '/etc/dahdi/assigned-spans.conf'
Jun 02 12:05:51 ip-192-168-100-8.us-east-2.compute.internal dahdi[27192]: Running dahdi_cfg:  [  OK  ]
Jun 02 12:05:51 ip-192-168-100-8.us-east-2.compute.internal systemd[1]: Started LSB: DAHDI kernel modules.
 
Old 06-04-2018, 02:41 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,918

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
there is an error-like message in it: /usr/share/dahdi/waitfor_xpds: line 106: astribank_is_starting: command not found
probably that's why it has exited.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Adding package sources fails saying "http://http not found skykooler Ubuntu 2 07-02-2010 09:32 AM
libcairo.la not found make errors in several sources dive Slackware 6 10-14-2008 06:24 PM
What exactly do "make oldconfig && make prepare" when issued in the kernel sources? tramni1980 Slackware 10 05-21-2008 08:04 PM
Kernel compile fails with make-kpkg, not with make cspos Debian 37 11-09-2005 09:11 AM
Kernel Sources required for NFTS support darkblane Linux - Newbie 4 02-15-2005 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration