[asterisk-users] Can't compile DAHDI - wrong kernel source
Miguel Molina
mmolina at millenium.com.co
Thu Jul 15 10:49:48 CDT 2010
El 15/07/10 04:34, Tzafrir Cohen escribió:
> On Wed, Jul 14, 2010 at 03:28:35PM -1000, Thermal Wetland wrote:
>
>
>> I was able to download the rpm's and install them:
>>
>> [root at ip-97-74-119-59 src]# rpm -ivh
>> ovzkernel-2.6.18-128.2.1.el5.028stab064.7.i686.rpm
>> warning: ovzkernel-2.6.18-128.2.1.el5.028stab064.7.i686.rpm: Header V3
>> DSA signature: NOKEY, key ID a7a1d4b6
>> Preparing... ########################################### [100%]
>> package ovzkernel-2.6.18-128.2.1.el5.028stab064.7.i686 is
>> already installed
>>
>
>> You do not appear to have the sources for the 2.6.18-028stab064.7
>> kernel installed.
>> make[1]: *** [modules] Error 1
>> make[1]: Leaving directory
>> `/usr/src/asterisk/dahdi-linux-complete-2.3.0.1+2.3.0/linux'
>> make: *** [all] Error 2
>>
>> The directories in /usr/src/kernels is:
>> [root at ip-97-74-119-59 kernels]# ls -l
>> total 51328
>> drwxr-xr-x 20 root root 4096 Jul 14 18:04
>> 2.6.18-128.2.1.el5.028stab064.7-i686
>> drwxr-xr-x 19 root root 4096 Jul 13 20:25 2.6.18-164.11.1.el5-i686
>> drwxrwxr-x 19 root root 4096 Feb 23 2007 linux-2.6.18.8
>>
>> I tried to install the kernel from source but couldn't find the exact
>> kernel, I installed linux-2.6.18.8 as I was the closest.
>>
>> Both of the directories in /usr/src/kernels/ have the -i686 suffix, is
>> that the issue?
>>
> No.
>
> The DAHDI Makefile looks for the kernel source by default in:
>
> /lib/modules/`uname -r`/build
>
> This is normally a symlink that points to the directory with the
> (possibly partial) kernel source tree.
>
> It seems that the kernel package you have installed did not set up this
> symlink. You can create it yourself.
>
> Alternatively, set set KSRC explicitly to the (full path to) the kernel
> tree:
>
> make KSRC=/usr/src/<whatever>
>
>
That is the definitive solution, I had the same issue in an openvz VPS
and finally solved it by manually making the symlink to the kernel sources:
[root at virtual1_ast1 modules]# uname -a
Linux virtual1_ast1 2.6.18-194.3.1.el5.028stab069.6 #1 SMP Wed May 26
19:05:45 MSD 2010 i686 i686 i386 GNU/Linux
[root at virtual1_ast1 modules]# pwd
/lib/modules
[root at virtual1_ast1 modules]# ls -lh
total 8,0K
drwxr-xr-x 3 root root 4,0K jun 30 18:42 2.6.18-194.3.1.el5.028stab069.6
drwxr-xr-x 3 root root 4,0K jun 30 18:09 2.6.18-194.3.1.el5.028stab069.6ent
[root at virtual1_ast1 2.6.18-194.3.1.el5.028stab069.6]# pwd
/lib/modules/2.6.18-194.3.1.el5.028stab069.6
[root at virtual1_ast1 2.6.18-194.3.1.el5.028stab069.6]# ls -lh
total 44K
lrwxrwxrwx 1 root root 57 jun 30 18:07 build ->
/usr/src/kernels/2.6.18-194.3.1.el5.028stab069.6ent-i686/
I had to create the folder with the kernel name in /lib/modules/ and
inside it, the "build" symlink to the kernel sources, just as I saw it
on a physical server. That way it worked compiling DAHDI.
I didn't know about explicitly setting the KSRC to the kernel sources.
Thanks for the hint.
Cheers,
--
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center
More information about the asterisk-users
mailing list