# Problem emerging ndiswrapper [solved]

## poosnarky

Hello all, I have some issues emerging ndiswrapper:

```
 * Checking for suitable kernel configuration options:

 *   CONFIG_NET_RADIO:   is not set when it should be.

 * Please check to make sure these options are set correctly.

 * Failure to do so may cause unexpected problems.

 * Once you have satisfied these options, please try merging

 * this package again.

!!! ERROR: net-wireless/ndiswrapper-1.2 failed.

```

if anyone knows how to fix this, I have wireless compiled in (or modularly) with my kernel.

ThanksLast edited by poosnarky on Sat Nov 26, 2005 2:15 am; edited 1 time in total

----------

## sonicbhoc

use NDISWrapper 1.5 (ACCEPT_KEYWORDS="~x86" emerge ndiswrapper)

----------

## poosnarky

same issue

```
* Checking for suitable kernel configuration options:

 *   CONFIG_NET_RADIO:   is not set when it should be.

 * Please check to make sure these options are set correctly.

 * Failure to do so may cause unexpected problems.

 * Once you have satisfied these options, please try merging

 * this package again.

!!! ERROR: net-wireless/ndiswrapper-1.5 failed.

```

**edit further information on the topic

a manual compile of ndiswrapper-1.5 compiles, but will not modprobe

```
moebius ndiswrapper-1.5 # modprobe ndiswrapper

FATAL: Error inserting ndiswrapper (/lib/modules/2.6.14-gentoo-r2/misc/ndiswrapper.ko): Unknown symbol in module, or unknown parameter (see dmesg)

```

and the dmesg:

```

ndiswrapper: Unknown symbol wireless_send_event

```

----------

## r.stiltskin

You have to rebuild your kernel.

$ cd usr/src/linux

$ make menuconfig

Scroll down to

Device Drivers ---> (select)

Scroll down to

Network device support ---> (select)

Now you should see:

 [*] Network device support

 <M> Dummy net driver support

Scroll down to

Wireless LAN (non-hamradio) ---> (select)

 [*] Wireless LAN drivers (non-hamradio) & Wireless Extensions (this is the one you missed; star it)

exit exit exit back to the main configuration menu

While you're at it, you might want to scroll back up to

Loadable module support ---> (select)

[*] Enable loadable module support (I assume you already have this selected)

[*] Module unloading (If this is not already starred, you can star it to enable UNloading ndiswrapper [modprobe -r ndiswrapper] if you want to.)

Now exit, select yes to save the new configuration, and follow the rest of the steps for building the kernel...make && make modules_install, save the new kernel image and .config in /boot.

PS There was probably no need to install the testing-sources ndiswrapper (1.5), so now you might want to uninstall ndiswrapper 1.5 & go back to 1.2.

----------

## poosnarky

cool so ndiswrapper started emerging, but i got the following error

```

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] net-wireless/ndiswrapper-1.2  -debug 0 kB 

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No] y

>>> emerge (1 of 1) net-wireless/ndiswrapper-1.2 to /[code]

>>> md5 files   ;-) ndiswrapper-1.5.ebuild

>>> md5 files   ;-) ndiswrapper-1.2.ebuild

>>> md5 files   ;-) files/digest-ndiswrapper-1.2

>>> md5 files   ;-) files/digest-ndiswrapper-1.5

>>> md5 files   ;-) files/ndiswrapper-1.2-suspend2.patch

>>> md5 src_uri ;-) ndiswrapper-1.2.tar.gz

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found sources for kernel version:[/code]

 *     2.6.14-gentoo-r2

 * Checking for suitable kernel configuration options:

>>> Unpacking source...

>>> Unpacking ndiswrapper-1.2.tar.gz to /var/tmp/portage/ndiswrapper-1.2/work

 * Applying ndiswrapper-1.2-suspend2.patch ...                            [ ok ]

 * The only kernels that will work are gentoo-sources, vanilla-sources, and susp

end2-sources.

 * No other kernels are supported. Kernels like the mm kernels will NOT work.

 * Converting ndiswrapper-1.2/driver/Makefile to use M= instead of SUBDI  [ ok ]

>>> Source unpacked.

cc -Wall -g -DNDISWRAPPER_VERSION=\"1.2\"    -c -o loadndisdriver.o loadndisdriv

er.c

gcc -o loadndisdriver loadndisdriver.o

 * Preparing ndiswrapper module

make -C //usr/src/linux M=/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/

driver \

        NDISWRAPPER_VERSION=1.2 \

        EXTRA_VERSION= modules

*** WARNING: Kernel seems to have 4K size stack option (CONFIG_4KSTACKS) removed

; many Windows drivers will need at least 8K size stacks. You should read wiki a

bout 4K size stack issue. Don't complain about crashes until you resolve this.

make[1]: Entering directory `/usr/src/linux-2.6.14-gentoo-r2'

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/hal.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/iw_ndis.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/loader.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/misc_func

s.o

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/loader.c: In functi

on `register_devices':

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/loader.c:963: warni

ng: assignment from incompatible pointer type

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/ndis.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/ntoskerne

l.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/pe_linker

.o

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/ndis.c:1721:5: warn

ing: "LINUX_KERNEL_VERSION" is not defined

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/proc.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/usb.o

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c:287:54: m

acro "halt" passed 1 arguments, but takes just 0

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c: In funct

ion `miniport_halt':

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c:287: warn

ing: statement with no effect

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/divdi3.o

make[2]: *** [/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapp

er.o] Error 1

make[1]: *** [_module_/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driv

er] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.14-gentoo-r2'

make: *** [default] Error 2

!!! ERROR: net-wireless/ndiswrapper-1.2 failed.

!!! Function linux-mod_src_compile, Line 505, Exitcode 2

!!! Unable to make                                  KSRC=//usr/src/linux KVERS=2

6 all.

!!! If you need support, post the topmost build error, NOT this status message.

```

**edit I got ndiswrapper1.5 to work but i get this error while modprobing

```
moebius roger # modprobe ndiswrapper

FATAL: Error inserting ndiswrapper (/lib/modules/2.6.14-gentoo-r2/misc/ndiswrapper.ko): Unknown symbol in module, or unknown parameter (see dmesg)

```

----------

## r.stiltskin

I have no idea what caused the build error, do you?  What did you change so that you were able to compile ndiswrapper?

Regarding the modprobe error: 

that "moebius roger #" bit looks weird.  Do you have any idea where that comes from?  Exactly what did you do when that error came up?  

Let's see what information is written to your dmesg log immediately after you try to modprobe ndiswrapper.

do

cat /var/log/dmesg

& look at the last few lines of the log

----------

## poosnarky

I have no idea what caused the build error, or I wouldn't be posting here  :Razz: 

I was able to compile ndiswrapper by doing the kernel changes you made, and using 1.5 instead of 1.2

moebius roger # line

well, that is me as root, in my users /home directory, and moebius is my computers name......

dmesg is the same as i posted earlier when i hand compiled ndiswrapper

----------

## r.stiltskin

"ndiswrapper: Unknown symbol wireless_send_event " is the error that is generated when CONFIG_NET_RADIO is not enabled.

Obviously you have set it to "y" in /usr/src/linux/.config, or you wouldn't have been able to compile ndiswrapper.  The makefile checks to see if your .config is set up correctly.

But could it be that you recompiled the kernel but you're still running the old kernel?  After you recompiled, did you

cp /usr/src/linux/arch/i386/boot/bzImage /boot/kernel-2.6.14-gentoo-r2

and reboot with the new kernel?

----------

## poosnarky

yes, i have rebooted to do this

----------

## r.stiltskin

so, if you run:

grep NET_RADIO /usr/src/linux/.config

it says:

CONFIG_NET_RADIO=y

yes?

and when you run:

modprobe ndiswrapper

you get that same error:

ndiswrapper: Unknown symbol wireless_send_event

in dmesg?

and if you run:

ls -l /boot

the date & time listed for your kernel image (your newest kernel image if there's more than 1) is the date & time that you REcompiled the kernel last night or this morning?

and (if there's more than 1 kernel image there) that's the same kernel image that's listed in

/boot/grub/menu.lst?

By the way, you did install the correct windows drivers in ndiswrapper, right?

If the answer to all of those is yes, then I don't know, but what I would do in that situation is try to completely uninstall ndiswrapper by running

emerge -C ndiswrapper

and then use this

http://ndiswrapper.sourceforge.net/mediawiki/index.php/Uninstall

as a guide to files that you should delete so you can get a clean start

(DON'T delete anything from /usr/portage).

Then start over, and emerge ndiswrapper 1.2, and then follow instructions here:

http://ndiswrapper.sourceforge.net/mediawiki/index.php/Installation

starting about halfway down the page at "Install Windows Driver".

Good luck.

----------

## poosnarky

a total reinstallation of ndiswrapper1.5 seemed to do the trick, thanks for all the help!

----------

## r.stiltskin

Glad it worked.  Enjoy.

----------

