# madwifi - install failed please help

## jerrod.norton

Thanks for the help...I am trying to emerge 2 packages net-wireless/madwifi-ng-0.9.3-r2 and net-wireless/madwifi-ng-tools.

Here is the emerge info...

>>> Emerging (4 of 4) net-wireless/madwifi-ng-0.9.3-r2 to /

 * madwifi-0.9.3.tar.bz2 RMD160 ; -) ...                                                                                [ ok ]

 * madwifi-0.9.3.tar.bz2 SHA1 ; -) ...                                                                                  [ ok ]

 * madwifi-0.9.3.tar.bz2 SHA256 ; -) ...                                                                                [ ok ]

 * madwifi-0.9.3.tar.bz2 size ; -) ...                                                                                  [ ok ]

 * checking ebuild checksums ; -) ...                                                                                   [ ok ]

 * checking auxfile checksums ; -) ...                                                                                  [ ok ]

 * checking miscfile checksums ; -) ...                                                                                 [ ok ]

 * checking madwifi-0.9.3.tar.bz2 ; -) ...                                                                              [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Could not find a usable .config in the kernel source directory.

 * Please ensure that /usr/src/linux points to a configured set of Linux sources.

 * If you are using KBUILD_OUTPUT, please set the environment var so that

 * it points to the necessary object directory so that it might find .config.

!!! ERROR: net-wireless/madwifi-ng-0.9.3-r2 failed.

Call stack:

  ebuild.sh, line 1630:   Called dyn_setup

  ebuild.sh, line 702:   Called qa_call 'pkg_setup'

  ebuild.sh, line 38:   Called pkg_setup

  madwifi-ng-0.9.3-r2.ebuild, line 32:   Called linux-mod_pkg_setup

  linux-mod.eclass, line 459:   Called linux-info_pkg_setup

  linux-info.eclass, line 554:   Called die

!!! Unable to calculate Linux Kernel version

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/tmp/portage/net-wireless/madwifi-ng-0.9.3-r2/temp/build.log'.

Any help would be greatly appreciated,

Jerrod

----------

## NeddySeagoon

jerrod.norton,

Welcome to Gentoo

There is a hint here

```
* /usr/src/linux

* Could not find a usable .config in the kernel source directory. 
```

The module has found the kernel source code but the kernel has never been configured. All out of kernel modules need to compile against the actual kernel they will run with, so you must compile and install your kernel before you can make and use third party kernel modules.

----------

## jerrod.norton

Thanks...I got it installed and working

----------

## xbmodder

If its looking for version shouldn't it just do a uname -a?

----------

## NeddySeagoon

xbmodder,

All the external kernel modules follow the /usr/src/linux symlink to find the kernel to build against.

This allows you to build say, nvidia-drivers for your new kernel before you boot it and have Xorg JustWork(tm)

If ebuilds used uname, builds would always be against the running kernel.

It isn't obvious, but using make menuconfig does the make config step that used to be manual under 2.4, which produces the required files in the kernel tree to be able to build the kernel or modules.

Note that you do not need to build the kernel to build external kernel modules against it.

----------

