LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-02-2005, 03:38 PM   #1
Wodihor
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Rep: Reputation: 0
I hate being a newbie but HELP PLZ!


I'm having trouble getting ndiswrapper-1.5 to compile. but i think that it is a programing error but i'm not sure.

I get a
Code:
URB_ASYNC_UNLINK undeclared (first use if this function)
there are a few other things after that but i beleive this is the root of my problem.. i understand some programing but not a great chunk of is just some bacis stuff form some VB programing for script files.

at any rate.. i'm running Slackware 10.2 kernel build 2.4.31 and trying to install ndiswrapper for my usb200m linksys usb nic card... i was hoping not to have to resort to asking people for help but avout 2 days i'm giving up on it...

Thanks for any light you all can shead on my issue.. i would copy and past but no network connection on it.
 
Old 11-02-2005, 04:20 PM   #2
trevelluk
Member
 
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 32
Can you post the steps you took to compile, and any earlier messages.
 
Old 11-02-2005, 04:29 PM   #3
Wodihor
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Original Poster
Rep: Reputation: 0
well that is going to be wrather hard and easy at the same time

what is did was http://ndiswrapper.sourceforge.net/m...p/Installation

what ever they said to do i did

As far as the error right now i figured that usb.c:311: and what i posted was the line number... so i REMed it out with /* and a * for the 3 lines and the a */ at the end of the last line.

that error went away and seemed to finish up. I don't know if i need it or not.. but trying to find a driver that will work with the deal now to see if i got it install correctly.
 
Old 11-02-2005, 06:12 PM   #4
trevelluk
Member
 
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 32
Hmm, I doubt that it'll work properly after you commented out the offending line. When you downloaded, did you get the stable version, or a snapshot or CVS version?
 
Old 11-02-2005, 07:32 PM   #5
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 372Reputation: 372Reputation: 372Reputation: 372
Your problem is a bit odd for a couple reasons.

First, the only file I found in the ndiswrapper package that refers to URB_ASYNC_UNLINK was ${top_src_dir}/driver/usb.c. Specifically, the code in question was:
Code:
#ifdef USB_ASYNC_UNLINK
	urb->transfer_flags |= URB_ASYNC_UNLINK;
#endif
This is weird because that code is saying "if URB_ASYNC_UNLINK is defined, then include the indented code - if not, ignore the indented code." The error you report says URB_ASYNC_UNLINK is undeclared. If it's undeclared, then the compiler should have ignored the code to begin with.

Have you made any modifications to the source files? This includes any patches or attempts to get the code to compile (besides commenting out the three lines above). Or, as travelluk brought up, are you trying to compile a stable release or a CVS snapshot?

The code I reference above came from the stable 1.5 version. No alterations made at all, and mine compiled cleanly. What's interesting is, my system does not define/declare URB_ASYNC_UNLINK anywhere (not entirely true, but go with me on this for a sec). So I have to assume there's some difference between my ndiswrapper code and yours. And that's what leads me to ask if there have been any modifications or patches.

Now, I'm running a 2.6.14 version kernel. I have an older kernel (2.6.8) that did define URB_ASYNC_UNLINK, but the file(s) that defined it are not in the search path for the compiler, and I verified that by looking at the compiler command.

Lastly, you may be ok to comment out those lines. From the code I've seen in other driver source files, it's rarely used. In fact, there was one source file that checked for the presence of URB_ASYNC_UNLINK, and entered a "FIXME" block of code that effectively did nothing bu print a warning message. Generally, commenting out problem-causing code will not give good results. This case might be an exception.

EDIT:
I wasn't looking carefully enough. There are two distinct identifiers used: USB_ASYNC_UNLINK and URB_ASYNC_UNLINK

I don't know what the purpose of the USB_ASYNC_UNLINK identifier is, because I could find no reference to it in any file on my system. The URB_ASYNC_UNLINK in my older kernel is defined as 0x10, and obviously serves as some sort of flag - I'm guessing for an asynchronous "yank" of the USB device from it's port.

Last edited by Dark_Helmet; 11-03-2005 at 12:29 PM.
 
Old 11-03-2005, 06:50 AM   #6
Wodihor
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Original Poster
Rep: Reputation: 0
OK. The code that you are referencing is the one that i did comment out. I tried bought the latest and greatest snapshot and the 1.5... i got the same errors on both. The reason i commented out the line was that is was short.

If bla bla bla
code
end if

I did how ever get the driver to load with ndiswrapper using winxp inf file. So the Win XP inf file for linksys 2.0 usb works.. model usb200m. but now i don't seem to be able to get it connected to the network... going to keep pluging away... maybe try something other than DHCP if that doesn't work will punt and regroup. as far as doing a dmesg the systems says
Code:
hub.c: new USB device 00:02.2-1, assigned address 3
eth1: register usbnet usb-00:02.2-1, ASIX AX8817X USB 2.0 Ethernet
when doing a ndiswrapper -l

Code:
Installed ndis drivers:
usb200m           driver present, hardware present
From this i'm assuming that it is loaded. so i guess i will assing an ip address and try to get it to work that way as it is not picking up dhcp. Let me know if there are any more ideas about this type of set up. again slackware 10.2 kernel build 2.4.31 straight install. nothing fancy just installed everything. Thx for the help
 
Old 11-03-2005, 08:18 AM   #7
Wodihor
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Wootage... I got the network card to work. for what ever reason it is showing up at eth1 and not eth0 which the "wizard" was setting the DHCP up for and the static i was trying to get to work. so now i have to see if i can get DHCP to work for the NIC and i will be all set and ready to go...

Just FYI from all that i have read to get this going for the following NIC

Linksys 2.0 USB
usb200m

You need ndiswrapper and Win XP inf file. Follow the directions... maybe it will work.. if you ran into my problem then you will know what to do for this USB nic card. Thx for the help.
 
Old 11-06-2005, 02:01 PM   #8
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
I just installed Slack 10.2 fresh and get the exact same error when running make.
I downloaded the stable version of ndiswrapper and followed their instructions to a T.
Here's what I did;
# tar xzf ndiswrapper-1.5.tar.gz
# cd tar ndiswrapper-1.5
# make distclean
# make
Then I got the following output:

make -C driver
make[1]: Entering directory `/home/pablo/ndiswrapper-1.5/driver'
cc -DEXPORT_SYMTAB -DMODVERSIONS -include /lib/modules/2.4.31/build/include/linux/modversions.h -DDRIVER_VERSION=\"1.5\" -DLINUX -D__KERNEL__ -DMODULE -I/lib/modules/2.4.31/build/include -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -O2 -mpreferred-stack-boundary=2 -c -o usb.o usb.c
usb.c: In function `wrap_alloc_urb':
usb.c:311: error: `URB_ASYNC_UNLINK' undeclared (first use in this function)
usb.c:311: error: (Each undeclared identifier is reported only once
usb.c:311: error: for each function it appears in.)
usb.c: In function `wrap_get_descriptor':
usb.c:943: warning: implicit declaration of function `usb_get_string'
make[1]: *** [usb.o] Error 1
make[1]: Leaving directory `/home/pablo/ndiswrapper-1.5/driver'
make: *** [all] Error 2


Please help if you know what i should try then I'll do it.

Thanks in advance to all.
 
Old 11-11-2005, 03:18 PM   #9
chrisortiz
Member
 
Registered: Nov 2005
Distribution: Slackware, and of course the super delux uber knoppix universal live recovery cd
Posts: 429

Rep: Reputation: 30
I'm using Slackware 10.2 kernel 2.4.31, I had the same problem as you guys with the my Linksys 200m usb (those are cool lil gadgets). I read the previous posts and came up with this.

on line 308 it says

#ifdev USB_ASYNC_UNLINK
urb->transfer_flags |= URB_ASYNC_UNLINK;
#endif


change it so it looks like this

/*
#ifdev USB_ASYNC_UNLINK
urb->transfer_flags |= URB_ASYNC_UNLINK;
#endif
*/


notice the /* and */

run netconfig

 
Old 11-11-2005, 03:27 PM   #10
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
Thanks for the help, but I got it figured out.

I just had to compile, install, and be using a kernel with all the precompiled sources available, then the make for ndiswrapper went fine w/o errors.

I first tried cheating and compiling all kernel sources for Slackware's prebuilt kernel, but that didnt' work. I had to go all the way and also be using the kernel for ndiswrapper to compile cleanly.

At least that's what worked for me. But if I run into it again, I'm going to use your tip.

thanks again.
 
Old 11-12-2005, 03:55 PM   #11
treehead
LQ Newbie
 
Registered: Oct 2004
Location: USA
Distribution: Slackware
Posts: 18

Rep: Reputation: 1
compile... what?

Quote:
Originally posted by WindowBreaker
Thanks for the help, but I got it figured out.

I just had to compile, install, and be using a kernel with all the precompiled sources available, then the make for ndiswrapper went fine w/o errors.

I first tried cheating and compiling all kernel sources for Slackware's prebuilt kernel, but that didnt' work. I had to go all the way and also be using the kernel for ndiswrapper to compile cleanly.

At least that's what worked for me. But if I run into it again, I'm going to use your tip.

thanks again.
;windowbreaker... can you be more specific as to what exactly you did to resolve your ndiswrapper make error? i am running slackware 10.2 and i get the exact same error when i try to run make. i am not sure what you did. can you give a play-by-play for an even-newer-newbie? thanks.

;treehead
 
Old 11-12-2005, 04:19 PM   #12
chrisortiz
Member
 
Registered: Nov 2005
Distribution: Slackware, and of course the super delux uber knoppix universal live recovery cd
Posts: 429

Rep: Reputation: 30
pico ndiswrapper-1.5/drivers/usb.c and comment out those lines i previously posted.

then run: make distclean, make, make install
 
Old 11-12-2005, 04:31 PM   #13
treehead
LQ Newbie
 
Registered: Oct 2004
Location: USA
Distribution: Slackware
Posts: 18

Rep: Reputation: 1
why the error?

Quote:
Originally posted by chrisortiz
pico ndiswrapper-1.5/drivers/usb.c and comment out those lines i previously posted.

then run: make distclean, make, make install
;yes, i actually did this:

Quote:
Originally posted by chrisortiz
on line 308 it says

#ifdev USB_ASYNC_UNLINK
urb->transfer_flags |= URB_ASYNC_UNLINK;
#endif


change it so it looks like this

/*
#ifdev USB_ASYNC_UNLINK
urb->transfer_flags |= URB_ASYNC_UNLINK;
#endif
*/


notice the /* and */
;and it worked. what i was asking windowbreaker is how he got his to work, because apparently he used a different method.

;treehead
 
Old 11-12-2005, 04:50 PM   #14
chrisortiz
Member
 
Registered: Nov 2005
Distribution: Slackware, and of course the super delux uber knoppix universal live recovery cd
Posts: 429

Rep: Reputation: 30
oh, that big complicated post he made just ment he used a different kernel =)
 
Old 11-12-2005, 04:54 PM   #15
treehead
LQ Newbie
 
Registered: Oct 2004
Location: USA
Distribution: Slackware
Posts: 18

Rep: Reputation: 1
compile... what?

Quote:
Originally posted by chrisortiz
oh, that big complicated post he made just ment he used a different kernel =)
;yeah... but i was a bit confused by the terminology... did he compile a new kernel from source, and that solved the issue?

;i'm currently using the stock bare.i bzImage from the slack 10.2 cd.

;treehead
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cedega newbie help plz Kantarell Linux - Games 2 07-23-2005 12:02 AM
Help a newbie...plz! the_sLiDe Linux - Newbie 13 09-30-2004 03:37 PM
hi all i am totally a newbie plz help me glacier1985 Linux - Newbie 1 07-07-2003 09:13 PM
Another Newbie Needs Help ... Plz Roisin_Dubh Linux - Newbie 4 06-22-2003 04:07 PM
Please help me and don't hate me because I'm a Newbie mguzman Linux - Software 1 03-17-2002 12:07 PM


All times are GMT -5. The time now is 02:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration