PDA

View Full Version : Unable to compile ndiswrapper


Pinck
2005-03-04, 10:09 PM CST
Hey.

Things to know:
1. I am fairly new to Linux, so please handle with care :)
2. I am doing this on a fresh install of FC3 off of the DVD
3. At the point that I'm at right now I have installed gcc, binutils, cpp and libgcc. That's all.

My only connection to the internet is through my wireless NIC, so I will be very happy when I've got this ndiswrapper stuff out of the way. That way I can troubleshoot other things without having to reboot into XP each time I need to google.

So basically, I've un-tar-ed the ndiswrapper, cd to the directory and run make. This is the result:

[root@localhost ndiswrapper-1.0]# make
make -C driver
make[1]: Entering directory `/home/john/drivers/ndiswrapper-1.0/driver'
make -C /lib/modules/2.6.9-1.667/build SUBDIRS=/home/john/drivers/ndiswrapper-1.0/driver \
NDISWRAPPER_VERSION=1.0 \
EXTRA_VERSION= modules
make[2]: Entering directory `/lib/modules/2.6.9-1.667/build'
CC [M] /home/john/drivers/ndiswrapper-1.0/driver/hal.o
In file included from include/asm/thread_info.h:16,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from /home/john/drivers/ndiswrapper-1.0/driver/hal.c:17:
include/asm/processor.h:87: error: array type has incomplete element type
In file included from include/net/checksum.h:26,
from include/linux/skbuff.h:30,
from include/linux/if_ether.h:106,
from include/linux/netdevice.h:29,
from /home/john/drivers/ndiswrapper-1.0/driver/hal.c:18:
include/asm/checksum.h: In function ‘csum_partial_copy_from_user’:
include/asm/checksum.h:55: warning: pointer targets in passing argument 1 of ‘csum_partial’ differ in signedness
include/asm/checksum.h: In function ‘csum_and_copy_to_user’:
include/asm/checksum.h:202: warning: pointer targets in passing argument 1 of ‘csum_partial’ differ in signedness
In file included from include/linux/if_ether.h:106,
from include/linux/netdevice.h:29,
from /home/john/drivers/ndiswrapper-1.0/driver/hal.c:18:
include/linux/skbuff.h: In function ‘skb_add_data’:
include/linux/skbuff.h:1017: warning: pointer targets in passing argument 2 of ‘csum_and_copy_from_user’ differ in signedness
make[3]: *** [/home/john/drivers/ndiswrapper-1.0/driver/hal.o] Error 1
make[2]: *** [_module_/home/john/drivers/ndiswrapper-1.0/driver] Error 2
make[2]: Leaving directory `/lib/modules/2.6.9-1.667/build'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/john/drivers/ndiswrapper-1.0/driver'
make: *** [all] Error 2
[root@localhost ndiswrapper-1.0]#


So yeah. I hope this means something to someone. I've installed ndiswrapper before, but that was in Mandrake from an rpm.

Thanks in advance!

Woad_Warrior
2005-03-04, 10:56 PM CST
http://www.fedoraforum.org/forum/archive/index.php/t-29659.html
hope this helps. :)

Pinck
2005-03-05, 05:53 AM CST
http://www.fedoraforum.org/forum/archive/index.php/t-29659.html
hope this helps. :)

Hey, thanks for the reply.

Unfortunately it doesn't help. The only difference in what it's saying to do there and what I was doing (following the ndiswrapper installation wiki) was that I was doing "make" and then "make install" where the instructions on the page you linked for me say to go straight into make install.

When going straight into Make Install, this is there error that I get (very familiar of the one I posted earlier):

[root@localhost ndiswrapper-1.0]# make install
make -C driver install
make[1]: Entering directory `/home/john/drivers/ndiswrapper-1.0/driver'
make -C /lib/modules/2.6.9-1.667/build SUBDIRS=/home/john/drivers/ndiswrapper-1.0/driver \
NDISWRAPPER_VERSION=1.0 \
EXTRA_VERSION= modules
make[2]: Entering directory `/lib/modules/2.6.9-1.667/build'
CC [M] /home/john/drivers/ndiswrapper-1.0/driver/hal.o
In file included from include/asm/thread_info.h:16,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from /home/john/drivers/ndiswrapper-1.0/driver/hal.c:17:
include/asm/processor.h:87: error: array type has incomplete element type
In file included from include/net/checksum.h:26,
from include/linux/skbuff.h:30,
from include/linux/if_ether.h:106,
from include/linux/netdevice.h:29,
from /home/john/drivers/ndiswrapper-1.0/driver/hal.c:18:
include/asm/checksum.h: In function ‘csum_partial_copy_from_user’:
include/asm/checksum.h:55: warning: pointer targets in passing argument 1 of ‘csum_partial’ differ in signedness
include/asm/checksum.h: In function ‘csum_and_copy_to_user’:
include/asm/checksum.h:202: warning: pointer targets in passing argument 1 of ‘csum_partial’ differ in signedness
In file included from include/linux/if_ether.h:106,
from include/linux/netdevice.h:29,
from /home/john/drivers/ndiswrapper-1.0/driver/hal.c:18:
include/linux/skbuff.h: In function ‘skb_add_data’:
include/linux/skbuff.h:1017: warning: pointer targets in passing argument 2 of ‘csum_and_copy_from_user’ differ in signedness
make[3]: *** [/home/john/drivers/ndiswrapper-1.0/driver/hal.o] Error 1
make[2]: *** [_module_/home/john/drivers/ndiswrapper-1.0/driver] Error 2
make[2]: Leaving directory `/lib/modules/2.6.9-1.667/build'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/john/drivers/ndiswrapper-1.0/driver'
make: *** [install] Error 2
[root@localhost ndiswrapper-1.0]#


I'm sure once I get this thing compiled I'll have this problem licked. It's just a matter of getting it to compile. Is there a place that I can download a pre-compiled ndiswrapper for FC3?

Thanks!

Woad_Warrior
2005-03-05, 08:36 AM CST
after an intense google search i found the following guide about 2/3 of the way down the page. hope it helps.
http://home.gagme.com/greg/linux/fc3-tips.php

Troy
24-Dec-2004 00:25
Greg - I guess you have upgraded from the Toshiba 1115-S103? Well, good for you. I am still using the S103.

I thought I would share with you and your readers my ndiswrapper setup. In my opinion, this is the most "Fedora Friendly" way to use ndiswrapper. I'm using it with Fedora Core 3 on my S103 with a Linksys WPC54G.

These first steps apply when initially installing ndiswrapper with FC3 (in my case, the kernel was version 2.6.9-1.667). My driver tarball is located at ~/download/ndiswrapper, and my Windows .inf and .sys files are located at ~/download/ndiswrapper/driver. If you have a more recent kernel, adjust the kernel version appropriately in the following steps:

ndiswrapper:
build and install driver:
su
cd /tmp/
tar xvzf ~/download/ndiswrapper/ndiswrapper-0.12.tar.gz
cd ndiswrapper-0.12/
make rpm 2>&1 | tee make.rpm.1
cd ~/download/ndiswrapper/
mv /usr/src/redhat/SRPMS/ndiswrapper-0.12-1.src.rpm .
mv /usr/src/redhat/RPMS/i386/ndiswrapper-* .
rpm -ivh ndiswrapper-kernel-2.6.9-1.667-0.12-1.i386.rpm ndiswrapper-0.12-1.i386.rpm 2>&1 | tee ndiswrapper.1
ndiswrapper -i driver/lsbcmnds.inf
ndiswrapper -l
modprobe ndiswrapper
configure system:
echo "\
options ndiswrapper if_name=eth1
alias eth1 ndiswrapper" >> /etc/modprobe.conf
modprobe ndiswrapper
iwconfig
"System Settings/Network" utility
add new "Wireless connection" (via "New" button)
choose obvious selections and accept defaults
(except choose "Auto" for SSID and check the "Activate
device when computer starts" button)
save settings and exit utility (no 'activate' necessary)
rmmod ndiswrapper
service network restart
- insert card
should automatically load module start interface, but may
require an initial 'modprobe ndiswrapper'

At this point, the driver has been installed and is using 'eth1' as the interface for for the card, which is what allows the fedora Network configuration utility to 'see' the interface. In addition, the system will "boot up on the network" when the wireless card is installed at power-on, and will also automatically bring the wireless interface up if the card is inserted after boot-up. Finally, this method is an rpm-oriented install which some may prefer (I certainly do).

Unfortunately, as you noted, whenever the kernel is updated we have to build and install another ndiswrapper kernel module. Since the 'make rpm' performed earlier created a source rpm, the process is simplified:

rebuild ndiswrapper module
su
cd ~/download/ndiswrapper
rpmbuild --rebuild --target i686-fedora-linux-gnu ndiswrapper-0.12-1.src.rpm 2>&1 | tee ndiswrapper.rebuild.2.6.9-1.681_FC3.1
mv /usr/src/redhat/RPMS/i686/ndiswrapper-* .
rpm -ivh ndiswrapper-kernel-2.6.9-1.681_FC3-0.12-1.i686.rpm 2>&1 | tee ndiswrapper-kernel.2.6.9-1.681_FC3.1
service network restart

So, once I have booted a new kernel, I can have my wireless card up and running in about two minutes. This looks complicated, but it is actually pretty straightforward; I have just tried to spell out every necessary step. Finally, I have indented the steps above to make things clear, but I don't know if this post will preserve my formatting; also, pay close attention to the line breaks (it might help to maximize your browser window).

tashirosgt
2005-03-05, 08:42 AM CST
Did your files come with a ./configure script? Did you run it before doing make? Is this a 32 bit FC3 or a 64 bit FC3?

Pinck
2005-03-07, 06:35 AM CST
Hey, thanks everyone for the help.

I regret to say that I wussed out and just reinstalled FC3. I was pretty sure that I had either messed up on the gcc install or the kernel source install so I just made sure I chose to install those in the OS installation. After reinstalling, ndiswrapper installed like butter.

I hadn't actually done any other installing of anything before originally attempting to install ndiswrapper, so the reinstall of FC3 just made sense time wise.

Thanks again!