2012-02-01 19:39:59

by Alfonso Fiore

[permalink] [raw]
Subject: can't compile latest compat-wireless under kernel 3.2 even using git

Hi,

I tried to download and compile compat-wireless from git:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git clone git://github.com/mcgrof/compat.git
git clone git://github.com/mcgrof/compat-wireless.git

export GIT_TREE=/storage/wireless/linux-next/
export GIT_COMPAT_TREE=/storage/wireless/compat/

cd compat-wireless-2.6

./scripts/admin-clean.sh
./scripts/admin-update.sh (this command is successful)
./scripts/driver-select
./scripts/driver-select rt2x00

make

I get the "same" error:

$ make
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/3.2.0-interlaced2+/build
M=/storage/wireless/compat-wireless modules
make[1]: Entering directory `/home/alfonso/tests/kernel/linux_keithp'
LD /storage/wireless/compat-wireless/compat/built-in.o
CC [M] /storage/wireless/compat-wireless/compat/main.o
In file included from
/storage/wireless/compat-wireless/include/linux/compat-2.6.h:40:0,
from <command-line>:0:
/storage/wireless/compat-wireless/include/linux/compat-3.3.h:11:20:
error: static declaration of ?skb_complete_wifi_ack? follows
non-static declaration
include/linux/skbuff.h:2260:6: note: previous declaration of
?skb_complete_wifi_ack? was here
/storage/wireless/compat-wireless/include/linux/compat-3.3.h:17:13:
error: conflicting types for ?netdev_features_t?
include/linux/netdev_features.h:15:13: note: previous declaration of
?netdev_features_t? was here
make[3]: *** [/storage/wireless/compat-wireless/compat/main.o] Error 1
make[2]: *** [/storage/wireless/compat-wireless/compat] Error 2
make[1]: *** [_module_/storage/wireless/compat-wireless] Error 2
make[1]: Leaving directory `/home/alfonso/tests/kernel/linux_keithp'
make: *** [modules] Error 2

Any help is greatly appreciated.

regards,
alfonso


2012-02-01 20:16:17

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: can't compile latest compat-wireless under kernel 3.2 even using git

On 02/01/2012 08:32 PM, Alfonso Fiore wrote:
> Hi,
>
> I tried to download and compile compat-wireless from git:
>
> git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git clone git://github.com/mcgrof/compat.git
> git clone git://github.com/mcgrof/compat-wireless.git
>
> export GIT_TREE=/storage/wireless/linux-next/
> export GIT_COMPAT_TREE=/storage/wireless/compat/
>
> cd compat-wireless-2.6
>
> ./scripts/admin-clean.sh
> ./scripts/admin-update.sh (this command is successful)
> ./scripts/driver-select
> ./scripts/driver-select rt2x00
This is all correct.
>
> make
>
> I get the "same" error:
>
> $ make
> ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
> make -C /lib/modules/3.2.0-interlaced2+/build
> M=/storage/wireless/compat-wireless modules
> make[1]: Entering directory `/home/alfonso/tests/kernel/linux_keithp'
> LD /storage/wireless/compat-wireless/compat/built-in.o
> CC [M] /storage/wireless/compat-wireless/compat/main.o
> In file included from
> /storage/wireless/compat-wireless/include/linux/compat-2.6.h:40:0,
> from <command-line>:0:
> /storage/wireless/compat-wireless/include/linux/compat-3.3.h:11:20:
> error: static declaration of ?skb_complete_wifi_ack? follows
> non-static declaration
> include/linux/skbuff.h:2260:6: note: previous declaration of
> ?skb_complete_wifi_ack? was here
> /storage/wireless/compat-wireless/include/linux/compat-3.3.h:17:13:
> error: conflicting types for ?netdev_features_t?
> include/linux/netdev_features.h:15:13: note: previous declaration of
> ?netdev_features_t? was here
> make[3]: *** [/storage/wireless/compat-wireless/compat/main.o] Error 1
> make[2]: *** [/storage/wireless/compat-wireless/compat] Error 2
> make[1]: *** [_module_/storage/wireless/compat-wireless] Error 2
> make[1]: Leaving directory `/home/alfonso/tests/kernel/linux_keithp'
> make: *** [modules] Error 2
>
> Any help is greatly appreciated.
>
> regards,
> alfonso
What kernel are you compiling against? skb_complete_wifi_ack() is not
declared in linux kernel 3.2.2, just in 3.3-rc2. It looks like the
kernel you are compiling against has some modifications conflicting with
compat-wireless.

Hauke

2012-02-02 18:23:14

by Alfonso Fiore

[permalink] [raw]
Subject: Re: can't compile latest compat-wireless under kernel 3.2 even using git

On Wed, Feb 1, 2012 at 9:16 PM, Hauke Mehrtens <[email protected]> wrote:
>
> What kernel are you compiling against? skb_complete_wifi_ack() is not
> declared in linux kernel 3.2.2, just in 3.3-rc2. It looks like the
> kernel you are compiling against has some modifications conflicting with
> compat-wireless.

With some tricks I managed to compile compat-wireless against my
custom kernel, but that didn't solve my problem. Apparently when I
thought the latest compat-wireless fixed my problem I was wrong, it
was just a random glitch.
Or most probably I completely screwed up my drivers by juggling two kernels.
Anyway, I booted with 3.0.0-15, recompiled (with make clean) both
(rebooting each time) compat-wireless-3.3-rc1-2 and
compat-wireless-2012-01-26 and I still get a very limited performance
over wireless (max 300 KB/sec).

*** Is there a chance to activate some logging that could give you an idea
on why my wireless is not performing? ***

Twice, randomly, I've seen it going as fast as wired (accessing the
internet) so I imagine it's something than can be fixed.
I also test both speedtest.net and wget from a local mirror, so it's
not a fluctuating link.

In case you wonder how I compiled the git version of compat-wireless
for my custom kernel, here is how (and it works, but with the same
sub-standard performances as compat-wireless-2012-01-26 under 3.0.0):

Ok so first I compiled linux-next:

cd linux-next/
cp /boot/config-3.0.0-15-generic-pae .config
yes '' | make oldconfig
make-kpkg clean
CONCURRENCY_LEVEL=`getconf _NPROCESSORS_ONLN` fakeroot make-kpkg
--initrd --append-to-version=-linux-next kernel_image kernel_headers

then I went into my current kernel and changed links:

cd /lib/modules/3.2.0-interlaced2+
sudo mv source source_true
sudo mv build build_true
sudo ln -s /storage/wireless/linux-next source
sudo ln -s /storage/wireless/linux-next build

then I compiled compat-wireless

cd /storage/wireless/compat-wireless/
make clean
make (compilation went well)

then put back the links:

cd /lib/modules/3.2.0-interlaced2+
sudo mv build_true build
sudo mv source_true source

and installed compat-wireless:
cd /storage/wireless/compat-wireless/
sudo make install

thanks for any idea,
alfonso

2012-02-02 21:43:03

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: can't compile latest compat-wireless under kernel 3.2 even using git

On 02/02/2012 07:22 PM, Alfonso Fiore wrote:
> On Wed, Feb 1, 2012 at 9:16 PM, Hauke Mehrtens <[email protected]> wrote:
>>
>> What kernel are you compiling against? skb_complete_wifi_ack() is not
>> declared in linux kernel 3.2.2, just in 3.3-rc2. It looks like the
>> kernel you are compiling against has some modifications conflicting with
>> compat-wireless.
>
> With some tricks I managed to compile compat-wireless against my
> custom kernel, but that didn't solve my problem. Apparently when I
> thought the latest compat-wireless fixed my problem I was wrong, it
> was just a random glitch.
> Or most probably I completely screwed up my drivers by juggling two kernels.
> Anyway, I booted with 3.0.0-15, recompiled (with make clean) both
> (rebooting each time) compat-wireless-3.3-rc1-2 and
> compat-wireless-2012-01-26 and I still get a very limited performance
> over wireless (max 300 KB/sec).
>
> *** Is there a chance to activate some logging that could give you an idea
> on why my wireless is not performing? ***
Most drivers and the wireless subsystem itself have some config otpions
to activate debug output. Search in the config.mk in compat-wirless for
the debug options for your devicve and activate them by editing
config.mk and rebuilding compat-wireless

> Twice, randomly, I've seen it going as fast as wired (accessing the
> internet) so I imagine it's something than can be fixed.
> I also test both speedtest.net and wget from a local mirror, so it's
> not a fluctuating link.
Now it is interestingly to know what Wifi device you are using and what
Access point.
>
> In case you wonder how I compiled the git version of compat-wireless
> for my custom kernel, here is how (and it works, but with the same
> sub-standard performances as compat-wireless-2012-01-26 under 3.0.0):
>
> Ok so first I compiled linux-next:
>
> cd linux-next/
> cp /boot/config-3.0.0-15-generic-pae .config
> yes '' | make oldconfig
> make-kpkg clean
> CONCURRENCY_LEVEL=`getconf _NPROCESSORS_ONLN` fakeroot make-kpkg
> --initrd --append-to-version=-linux-next kernel_image kernel_headers
>
> then I went into my current kernel and changed links:
>
> cd /lib/modules/3.2.0-interlaced2+
> sudo mv source source_true
> sudo mv build build_true
> sudo ln -s /storage/wireless/linux-next source
> sudo ln -s /storage/wireless/linux-next build
>
> then I compiled compat-wireless
>
> cd /storage/wireless/compat-wireless/
> make clean
> make (compilation went well)
>
> then put back the links:
>
> cd /lib/modules/3.2.0-interlaced2+
> sudo mv build_true build
> sudo mv source_true source
>
> and installed compat-wireless:
> cd /storage/wireless/compat-wireless/
> sudo make install
That looks bad.
The easiest and safest ways would be to remove the skb_complete_wifi_ack
backport from include/linux/compat-3.3.h in compat-wireless.

Hauke