Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ndiswrapper won't compile on 2.6.14* kernel [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
zfc-tinkerer
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2003
Posts: 126

PostPosted: Mon Oct 03, 2005 4:43 am    Post subject: ndiswrapper won't compile on 2.6.14* kernel [SOLVED] Reply with quote

When I try to compile ndiswrapper with either 2.6.14rc2 or rc3 as what /usr/src/linux links to, the compilation fails (the output is below). However, with 2.6.13, it compiles just fine. The behavior is the same even if I have built a kernel of that number and booted into it. What kernel options should I try to change to see if I can get this to work? Or what else can I try to get this to work? (all kernels are vanilla) The output of trying to emerge ndiswrapper is as follows:

Code:

Calculating dependencies ...done!
>>> emerge (1 of 1) net-wireless/ndiswrapper-1.2 to /
>>> md5 files   ;-) ndiswrapper-1.2.ebuild
>>> md5 files   ;-) files/digest-ndiswrapper-1.2
>>> 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:
 *     2.6.14-rc3
 * 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
make[1]: Entering directory `/usr/src/linux-2.6.14-rc3'
  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
/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/misc_func
s.o
  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/ndis.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/ntoskerne
l.o
  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/pe_linker
.o
  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
/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c:287:54: macro "halt" passed 1 arguments, but takes just 0
/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c: In function `miniport_halt':
/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c:287: warning: statement with no effect
make[2]: *** [/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.o] Error 1
make[1]: *** [_module_/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.14-rc3'
make: *** [default] Error 2

!!! ERROR: net-wireless/ndiswrapper-1.2 failed.
!!! Function linux-mod_src_compile, Line 460, 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.


I know that this post is on the border between here and networking, sorry if I picked wrong. Thanks in advance for your help.


Last edited by zfc-tinkerer on Thu Oct 13, 2005 8:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
zfc-tinkerer
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2003
Posts: 126

PostPosted: Wed Oct 05, 2005 4:32 pm    Post subject: Reply with quote

Well, after another detailed google search, I found that this is definately a known problem. It seems that a few people have found patches, and that using a more recent version of ndiswrapper than is contained in portage helps (perhaps lets it compile, but it still may not work). I think that rather than fighting with these things, I'll just wait until there is a later kernel version or version of ndiswrapper in portage and then try again. Thanks to everyone who read this thread and was willing to help if they had known how :)
Back to top
View user's profile Send private message
jamapii
l33t
l33t


Joined: 16 Sep 2004
Posts: 637

PostPosted: Wed Oct 05, 2005 11:28 pm    Post subject: Reply with quote

I copied the ndiswrapper ebuild to my overlay and adapted it for 1.4, removing the suspend patch. I don't suspend.
Back to top
View user's profile Send private message
zfc-tinkerer
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2003
Posts: 126

PostPosted: Wed Oct 05, 2005 11:36 pm    Post subject: Reply with quote

Could you please be more specific on what you did? I would prefer to not be locked into using an old kernel.
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Sat Oct 08, 2005 9:42 am    Post subject: Reply with quote

Hi

Is there any Solution for the problem? When yes, can someone post that?

Thx!

--Mathias
Back to top
View user's profile Send private message
Grubshka
n00b
n00b


Joined: 07 Nov 2004
Posts: 37
Location: Toulouse - France

PostPosted: Sat Oct 08, 2005 1:53 pm    Post subject: A solution Reply with quote

(quickly updated for version 1.5...)

(this post explain how to create and install your own ebuild, but you can simply download it from bugzilla)

I followed jamapii advice, and it worked so i'll explain it a little how to create a new ebuild from the version 1.2 one.

I assume that you know a little about making ebuilds, like how portage overlay work. You'll find information here, here and here.
You can do all this in the standard portage directory (/usr/portage) but it'll be erased on emerge sync.

The portage overlay directory I use here is /usr/local/portage. You can use what you want, juste create it and put in /etc/make.conf :
Code:
PORTAGE_OVERLAY="your_directory"


1. Create portage overlay sub-directories for ndiswrapper :
Code:
grubshka ~ # mkdir -p /usr/local/portage/net-wireless/ndiswrapper/files


2. Make an ebuild for version 1.5, copying version 1.2 one. The version is a parameter so you have nothing to change in the file :
Code:
grubshka ndiswrapper # cp /usr/portage/net-wireless/ndiswrapper/ndiswrapper-1.2.ebuild /usr/local/portage/net-wireless/ndiswrapper/ndiswrapper-1.5.ebuild


(opt). Personnally I put the ~x86 mask for this package, but it's not really mandatory, just because i'm maniac ;)
If you want to do it change KEYWORDS="x86" to KEYWORDS="~x86" in ndiswrapper-1.5.ebuild
And I had the flag in my package.keyword file :
Code:
echo "net-wireless/ndiswrapper ~x86" >> /etc/portage/package.keywords


3. Make a suspend patch for version 1.5, copying version 1.2 one. Version is written statically in this file so you have to change every occurence of "ndiswrapper-1.2" to "ndiswrapper-1.5". Here I do it with sed but you can copy et edit it.
Code:
grubshka ndiswrapper # sed -e 's/ndiswrapper-1.2/ndiswrapper-1.5/' /usr/portage/net-wireless/ndiswrapper/files/ndiswrapper-1.2-suspend2.patch > /usr/local/portage/net-wireless/ndiswrapper/files/ndiswrapper-1.5-suspend2.patch
WARNING : I'm not sure of this step, it works for me, but if you want you can disable suspend2 patch, just remove lines concerning it in ndiswrapper-1.5.ebuild.


4. Now, generate the ebuild digest file with the ebuild command :
Code:
grubshka ndiswrapper # cd /usr/local/portage/net-wireless/ndiswrapper
grubshka ndiswrapper # ebuild ndiswrapper-1.5.ebuild digest
>>> Downloading http://mesh.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.5.tar.gz
--22:30:54--  http://mesh.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.5.tar.gz
           => `/usr/portage/distfiles/ndiswrapper-1.5.tar.gz'
Resolving mesh.dl.sourceforge.net... 213.203.218.122
Connecting to mesh.dl.sourceforge.net|213.203.218.122|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 168,549 (165K) [application/x-gzip]

100%[======================================================================================>] 168,549      188.23K/s           

22:30:55 (187.50 KB/s) - `/usr/portage/distfiles/ndiswrapper-1.5.tar.gz' saved [168549/168549]

>>> Generating digest file...
<<< ndiswrapper-1.5.tar.gz
>>> Generating manifest file...
<<< ndiswrapper-1.5.ebuild
<<< files/digest-ndiswrapper-1.5
<<< files/ndiswrapper-1.5-suspend2.patch
>>> Computed message digests.


5. So let's verify it could be emerged :
Code:
grubshka ndiswrapper # emerge -pv ndiswrapper

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

Calculating dependencies ...done!
[ebuild     U ] net-wireless/ndiswrapper-1.5  -debug 0 kB [1]

Total size of downloads: 0 kB
Portage overlays:
 [1] /usr/local/portage


6. OK, emerge it :
Code:
grubshka ndiswrapper # emerge ndiswrapper
Calculating dependencies ...done!
>>> emerge (1 of 1) net-wireless/ndiswrapper-1.5 to /
>>> md5 files   ;-) ndiswrapper-1.5.ebuild
>>> md5 files   ;-) files/digest-ndiswrapper-1.5
>>> md5 files   ;-) files/ndiswrapper-1.5-suspend2.patch
>>> md5 src_uri ;-) ndiswrapper-1.5.tar.gz
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.14-rc3-nitro1
 * Checking for suitable kernel configuration options:
>>> Unpacking source...
>>> Unpacking ndiswrapper-1.5.tar.gz to /var/tmp/portage/ndiswrapper-1.5/work 
 * Applying ndiswrapper-1.5-suspend2.patch ...                                                                                           [ ok ]
 * The only kernels that will work are gentoo-sources, vanilla-sources, and suspend2-sources.
 * No other kernels are supported. Kernels like the mm kernels will NOT work.
 * Converting ndiswrapper-1.5/driver/Makefile to use M= instead of SUBDIRS= ...                                                          [ ok ]
>>> Source unpacked.

BLA BLA BLA... Compiling stuff ;)

 * GNU info directory index is up-to-date.
 * IMPORTANT: 1 config files in /etc need updating.
 * Type emerge --help config to learn how to update config files.
Like in the version 1.2, I simply ignore the warning about 4K kernel stack, and all work. If you have problem with this, search in the forum, I remember I saw other threads for this problem. (edit : This one for example.)


6. The config file need updating :
Code:
grubshka ndiswrapper # etc-update
Scanning Configuration files...
Automerging trivial changes in: ndiswrapper
Exiting: Nothing left to do; exiting. :)


7. And load the module :
Code:
grubshka ndiswrapper # modprobe ndiswrapper
grubshka ndiswrapper # lsmod
Module                  Size  Used by
ndiswrapper           184980  0
forcedeth              19904  0
snd_intel8x0           29856  0
snd_ac97_codec         92092  1 snd_intel8x0
snd_ac97_bus            2048  1 snd_ac97_codec
nvidia_agp              6428  1
agpgart                29384  1 nvidia_agp


8. Install hardware, see ndiswrapper doc for information... After, see if all is installed :
Code:
grubshka ndiswrapper # ndiswrapper -l
Installed ndis drivers:
wmp54gs         driver present, hardware present
wmp54gsa                driver present, hardware present
grubshka ndiswrapper # /etc/init.d/net.wlan0 start
 * Starting wlan0
 *   Configuring wireless network for wlan0
Warning: Driver for device wlan0 has been compiled with version 19
of Wireless Extension, while this program supports up to version 17.
Some things may be broken...

 *     wlan0 connected to "grubwifi" at 00:0F:66:4B:3D:46
 *     in auto mode (WEP disabled)
 *   Bringing up wlan0
 *     192.168.51.2   
(you can see the sweet Wireless Extension warning jumped from 18 to 19... I someone have an idea on that...)


9. A little test :
Code:
grubshka ndiswrapper # ping 192.168.51.1
PING 192.168.51.1 (192.168.51.1) 56(84) bytes of data.
64 bytes from 192.168.51.1: icmp_seq=1 ttl=150 time=9.32 ms
64 bytes from 192.168.51.1: icmp_seq=2 ttl=150 time=16.5 ms
64 bytes from 192.168.51.1: icmp_seq=3 ttl=150 time=1.45 ms

--- 192.168.51.1 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5004ms
rtt min/avg/max/mdev = 1.457/7.672/16.543/4.667 ms


That's all folks !
(I'm french and this is my first long post in english, don't hesitate to correct english errors)

Ciao


Last edited by Grubshka on Fri Nov 04, 2005 10:03 pm; edited 4 times in total
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Sun Oct 09, 2005 10:40 am    Post subject: Reply with quote

Hi

Thx for ur instructions!

hmm, and why isn't the 1.4 Version in the unstable tree ~x86?

--Mathias
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Oct 09, 2005 11:45 am    Post subject: Reply with quote

mijenix wrote:
hmm, and why isn't the 1.4 Version in the unstable tree ~x86?

No-one's bothered yet to submit an ebuild diff to bugzilla.

Look at the ebuild in /usr/portage/net-wireless/ndiswrapper/, copy it to your Portage overlay, and adapt it for version 1.4. Test it, then submit it to bugzilla.

I'd do it, but ndiswrapper 1.2 works fine.
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Mon Oct 10, 2005 12:25 pm    Post subject: Reply with quote

PaulBredbury wrote:

I'd do it, but ndiswrapper 1.2 works fine.


Hi

That's a good Idea. I'll do it!

But your Ndiswrapper 1.2 works with your stable 2.6.13 Kernel or with an 2.6.14-rcX?

--Mathias
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Oct 10, 2005 3:02 pm    Post subject: Reply with quote

mijenix wrote:
But your Ndiswrapper 1.2 works with your stable 2.6.13 Kernel or with an 2.6.14-rcX?

2.6.13 - I haven't tried 2.6.14 yet.
Back to top
View user's profile Send private message
Grubshka
n00b
n00b


Joined: 07 Nov 2004
Posts: 37
Location: Toulouse - France

PostPosted: Tue Oct 11, 2005 2:47 pm    Post subject: Reply with quote

PaulBredbury wrote:
mijenix wrote:
But your Ndiswrapper 1.2 works with your stable 2.6.13 Kernel or with an 2.6.14-rcX?

2.6.13 - I haven't tried 2.6.14 yet.


It doesn't work on my 2.6.14-rc3-nitro1 kernel, that's why I installed version 1.4.
I didn't test it on standard gentoo 2.6.14.
Back to top
View user's profile Send private message
jimonade
Tux's lil' helper
Tux's lil' helper


Joined: 21 Apr 2004
Posts: 92
Location: USA, West Lafayette, IN

PostPosted: Sun Oct 23, 2005 5:00 pm    Post subject: Reply with quote

related thread: https://forums.gentoo.org/viewtopic-t-366610-start-0-postdays-0-postorder-asc-highlight-.html

im having trouble with emerging ndiswrapper with kernel 2.6.13-r3. see below...

Code:
bud ~ # emerge ndiswrapper -uDNva

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

Calculating dependencies ...done!
[ebuild  N    ] net-wireless/ndiswrapper-1.2  -debug 146 kB

Total size of downloads: 146 kB

Do you want me to merge these packages? [Yes/No] yes
>>> emerge (1 of 1) net-wireless/ndiswrapper-1.2 to /
*** Adjusting cvs-src permissions for portage user...
>>> Downloading http://gentoo.osuosl.org/distfiles/ndiswrapper-1.2.tar.gz
--11:42:18--  http://gentoo.osuosl.org/distfiles/ndiswrapper-1.2.tar.gz
           => `/usr/portage/distfiles/ndiswrapper-1.2.tar.gz'
Resolving gentoo.osuosl.org... 140.211.166.134
Connecting to gentoo.osuosl.org|140.211.166.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 150,068 (147K) [application/x-gzip]

100%[====================================>] 150,068       87.40K/s

11:42:20 (87.23 KB/s) - `/usr/portage/distfiles/ndiswrapper-1.2.tar.gz' saved [150068/150068]

>>> md5 files   ;-) ndiswrapper-1.2.ebuild
>>> md5 files   ;-) files/digest-ndiswrapper-1.2
>>> 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:
 *     2.6.13-gentoo-r3
 * Checking for suitable kernel configuration options:
find: invalid predicate `-quit'
 *
 * The version of GCC you are using (3.3.6) does
 * not match the version of GCC used to compile the
 * kernel ().
 *
 * Build will not continue, because you will experience problems.
 * To fix this either change the version of GCC you wish to use
 * to match the kernel, or recompile the kernel first.

!!! ERROR: net-wireless/ndiswrapper-1.2 failed.
!!! Function check_vermagic, Line 130, Exitcode 0
!!! GCC Version Mismatch.
!!! If you need support, post the topmost build error, NOT this status message.


i had ndiswrapper working earlier. i was using a genkernel. i usually install gentoo with a genkernel and later config it myself. then did...

Code:
emerge -C ndiswrapper;
cd /usr/src/linux
make clean; make mrproper
cp /tmp/config.working /usr/src/linux/.config
make && make modules_install


kernel built, copied stuff to /boot, rebooted, and then here we are at ndiswrapper failing.

as an aside, im using a pcmcia wireless card with ndiswrapper: netgear wg511 v2, and it works really well. (when i can manage to install ndiswrapper!)

-j
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Oct 23, 2005 5:30 pm    Post subject: Reply with quote

jimonade wrote:
*** Adjusting cvs-src permissions for portage user...

Do you always get that message when trying to emerge ndiswrapper? It comes from line 2654 of /usr/lib/portage/pym/portage.py - I think it refers to /usr/portage/distfiles/cvs-src/
Back to top
View user's profile Send private message
jimonade
Tux's lil' helper
Tux's lil' helper


Joined: 21 Apr 2004
Posts: 92
Location: USA, West Lafayette, IN

PostPosted: Sun Oct 23, 2005 6:10 pm    Post subject: Reply with quote

thanks for the reply.

i got the error when emerging ndiswrapper after i rebuilt the kernel from a genkernel to a manual config. i used the same .config and then made my changes in xconfig.

you mentioned something about cvs so i...
Code:
rm -rf /usr/portage/distfiles/cvs-src

and...
Code:
rm /lib/modules/2.6.13-gentoo-r3/misc/ndiswrapper.ko


and its building, rock and roll!

thank you so much PaulBredbury!
Back to top
View user's profile Send private message
Grubshka
n00b
n00b


Joined: 07 Nov 2004
Posts: 37
Location: Toulouse - France

PostPosted: Fri Nov 04, 2005 9:48 pm    Post subject: Reply with quote

PaulBredbury wrote:
mijenix wrote:
hmm, and why isn't the 1.4 Version in the unstable tree ~x86?

No-one's bothered yet to submit an ebuild diff to bugzilla.

Look at the ebuild in /usr/portage/net-wireless/ndiswrapper/, copy it to your Portage overlay, and adapt it for version 1.4. Test it, then submit it to bugzilla.

I'd do it, but ndiswrapper 1.2 works fine.


Update in bugzilla for version 1.5.

I updated my post about manual installation for version 1.5, I think it may be usefull for people searching on the forum.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum