Actions
Bug #10640
closedbuild fail with mingw-w64 gcc 4.9.2 due to configure NET_LUID check
Description
On my Win8.1 x64 system I get the following build fail when building ruby_2_1
and ruby_2_2
using a 32bit gcc 4.9.2 toolchain from the mingw-w64 project mingw-w64 32bit 4.9.2 toolchain
The build fail does not occur on ruby_2_0_0
. I have not tried building trunk
.
# build using overridden rubyinstaller build recipe
rake ruby21 make_opt=-j8 local=C:\Users\Jon\Documents\RubyDev\ruby-git openssl=1.0.1j libffi=3.2.1 rbreadline=0.5.1 dkver=mingw64-32-4.9.2
...
compiling ../../../ruby-git/win32/win32.c
../../../ruby-git/win32/win32.c:3889:7: error: conflicting types for 'NET_LUID'
} NET_LUID;
^
In file included from C:/Users/Jon/Documents/RubyDev/ri-git/sandbox/devkit/mingw/i686-w64-mingw32/include/iptypes.h:14:0,
from C:/Users/Jon/Documents/RubyDev/ri-git/sandbox/devkit/mingw/i686-w64-mingw32/include/iphlpapi.h:15,
from ../../../ruby-git/include/ruby/win32.h:41,
from ../../../ruby-git/include/ruby/defines.h:163,
from ../../../ruby-git/include/ruby/ruby.h:29,
from ../../../ruby-git/win32/win32.c:24:
C:/Users/Jon/Documents/RubyDev/ri-git/sandbox/devkit/mingw/i686-w64-mingw32/include/ifdef.h:93:3: note: previous declaration of 'NET_LUID' was here
} NET_LUID, *PNET_LUID;
^
Makefile:349: recipe for target 'win32/win32.o' failed
make: *** [win32/win32.o] Error 1
The following patch fixes the mingw-w64 build, but I have not tested it using a mingw.org based toolchain. Given nobu's commit comment I suspect this simple patch is not applicable to both mingw-w64 and mingw.org toolchains due to header file differences.
diff --git a/configure.in b/configure.in
index e132076..4a25dde 100644
--- a/configure.in
+++ b/configure.in
@@ -1103,7 +1103,7 @@ main()
{ test "$target_cpu" = x64 && ac_cv_func___builtin_setjmp=no; }
AC_CHECK_TYPE([NET_LUID], [], [],
[@%:@include <windows.h>
- @%:@include <iphlpapi.h>])
+ @%:@include <ifdef.h>])
if test x"$ac_cv_type_NET_LUID" = xyes; then
AC_DEFINE(HAVE_TYPE_NET_LUID, 1)
fi
Actions
Like0
Like0Like0Like0Like0Like0Like0