Bug 161895 - net-wireless/rtl8187 will not compile correctly on 2.6.19 kernel
|
Bug#:
161895
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: x86
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: mobile@gentoo.org
|
Reported By: jason@monsterjam.org
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: net-wireless/rtl8187 will not compile correctly on 2.6.19 kernel
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2007-01-13 13:48 0000
|
when trying to emerge net-wireless/rtl-8187 on a system thats running 2.6.19
kernel, the emerge will fail with
error: linux/config.h: No such file or directory errors.
Reproducible: Always
Steps to Reproduce:
1. install gentoo-sources.2.6.19-r3
2. emerge net-wireless/rtl8187
3. profit!
Actual Results:
mythtv rtl8187_linux # emerge rtl8187
Calculating dependencies... done!
....
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt.c:14:26:
error: linux/config.h: No such file or directory
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_ccmp.c:12:26:
error: linux/config.h: No such file or directory
CC [M]
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.o
CC [M]
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_wep.o
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_rx.c:25:26:
error: linux/config.h: No such file or directory
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_tx.c:35:26:
error: linux/config.h: No such file or directory
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_module.c:34:26:
error: linux/config.h: No such file or directory
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.c:12:26:
error: linux/config.h: No such file or directory
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_wep.c:12:26:
error: linux/config.h: No such file or directory
make[2]: ***
[/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_ccmp.c:
In function 'ieee80211_ccmp_aes_encrypt':
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_ccmp.c:75:
warning: 'crypto_cipher_encrypt' is deprecated (declared at
include/linux/crypto.h:842)
make[2]: ***
[/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_ccmp.o]
Error 1
make[2]: ***
[/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_module.o]
Error 1
make[2]: ***
[/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_tx.o]
Error 1
make[2]: ***
[/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_rx.o]
Error 1
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.c:
In function 'ieee80211_tkip_encrypt':
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.c:317:
warning: 'crypto_cipher_encrypt' is deprecated (declared at
include/linux/crypto.h:842)
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.c:
In function 'ieee80211_tkip_decrypt':
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.c:396:
warning: 'crypto_cipher_decrypt' is deprecated (declared at
include/linux/crypto.h:868)
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.c:
In function 'michael_mic':
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.c:448:
warning: 'crypto_digest_init' is deprecated (declared at
include/linux/crypto.h:710)
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.c:449:
warning: 'crypto_digest_setkey' is deprecated (declared at
include/linux/crypto.h:736)
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.c:450:
warning: 'crypto_digest_update' is deprecated (declared at
include/linux/crypto.h:713)
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.c:451:
warning: 'crypto_digest_final' is deprecated (declared at
include/linux/crypto.h:715)
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_wep.c:
In function 'prism2_wep_encrypt':
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_wep.c:141:
warning: 'crypto_cipher_encrypt' is deprecated (declared at
include/linux/crypto.h:842)
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_wep.c:
In function 'prism2_wep_decrypt':
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_wep.c:185:
warning: 'crypto_cipher_decrypt' is deprecated (declared at
include/linux/crypto.h:868)
make[2]: ***
[/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_wep.o]
Error 1
make[2]: ***
[/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211/ieee80211_crypt_tkip.o]
Error 1
make[1]: ***
[_module_/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211]
Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.19-gentoo-r3'
make: *** [modules] Error 2
!!! ERROR: net-wireless/rtl8187-1.10 failed.
Call stack:
ebuild.sh, line 1546: Called dyn_compile
ebuild.sh, line 937: Called src_compile
ebuild.sh, line 1255: Called linux-mod_src_compile
linux-mod.eclass, line 510: Called die
!!! Unable to make KSRC=/usr/src/linux .
!!! If you need support, post the topmost build error, and the call stack if
relevant.
Expected Results:
it should compile and install the kernel modules correctly.
someone told me that.. 2.6.19 kernels no longer have the "linux/config.h"
header. You just need to change any occurence of "config.h" to "autoconf.h".
so I manually replaced all instances of config.h -> autoconf.h in the
following:
beta-8187/r8187.h:#include <linux/config.h>
ieee80211/ieee80211_tx.c:#include <linux/config.h>
ieee80211/ieee80211_crypt.c:#include <linux/config.h>
ieee80211/ieee80211_rx.c:#include <linux/config.h>
ieee80211/ieee80211_crypt_wep.c:#include <linux/config.h>
ieee80211/ieee80211_crypt_ccmp.c:#include <linux/config.h>
ieee80211/ieee80211_module.c:#include <linux/config.h>
ieee80211/ieee80211_crypt_tkip.c:#include <linux/config.h>
mythtv rtl8187_linuxdrv_V1.1 #
and that works to a point, but still have problems later..
see http://forums.gentoo.org/viewtopic-t-531488-highlight-.html
for more info.
*** Bug 152729 has been marked as a duplicate of this bug. ***
Changing to autoconf.h is not the correct solution. You need to patch it in
this way:
#include <linux/version.h>
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
#include <linux/config.h>
#endif
If that doesn't help, please elaborate on the later problems.
ok, this works for all the modules under the
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/ieee80211
directory, but when I go to
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187
and patch r8187.h and then run make, I still get:
mythtv beta-8187 # pwd
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187
mythtv beta-8187 # make
make -C /lib/modules/2.6.19-gentoo-r3/build
SUBDIRS=/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187
modules
make[1]: Entering directory `/usr/src/linux-2.6.19-gentoo-r3'
CC [M]
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187/r8187_core.o
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187/r8187_core.c:
In function 'rtl8187_rx_urbsubmit':
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187/r8187_core.c:680:
warning: passing argument 6 of 'usb_fill_bulk_urb' from incompatible pointer
type
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187/r8187_core.c:
In function 'rtl8180_tx':
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187/r8187_core.c:1466:
warning: passing argument 6 of 'usb_fill_bulk_urb' from incompatible pointer
type
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187/r8187_core.c:
In function 'rtl8187_usb_probe':
/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187/r8187_core.c:2385:
error: 'struct net_device' has no member named 'get_wireless_stats'
make[2]: ***
[/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187/r8187_core.o]
Error 1
make[1]: ***
[_module_/var/tmp/portage/rtl8187-1.10/work/rtl8187_linuxdrv_V1.1/beta-8187]
Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.19-gentoo-r3'
make: *** [modules] Error 2
mythtv beta-8187 #
You need to remove the pt_regs argument from the function passed as parameter 6
of usb_fill_bulk_urb
get_wireless_stats handler needs to be replaced with get_stats
Maintainers, please fix in stable tree asap
I quickly checked through those new sources, and they don't fix the
get_wireless_stats problem. But changing this line to
#if WIRELESS_EXT < 17
dev->wireless_handlers->get_wireless_stats = r8180_get_wireless_stats;
#endif
could help. Some other drivers (like some ralink), also simply exclude such
calls like that. I didn't test it though because I don't own yet such a card...
Ok.. after looking at the ipw drivers, I made a fix for this driver. It does:
a) Replace the get_wireless_stats call with get_stats and the proper variable
in assignment
b) Fix the implicit declaration warnings, as they are ugly and easy to fix
c) Fix the usb_fill_bulk_urb warnings, as previously suggested by Daniel Drake
d) Remove obsolete linux/config.h includes from all files
I will attach the patch here, maybe someone using this driver could test it.
Created an attachment (id=107577) [details]
Fixes four problems in the current source
Changes made:
a) Replace the get_wireless_stats call with get_stats and the proper variable
in assignment
b) Fix the implicit declaration warnings, as they are ugly and easy to fix
c) Fix the usb_fill_bulk_urb warnings, as previously suggested by Daniel Drake
d) Remove obsolete linux/config.h includes from all files
Created an attachment (id=107621) [details]
rtl8187-1.10.ebuild
Thanks, the enclosed ebuild works on x86, with:
net-wireless/wireless-tools-29_pre10
sys-kernel/gentoo-sources-2.6.19-r4
I tested WEP but did not test WPA.
Relevant kernel options:
# CONFIG_IEEE80211 is not set
CONFIG_NET_RADIO=y
CONFIG_NET_WIRELESS_RTNETLINK=n
CONFIG_NET_WIRELESS=y
CONFIG_WIRELESS_EXT=y
dmesg:
Linux kernel driver for RTL8187 based WLAN cards
Copyright (c) 2004-2005, Andrea Merello
rtl8187: Initializing module
rtl8187: Wireless extensions version 21
rtl8187: Initializing proc filesystem
rtl8187 1-7.3:1.0: usb_probe_interface
rtl8187 1-7.3:1.0: usb_probe_interface - got id
usb 1-7.3: usb auto-resume
usb 1-7.3: finish resume
rtl8187: Reported EEPROM chip is a 93c46 (1Kbit)
rtl8187: Card MAC address is 00:15:bf:07:a0:80
rtl8187: Card reports RF frontend Realtek 8225
rtl8187: WW:This driver has EXPERIMENTAL support for this chipset.
rtl8187: WW:use it with care and at your own risk and
rtl8187: WW:**PLEASE** REPORT SUCCESS/INSUCCESS TO andreamrl@tiscali.it
rtl8187: This seems a new V2 radio
rtl8187: PAPE from CONFIG2: 0
rtl8187: Driver probe completed
My udev rule in /etc/udev/rules.d/10-local.rules:
SUBSYSTEM=="net", ATTR{address}=="00:15:bf:07:a0:80", NAME="wlan"
There is a (harmless?) bug when removing the module:
usbdev1.5_ep81: ep_device_release called for usbdev1.5_ep81
usbdev1.5_ep02: ep_device_release called for usbdev1.5_ep02
usbdev1.5_ep03: ep_device_release called for usbdev1.5_ep03
BUG: warning at fs/proc/generic.c:732/remove_proc_entry()
[<c019d745>] remove_proc_entry+0x1f5/0x220
[<f8a3cc32>] rtl8187_usb_module_exit+0x12/0x20 [r8187]
[<c01399bb>] sys_delete_module+0x14b/0x1c0
[<c0156ba9>] remove_vma+0x39/0x50
[<c0157677>] do_munmap+0x197/0x1f0
[<c0103121>] sysenter_past_esp+0x56/0x79
[<c03b007b>] vcc_seq_show+0xab/0x150
I had a quick look at the attached ebuild:
a) I wouldnt recommend doing seds in the ebuild, use a patch instead
b) After a first look, it seems like the seds are not correct, they also
replace occurrences they shouldn't. For example static struct iw_statistics is
not wrong and isn't removed in my patch either.
Please review this and compare the results to my patch.
Paul,
are you ignoring me or why are you submitting a completely new patch?
You are replacing stuff in your patch, that shouldn't be replaced imho. I made
my patch according to the way, the ipw2200 module works, replacing the
iw_statistics lines seems wrong to me, use the rtl8180_stats variable in the
assignment, which is already defined in the source, and has exactly the type
required for get_stats. Nothing else is needed to fix the error.
My other changes are only to remove warnings.
Chris
> why are you submitting a completely new patch?
This is a patch for the *updated* source, mentioned in comment #5.
> You are replacing stuff in your patch, that shouldn't be replaced imho.
Fair enough. It's the result of me spending hours trying to get it to compile,
since I'm not familiar with C. I didn't say it couldn't be improved further ;)
(In reply to comment #16)
> > why are you submitting a completely new patch?
>
> This is a patch for the *updated* source, mentioned in comment #5.
Yea, but this new source hasn't addressed the main problems, so my patch can
simply be ported to the new src without changes.
>
> > You are replacing stuff in your patch, that shouldn't be replaced imho.
>
> Fair enough. It's the result of me spending hours trying to get it to compile,
> since I'm not familiar with C. I didn't say it couldn't be improved further ;)
>
It is easy to get it to compile (Already commenting out one line gets it to
compile), the harder thing is to get it to compile AND at the same time let it
do what it is supposed to do ;)
Changing the iw_statistics stuff for example is one way to get it to compile,
but I compared the source of the ipw module with this one, and both sources are
really very similar (almost identical at most points), hence I adapted the
changes from the ipw module to this one, believing that this preserves all
functions of the module :)
Chris
any comments from people on why rtl8187 is being deleted from portage? is
there a replacement available?
A replacement project to create a working driver for the RTL8187 is rtl-wifi -
bug #172913.
(In reply to comment #18)
> any comments from people on why rtl8187 is being deleted from portage? is
> there a replacement available?
>
Where did you get that info? I didn't see it in Gentoo Weekly. I just ordered
a Netgear WG111v2 (with realtek chip) and now I am worried if it will work at
all :(
I get this error message when trying to emerge. I understand the solution is to
disable the Generic IEEE 802.11 Networking Stack ? Or can I leave it as a
module?
# emerge -av rtl8187
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] net-wireless/rtl8187-1.10 0 kB [1]
Total: 1 package (1 reinstall), Size of downloads: 0 kB
Portage overlays:
[1] /usr/local/portage
Would you like to merge these packages? [Yes/No]
>>> Emerging (1 of 1) net-wireless/rtl8187-1.10 to /
* rtl8187_linux_26.1010.zip MD5 ;-) ... [ ok
]
* rtl8187_linux_26.1010.zip RMD160 ;-) ... [ ok
]
* rtl8187_linux_26.1010.zip SHA1 ;-) ... [ ok
]
* rtl8187_linux_26.1010.zip SHA256 ;-) ... [ ok
]
* rtl8187_linux_26.1010.zip size ;-) ... [ ok
]
* checking ebuild checksums ;-) ... [ ok
]
* checking auxfile checksums ;-) ... [ ok
]
* checking miscfile checksums ;-) ... [ ok
]
* checking rtl8187_linux_26.1010.zip ;-) ... [ ok
]
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found kernel object directory:
* /lib/modules/2.6.19-gentoo-r5/build
* Found sources for kernel version:
* 2.6.19-gentoo-r5
* Checking for suitable kernel configuration options...
* rtl8187-1.10 requires the in-kernel version of the IEEE802.11 subsystem to
be disabled (CONFIG_IEEE80211)
* Please check to make sure these options are set correctly.
* Failure to do so may cause unexpected problems.
* Once you have satisfied these options, please try merging
* this package again.
!!! ERROR: net-wireless/rtl8187-1.10 failed.
Call stack:
ebuild.sh, line 1630: Called dyn_setup
ebuild.sh, line 702: Called qa_call 'pkg_setup'
ebuild.sh, line 38: Called pkg_setup
rtl8187-1.10.ebuild, line 41: Called check_extra_config
linux-info.eclass, line 471: Called die
!!! Incorrect kernel configuration options
!!! If you need support, post the topmost build error, and the call stack if
relevant.
!!! A complete build log is located at
'/var/tmp/portage/net-wireless/rtl8187-1.10/temp/build.log'.
!!! This ebuild is from an overlay: '/usr/local/portage'
I removed the 'Generic IEEE 802.11 Networking Stack' and now it's working like
a charm :D.
I tried installing this driver on another laptop eith the 2.6.20 kernel, only I
get this error:
# ebuild rtl8187-1.10.ebuild digest
diff:
../../../rtl8187-1.10-orig/work/rtl8187_linux_26.1010.0622.2006/beta-8187/r8180_wx.c:
No such file or directory
diff: ./beta-8187/r8180_wx.c: No such file or directory
/usr/local/portage/net-wireless/rtl8187/rtl8187-1.10.ebuild: line 2: ---:
command not found
/usr/local/portage/net-wireless/rtl8187/rtl8187-1.10.ebuild: line 3: +++:
command not found
/usr/local/portage/net-wireless/rtl8187/rtl8187-1.10.ebuild: line 4: @@:
command not found
/usr/local/portage/net-wireless/rtl8187/rtl8187-1.10.ebuild: line 5: syntax
error near unexpected token `}'
/usr/local/portage/net-wireless/rtl8187/rtl8187-1.10.ebuild: line 5: ` };'
!!! ERROR: net-wireless/rtl8187-1.10 failed.
Call stack:
ebuild.sh, line 1511: Called die
!!! error sourcing ebuild
!!! If you need support, post the topmost build error, and the call stack if
relevant.
I re-downloaded the ebuild. The previous one apperantly got messed up. This one
is working :D
I can't remove the 'Generic IEEE 802.11 Networking Stack' option in 2.6.20
kernel on another laptop. Therefor the ebuilds fails who compile. Who knows how
the remove this option in the 2.6.20 kernel?
Here's some additional info. I removed everything from Networking --->
Networking options ---> But still I can't remove the <M> Generic IEEE
802.11 Networking Stack I can even find the required option in .config:
#
# Networking
#
CONFIG_NET=y
But nowhere in menuconfig :@
Discription of Generic IEEE 802.11 Networking Stack:
CONFIG_IEEE80211:
│
│
│
│ This option enables the hardware independent IEEE 802.11
│
│ networking stack.
│
│
│
│ Symbol: IEEE80211 [=m]
│
│ Prompt: Generic IEEE 802.11 Networking Stack
│
│ Defined at net/ieee80211/Kconfig:1
│
│ Depends on: NET
│
│ Location:
│
│ -> Networking
│
│ -> Networking support (NET [=y])
│
│ Selected by: IPW2100 && NET && NETDEVICES && NET_RADIO && PCI ||
IPW2200 && NET && NETDEVICES && NET_RADIO && PCI || HOSTAP && NET && NETDEVICES
&& NET_RAD │
I applied Pauls patch and ebuild now but be my guest to submit a new patch if
you dont like it ..