When I try to compile the Linux 2.6.38 kernel on my Linux PC, I get:

$ make defconfig
$ make

I get:

ubuntu/ndiswrapper/iw_ndis.c:1966:2: error: unknown field ‘num_private’ specified in initializer
ubuntu/ndiswrapper/iw_ndis.c:1966:2: warning: initialization makes pointer from integer without a cast
ubuntu/ndiswrapper/iw_ndis.c:1967:2: error: unknown field ‘num_private_args’ specified in initializer
ubuntu/ndiswrapper/iw_ndis.c:1967:2: warning: excess elements in struct initializer
ubuntu/ndiswrapper/iw_ndis.c:1967:2: warning: (near initialization for ‘ndis_handler_def’)
ubuntu/ndiswrapper/iw_ndis.c:1970:2: error: unknown field ‘private’ specified in initializer
ubuntu/ndiswrapper/iw_ndis.c:1970:2: warning: initialization makes integer from pointer without a cast
ubuntu/ndiswrapper/iw_ndis.c:1970:2: error: initializer element is not computable at load time
ubuntu/ndiswrapper/iw_ndis.c:1970:2: error: (near initialization for ‘ndis_handler_def.num_standard’)
ubuntu/ndiswrapper/iw_ndis.c:1971:2: error: unknown field ‘private_args’ specified in initializer
ubuntu/ndiswrapper/iw_ndis.c:1971:26: warning: initialization from incompatible pointer type
make[2]: *** [ubuntu/ndiswrapper/iw_ndis.o] Error 1
make[1]: *** [ubuntu/ndiswrapper] Error 2
make: *** [ubuntu] Error 2

Any ideas how to solve this and why it happen with default configuration?

  • 3
    Can you detail the steps on how you got kernel 2.6.38 source on your system? The errors above seem to be related to ndiswrapper which I did not think was part of the official kernel. It could be possible that the version of ndiswrapper that's intertwined with the kernel source is not compatible with 2.6.38. Probably what you need to do is download a fresh copy of the source, complile and make sure the kernel is running OK, and then compile ndiswrapper from source. – LawrenceC Sep 25 '11 at 13:12
  • Cross-posted – Marco Ceppi Sep 26 '11 at 14:11

I just came across the same error when I pulled kernel source on an Oneiric host and tried to build it today.

You can look through the source file to pinpoint the root cause, but to cut to the chase, the config variable WEXT_PRIV is not set, so an include file that has those definitions is not included.

The Ubuntu kernel patch that adds this code is not perfect. My workaround was to find a wireless device in the list that would cause this config item to get selected. I didn't care what the device was since I wasn't going to use the driver, but it got CONFIG_WEXT_PRIV to be set in the .config file.

Quite at random from the available choices, I used Cisco/Aironet device. I haven't tested the kernel yet, but it does build correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.