#39847 closed defect (fixed)
reaver @1.4 fails to build libwps.o
Reported by: | nonstop.server@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.3 |
Keywords: | leopard | Cc: | ryandesign (Ryan Carsten Schmidt) |
Port: | reaver |
Description
Reaver fails during build phase with error message:
gcc -Wall libwps.c -c In file included from libwps.c:14: libwps.h:50: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.h:50: error: syntax error before ‘*’ token libwps.h:129: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.h:129: error: syntax error before ‘*’ token libwps.h:130: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.h:130: error: syntax error before ‘*’ token libwps.h:131: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.h:131: error: syntax error before ‘*’ token libwps.h:132: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.h:132: error: syntax error before ‘*’ token libwps.h:133: error: syntax error before ‘*’ token libwps.h:133: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.h:133: error: syntax error before ‘*’ token libwps.h:133: warning: type defaults to ‘int’ in declaration of ‘libwps_radio_header’ libwps.h:133: warning: data definition has no type or storage class libwps.c:26: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.c:26: error: syntax error before ‘*’ token libwps.c: In function ‘parse_wps_parameters’: libwps.c:28: error: nested functions are disabled, use -fnested-functions to re-enable libwps.c:28: error: syntax error before ‘*’ token libwps.c:33: error: ‘wps’ undeclared (first use in this function) libwps.c:33: error: (Each undeclared identifier is reported only once libwps.c:33: error: for each function it appears in.) libwps.c:37: error: ‘len’ undeclared (first use in this function) libwps.c:41: error: ‘packet’ undeclared (first use in this function) libwps.c:44: error: ‘data’ undeclared (first use in this function) libwps.c: At top level: libwps.c:55: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.c:55: error: syntax error before ‘*’ token libwps.c: In function ‘parse_wps_tag’: libwps.c:81: error: ‘tags’ undeclared (first use in this function) libwps.c:81: error: ‘len’ undeclared (first use in this function) libwps.c:82: error: ‘wps’ undeclared (first use in this function) libwps.c: At top level: libwps.c:190: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.c:190: error: syntax error before ‘*’ token libwps.c: In function ‘get_wps_data’: libwps.c:197: error: ‘len’ undeclared (first use in this function) libwps.c:200: error: ‘data’ undeclared (first use in this function) libwps.c:222: error: ‘tag_len’ undeclared (first use in this function) libwps.c: At top level: libwps.c:234: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.c:234: error: syntax error before ‘*’ token libwps.c: In function ‘get_wps_data_element’: libwps.c:242: error: ‘len’ undeclared (first use in this function) libwps.c:244: error: ‘data’ undeclared (first use in this function) libwps.c:247: error: ‘type’ undeclared (first use in this function) libwps.c:257: error: ‘el_len’ undeclared (first use in this function) libwps.c: At top level: libwps.c:269: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.c:269: error: syntax error before ‘*’ token libwps.c: In function ‘libwps_has_rt_header’: libwps.c:274: error: ‘packet’ undeclared (first use in this function) libwps.c:278: error: ‘len’ undeclared (first use in this function) libwps.c: At top level: libwps.c:291: error: syntax error before ‘*’ token libwps.c:291: warning: type defaults to ‘int’ in declaration of ‘u_char’ libwps.c:291: error: syntax error before ‘*’ token libwps.c:292: warning: return type defaults to ‘int’ libwps.c: In function ‘libwps_radio_header’: libwps.c:293: error: ‘packet’ undeclared (first use in this function) libwps.c:293: error: ‘len’ undeclared (first use in this function) libwps.c:299: error: ‘u_char’ undeclared (first use in this function) libwps.c:299: error: syntax error before ‘)’ token libwps.c:302: warning: control reaches end of non-void function make[1]: *** [libwps.o] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_reaver/reaver/work/reaver-1.4/src/libwps' make: *** [libwps.o] Error 2
Version Information:
Mac OS Version: ProductName: Mac OS X ProductVersion: 10.5.8 BuildVersion: 9L31a Darwin 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 Xcode Version: Xcode 3.1.4 Component versions: DevToolsCore-1204.0; DevToolsSupport-1186.0 BuildVersion: 9M2809 Macports Version: Version: 2.1.3
Attachments (4)
Change History (10)
Changed 11 years ago by nonstop.server@…
Attachment: | main.log.bz2 added |
---|
comment:1 follow-ups: 2 3 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 11 years ago by nonstop.server@…
Replying to ryandesign@…:
Issue 524 has been filled at the reaver issue list.
I'm not sure they will accept the ticket since Linux seems to be the only supported OS for reaver.
Changed 11 years ago by nonstop.server@…
Attachment: | main_gcc-4.0.log.bz2 added |
---|
Changed 11 years ago by nonstop.server@…
Attachment: | main_gcc-4.8.log.bz2 added |
---|
Changed 11 years ago by nonstop.server@…
Attachment: | main_clang-3.3.log.bz2 added |
---|
comment:3 follow-up: 4 Changed 11 years ago by nonstop.server@…
Replying to ryandesign@…:
I got the following advice from the developer of reaver in Issue 524, but I'm not sure how to correctly implement such a change in a Portfile.
I see that your problem is missing or do not find Headers: stdlib.h, stdint.h, stdio.h, string.h. It may be that you have installed the SDK. (/ Developer / SDKs) specify the - sysroot flag to the compiler you also need to specify the MACOSX_DEPLOYMENT_TARGET environment variable. set (CMAKE_CXX_FLAGS "--sysroot $ {CMAKE_OSX_SYSROOT CMAKE_CXX_FLAGS} $ {}")
comment:4 follow-up: 5 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to nonstop.server@…:
Replying to ryandesign@…:
I got the following advice from the developer of reaver in Issue 524, but I'm not sure how to correctly implement such a change in a Portfile.
I see that your problem is missing or do not find Headers:
stdlib.h, stdint.h, stdio.h, string.h.
How was this determination reached? The log you attached says stdlib.h, stdint.h and string.h were found. There is no mention of stdio.h in the log.
The log says the problem is that u_char is undefined. /usr/include/sys/types.h is where u_char is defined. I don't see sys/types.h being #include
d in libwps.c or libwps.h.
It may be that you have installed the SDK. (/ Developer / SDKs)
SDKs are of course installed, since Xcode does so automatically. However MacPorts does not use an SDK, except when building universal on 10.4 on PowerPC, which is not the case here.
specify the - sysroot flag to the compiler
you also need to specify the MACOSX_DEPLOYMENT_TARGET environment variable.
MacPorts automatically sets MACOSX_DEPLOYMENT_TARGET for all ports.
set (CMAKE_CXX_FLAGS "--sysroot $ {CMAKE_OSX_SYSROOT CMAKE_CXX_FLAGS} $ {}")
Does not make sense since reaver 1.4 does not use cmake.
comment:5 follow-up: 6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to ryandesign@…:
The log says the problem is that u_char is undefined. /usr/include/sys/types.h is where u_char is defined. I don't see sys/types.h being
#include
d in libwps.c or libwps.h.
And that's all I needed to fix to get it to compile on Leopard. r108855
comment:6 Changed 11 years ago by nonstop.server@…
Replying to ryandesign@…:
Replying to ryandesign@…:
Thank you for the quick fix, the port installed just fine!
(I'll inform the developer of reaver on your solution.)
I just saw you already did that yourself. Thanks again man.
Confirmed. This should be reported to the developers of reaver.