LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I hate being a newbie but HELP PLZ! (https://www.linuxquestions.org/questions/linux-newbie-8/i-hate-being-a-newbie-but-help-plz-379365/)

Wodihor 11-02-2005 03:38 PM

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.

trevelluk 11-02-2005 04:20 PM

Can you post the steps you took to compile, and any earlier messages.

Wodihor 11-02-2005 04:29 PM

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.

trevelluk 11-02-2005 06:12 PM

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?

Dark_Helmet 11-02-2005 07:32 PM

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.

Wodihor 11-03-2005 06:50 AM

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

Wodihor 11-03-2005 08:18 AM

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.

WindowBreaker 11-06-2005 02:01 PM

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.

chrisortiz 11-11-2005 03:18 PM

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

;)

WindowBreaker 11-11-2005 03:27 PM

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.

treehead 11-12-2005 03:55 PM

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

chrisortiz 11-12-2005 04:19 PM

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

then run: make distclean, make, make install

treehead 11-12-2005 04:31 PM

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

chrisortiz 11-12-2005 04:50 PM

oh, that big complicated post he made just ment he used a different kernel =)

treehead 11-12-2005 04:54 PM

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


All times are GMT -5. The time now is 10:30 PM.