Ticket #845 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Fails to build on Fedora Rawhide (and 2.6.18rc4) kernels

Reported by: anonymous Assigned to: mentor
Priority: major Milestone: version 0.9.3
Component: madwifi: driver Version: trunk
Keywords: Cc:
Patch is attached: 1 Pending:

Description (Last modified by mrenzmann)

Compiling magwifi-ng 20060816 snapshot on Fedora rawhide kernel fails with:

make[1]: Entering directory `/usr/src/kernels/2.6.17-1.2583.fc6-i686'
  CC [M]  /home/ian/src/madwifi-ng-r1705-20060816.orig/ath/ah_osdep.o
In file included from /home/ian/src/madwifi-ng-r1705-20060816.orig/ath/../hal/linux/ah_osdep.c:44,
                 from /home/ian/src/madwifi-ng-r1705-20060816.orig/ath/ah_osdep.c:2:
include/linux/config.h:6:2: error: #warning Including config.h is deprecated.
make[3]: *** [/home/ian/src/madwifi-ng-r1705-20060816.orig/ath/ah_osdep.o] Error 1
make[2]: *** [/home/ian/src/madwifi-ng-r1705-20060816.orig/ath] Error 2
make[1]: *** [_module_/home/ian/src/madwifi-ng-r1705-20060816.orig] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.17-1.2583.fc6-i686'
make: *** [modules] Error 2

The current Fedora rawhide kernel (2.6.17-1.2586.fc6) is really 2.6.18-rc4 with patches. Replacing all "#include <linux/config.h>" with "#include <linux/autoconf.h>" fixes the problem. I have attached a patch which does this. My impression is that autoconf.h is available in older 2.6 kernels and config.h was kept for backward compatibility and is finally being deprecated in 2.6.18.

Attachments

madwifi-2.6.18-autoconf.patch (15.7 kB) - added by anonymous on 08/26/06 21:14:09.
madwifi-2.6.18-config.patch (14.8 kB) - added by ianburrell@gmail.com on 09/18/06 03:09:04.
Patch to remove config.h
madwifi.include.diff (12.4 kB) - added by mentor on 09/20/06 02:21:29.

Change History

08/26/06 21:14:09 changed by anonymous

  • attachment madwifi-2.6.18-autoconf.patch added.

08/27/06 11:08:31 changed by mrenzmann

  • description changed.

09/08/06 12:44:24 changed by matthias@rpmforge.net

I can confirm this problem. The most annoying part is that I had removed -Werror, so there were plenty of warnings regarding "Including config.h is deprecated" which seemed harmless, but the build then failed with this error :

  LD [M]  /root/madwifi/ath_rate/sample/ath_rate_sample.o
  CC [M]  /root/madwifi/net80211/ieee80211_linux.o
In file included from /root/madwifi/net80211/ieee80211_linux.c:36:
include/linux/config.h:6:2: warning: #warning Including config.h is deprecated.
/root/madwifi/net80211/ieee80211_linux.c: In function 'proc_ieee80211_open':
/root/madwifi/net80211/ieee80211_linux.c:380: error: implicit declaration of function 'PDE'
/root/madwifi/net80211/ieee80211_linux.c:380: warning: initialization makes pointer from integer without a cast
/root/madwifi/net80211/ieee80211_linux.c:381: error: dereferencing pointer to incomplete type
/root/madwifi/net80211/ieee80211_linux.c: In function 'ieee80211_sysctl_vattach':
/root/madwifi/net80211/ieee80211_linux.c:643: error: 'proc_net' undeclared (first use in this function)
/root/madwifi/net80211/ieee80211_linux.c:643: error: (Each undeclared identifier is reported only once
/root/madwifi/net80211/ieee80211_linux.c:643: error: for each function it appears in.)
/root/madwifi/net80211/ieee80211_linux.c:644: error: implicit declaration of function 'proc_mkdir'
/root/madwifi/net80211/ieee80211_linux.c:644: warning: assignment makes pointer from integer without a cast
/root/madwifi/net80211/ieee80211_linux.c:652: warning: assignment makes pointer from integer without a cast
/root/madwifi/net80211/ieee80211_linux.c:663: error: implicit declaration of function 'create_proc_entry'
/root/madwifi/net80211/ieee80211_linux.c:664: warning: assignment makes pointer from integer without a cast
/root/madwifi/net80211/ieee80211_linux.c:665: error: dereferencing pointer to incomplete type
/root/madwifi/net80211/ieee80211_linux.c:666: error: dereferencing pointer to incomplete type
/root/madwifi/net80211/ieee80211_linux.c: In function 'ieee80211_proc_vcreate':
/root/madwifi/net80211/ieee80211_linux.c:735: warning: assignment makes pointer from integer without a cast
/root/madwifi/net80211/ieee80211_linux.c:736: error: dereferencing pointer to incomplete type
/root/madwifi/net80211/ieee80211_linux.c:737: error: dereferencing pointer to incomplete type
/root/madwifi/net80211/ieee80211_linux.c: In function 'ieee80211_sysctl_vdetach':
/root/madwifi/net80211/ieee80211_linux.c:768: error: implicit declaration of function 'remove_proc_entry'
/root/madwifi/net80211/ieee80211_linux.c:773: error: dereferencing pointer to incomplete type
/root/madwifi/net80211/ieee80211_linux.c:775: error: 'proc_net' undeclared (first use in this function)
make[3]: *** [/root/madwifi/net80211/ieee80211_linux.o] Error 1
make[2]: *** [/root/madwifi/net80211] Error 2
make[1]: *** [_module_/root/madwifi] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.17-1.2630.fc6-x86_64'
make: *** [modules] Error 2

Applying the patch found here made all the warnings go away, as well as this build failure (this is kernel 2.6.17-1.2630.fc6-x86_64, which should be found in Fedora Core 6 test3).

Thanks a lot for the patch!

Matthias

09/08/06 12:52:50 changed by matthias@rpmforge.net

Oops, I wrote too fast. I was omitting KERNELPATH for the latest kernel, so I was successfully recompiling the module for 2.6.17-1.2339.fc6, which works, but it still fails with the above error for the latest 2.6.17-1.2630 kernel.

09/18/06 03:08:32 changed by ianburrell@gmail.com

I was informed by a kernel developer that the proper way to handle this is to remove the config.h lines. The Makefile includes autoconf.h on every file. I will attach the patch I have been using.

09/18/06 03:09:04 changed by ianburrell@gmail.com

  • attachment madwifi-2.6.18-config.patch added.

Patch to remove config.h

09/18/06 03:25:48 changed by Barny

Pardon my ignorance but how and from what directory should I run this patch? I run it from a particular directory where I downloaded the patch to, (typing "patch madwifi-w.6.18-config.patch"), and the cursor goes to the next line but I get no ouput or prompt back. I have to use a escape sequence to return to the prompt. Also I am using FC6T3 with kernel 2.6.17-1.2647.fc6. Will this patch still apply?

Thanks. Barny

09/18/06 04:27:26 changed by mentor

You need to change each

#include linux/config.h

to

#ifndef AUTOCONF_INCLUDED
#include <linux/config.h>
#endif

09/18/06 05:14:36 changed by Barny

Thanks for taking the time to answer. With my level of ignorance and your response I couldn't figure out a thing and I am getting very frustrated after spending hours trying to make the wifi in my T42 Thinkpad work. I will continue looking for more sources on internet.

09/18/06 05:44:10 changed by mrenzmann

man patch will explain how that command works. If you store the patch file in the top level directory of the madwifi sources, then changing to that directory and running patch -p1 < madwifi-config-2.6.18.patch there should work.

09/18/06 06:55:17 changed by Glirre

Stuck at the same point... did as indicated downloading the madwifi-config-2.6.18-config.patch and executing "patch -p < madwifi-config-2.6.18-config.patch" and got the following as output in the next line: "patch: **** Only garbage was found in the patch input.".

Any ideas? other pointers to go read a more detailed explanation of this and how to get this installed?

Glirre.

09/18/06 21:17:04 changed by anonymous

could somebody please illustrate how to perform or run the patch? I have been in communication with a group of people facing the same problem and we just can't figure it out.

Thanks,

09/19/06 05:06:16 changed by anonymous

madwifi-ng-xxx># patch -p1 < xxx.patch

09/19/06 05:49:09 changed by mrenzmann

@Glirre: you used -p instead of -p 1.

09/19/06 06:29:48 changed by anonymous

Sorry, that was a typo, but I did it like you indicated. See output in both cases (with space and without space): [root@experimental madwifi-0.9.2]# patch -p1 < madwifi-2.6.18-config.patch patch: **** Only garbage was found in the patch input. [root@experimental madwifi-0.9.2]# [root@experimental madwifi-0.9.2]# [root@experimental madwifi-0.9.2]# patch -p 1 < madwifi-2.6.18-config.patch patch: **** Only garbage was found in the patch input. [root@experimental madwifi-0.9.2]#

Pretty much the same output. We can figure it out. Doing the same in several PCs.

09/19/06 06:54:51 changed by Glirre

Sorry to bother you so much with this. I have looked, purchased and installed another PCMCIA card that doesn't require this nonsense and the limited support found here. After many hours I thought it wasn't worth using this because documentation is poor and support difficult.

Thanks again and good luck to those that continue trying.

Glirre

09/19/06 07:09:39 changed by mrenzmann

Those of you who have troubles with patching the source, download this tarball and give it a try. It's the latest SVN snapshot, patched with madwifi-2.6.18-config.patch from above. Please report back about the results.

@Glirre: thanks for your warm words and good luck with your new card.

09/19/06 08:15:14 changed by barnys

Glirre... BIG MISTAKE!!! I struggle with this for almost 5 days working several hrs a day just on this, and this last driver is making it work like a charm. It took me less than 5 min. and in fact this posting is being done via my wifi card, feet up in bed, while I am watching TV and enjoying or one more conquest!

Thank mrenzmann! I really appreciate the effort and time on this. Is there any kind of GUI like manager that can run on top of this to make it more user friendly to configure? ... I noticed that system-config-network is not good for it. It sees the hw there now, but that's as much as I can do.

Thanks again!

09/19/06 09:22:39 changed by mrenzmann

@barnys: I'm not familiar with RedHat?-based distributions. However, there is Gnome's NetworkManager, which also has support for WLAN. Maybe that is what you're looking for - on the other hand I have no clue if and how that is tied into RedHad?-based distros. You could ask on the madwifi-users mailing list, too.

09/20/06 02:21:29 changed by mentor

  • attachment madwifi.include.diff added.

09/20/06 02:24:18 changed by mentor

Can someone review this patch? I'll commit it afterwards.

09/20/06 06:28:14 changed by mrenzmann

  • status changed from new to assigned.
  • owner set to mrenzmann.
  • milestone set to version 0.9.3.

No objections from my side, patch looks ok.

09/20/06 06:28:33 changed by mrenzmann

  • status changed from assigned to new.
  • owner changed from mrenzmann to mentor.

09/20/06 10:46:58 changed by mentor

Checked in as r1721, can you check this compiles?

09/22/06 19:46:02 changed by mentor

  • status changed from new to closed.
  • resolution set to fixed.

Reopen if necessary.

11/30/06 03:03:18 changed by anonymous

I found most of this useless... Sorry, but I tried every step, every suggestion, everything... I cannot play with this for 5 days to finaly find a way to do this, so I will sell off the NetGear?, and pick up something compatible... One suggestion... For people like me, who are new'ish to Linux, you cannot expect much... So create an RPM that sets up the entire mess and makes it work...

11/30/06 10:45:34 changed by matthias@rpmforge.net

This "package that does it all" actually exists. Just install the i386 or x86_64 package from here : freshrpms.net/rpm/madwifi (sorry, real URLs seem banned from tickets...)

If you already have freshrpms configured (see the main website), just run "yum install madwifi".


Add/Change #845 (Fails to build on Fedora Rawhide (and 2.6.18rc4) kernels)