[Goodies-dev] [Wavelan] compile error

Maximilian Schleiss maxschleiss at bluewin.ch
Sun Jan 7 23:57:52 CET 2007


James Westby wrote:
> On (07/01/07 22:57), Maximilian Schleiss wrote:
>   
>> Hi all,
>>
>> I try to compile the latest SVN version of the Wavelan plugin but when I 
>> do ./autogen.sh I get this message after a while:
>>
>> configure: WARNING: linux/wireless.h: present but cannot be compiled
>> configure: WARNING: linux/wireless.h:     check for missing prerequisite 
>> headers?
>> configure: WARNING: linux/wireless.h: see the Autoconf documentation
>> configure: WARNING: linux/wireless.h:     section "Present But Cannot Be 
>> Compiled"
>> configure: WARNING: linux/wireless.h: proceeding with the preprocessor's 
>> result
>> configure: WARNING: linux/wireless.h: in the future, the compiler will 
>> take precedence
>>     
>
> This is a change warning about a future change in the way autoconf will
> work, as it will break this plugin when they make the change.
>
> The problem is that if you create a test program that is just
>
>   #include <linux/wireless.h>
>
> then cpp will process it fine as it can find the file and include it.
> However gcc has a problem as it will find that some of the symbols are
> not found that are used in this file. This is in particular struct
> sockaddr which linux/wireless.h expects to get when it #includes
> linux/socket.h.
>
> However in that file the definition of struct sockaddr is surrounded by
> a #if that only defines it if it is being included by the kernel, or if
> an old version of glibc is being used. This is not the case here so the
> test program doesn't get the definition and so has a problem.
>
> The other place that struct sockaddr is defined is in sys/socket.h. This
> is the usual place to get it, and in fact panel-plugin/wi_linux.h
> #includes it before linux/wireless.h, and so struct sockaddr is defined
> and the plugin will compile and run fine.
>
> I wasn't too bothered about the warning as it all worked, but your post
> triggered me to look in to it, and writing this led me to the solution:
>
>   Get the test program used by autoconf to #include <sys/socket.h>
>   before linux/wireless.h.
>
> I have just committed this fix (2314), could you try it out and ensure that
> it works for you?
>
>   
The message disappeared but the compiling still stops with this error 
but that could be related to something else, maybe my xubuntu setup...

In file included from wi_linux.c:42:
/usr/include/linux/wireless.h:646: error: expected 
specifier-qualifier-list before ‘__s32’
/usr/include/linux/wireless.h:659: error: expected 
specifier-qualifier-list before ‘__u16’
/usr/include/linux/wireless.h:673: error: expected 
specifier-qualifier-list before ‘__s32’
/usr/include/linux/wireless.h:684: error: expected 
specifier-qualifier-list before ‘__u8’
/usr/include/linux/wireless.h:700: error: expected 
specifier-qualifier-list before ‘__u32’
/usr/include/linux/wireless.h:713: error: expected 
specifier-qualifier-list before ‘__u32’
/usr/include/linux/wireless.h:740: error: expected 
specifier-qualifier-list before ‘__u8’
/usr/include/linux/wireless.h:802: error: expected 
specifier-qualifier-list before ‘__u32’
/usr/include/linux/wireless.h:816: error: expected 
specifier-qualifier-list before ‘__u16’
/usr/include/linux/wireless.h:830: error: expected 
specifier-qualifier-list before ‘__u32’
/usr/include/linux/wireless.h:838: error: expected 
specifier-qualifier-list before ‘__u32’
/usr/include/linux/wireless.h:847: error: expected 
specifier-qualifier-list before ‘__u32’
/usr/include/linux/wireless.h:859: error: expected 
specifier-qualifier-list before ‘__u16’
/usr/include/linux/wireless.h:882: error: ‘IFNAMSIZ’ undeclared here 
(not in a function)
/usr/include/linux/wireless.h:897: error: expected 
specifier-qualifier-list before ‘__u32’
/usr/include/linux/wireless.h:941: error: expected 
specifier-qualifier-list before ‘__u32’
/usr/include/linux/wireless.h:1042: error: expected 
specifier-qualifier-list before ‘__u32’
/usr/include/linux/wireless.h:1060: error: expected 
specifier-qualifier-list before ‘__u16’
wi_linux.c: In function ‘wi_query’:
wi_linux.c:112: error: ‘struct iwreq’ has no member named ‘ifr_name’
wi_linux.c:116: error: ‘struct iw_point’ has no member named ‘length’
wi_linux.c:117: error: ‘struct iw_point’ has no member named ‘flags’
wi_linux.c:123: error: ‘struct iw_point’ has no member named ‘length’
wi_linux.c:134: error: ‘struct iw_param’ has no member named ‘value’
wi_linux.c:139: error: ‘union iwreq_data’ has no member named ‘data’
wi_linux.c:140: error: ‘union iwreq_data’ has no member named ‘data’
wi_linux.c:141: error: ‘union iwreq_data’ has no member named ‘data’
wi_linux.c:146: error: ‘struct iw_statistics’ has no member named ‘qual’
wi_linux.c:147: error: ‘struct iw_statistics’ has no member named ‘qual’
make[2]: *** [xfce4_wavelan_plugin-wi_linux.o] Error 1
make[2]: Leaving directory 
`/home/maximilian/newsvn/goodies/xfce4-wavelan-plugin/panel-plugin'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/home/maximilian/newsvn/goodies/xfce4-wavelan-plugin'
make: *** [all] Error 2

> Thanks,
>
>   
Thank you.

> James
>
>   
Max.



More information about the Goodies-dev mailing list