From: "nekoyama32767 (Jinsong Yu) via ruby-core" Date: 2024-05-10T10:53:58+00:00 Subject: [ruby-core:117828] [Ruby master Bug#20480] Complie failure for unable to configure NET_LUID using msys2 mingw64-gcc Issue #20480 has been updated by nekoyama32767 (Jinsong Yu). File config.zip added nobu (Nobuyoshi Nakada) wrote in #note-1: > Could you share `AC_CHECK_TYPE([NET_LUID], ...)` part in your config.log? I see, maybe there is a compiler bug, produce a Segmentation fault in NET_LUID check ``` configure:13208: checking for NET_LUID configure:13208: cc -c -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT conftest.c >&5 conftest.c:54:1: internal compiler error: Segmentation fault 54 | } | ^ libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See for instructions. configure:13208: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define RUBY_ABI_VERSION 0 | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define STDC_HEADERS 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _HPUX_ALT_XOPEN_SOCKET_API 1 | #define _NETBSD_SOURCE 1 | #define _OPENBSD_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1 | #define __STDC_WANT_IEC_60559_EXT__ 1 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 | #define __STDC_WANT_LIB_EXT2__ 1 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1 | #define _TANDEM_SOURCE 1 | #define __EXTENSIONS__ 1 | #define RUBY_MSVCRT_VERSION 60 | #define RUBY_SYMBOL_EXPORT_BEGIN _Pragma("GCC visibility push(default)") | #define RUBY_SYMBOL_EXPORT_END _Pragma("GCC visibility pop") | #define HAVE_STMT_AND_DECL_IN_EXPR 1 | #define THREAD_IMPL_H "thread_win32.h" | #define THREAD_IMPL_SRC "thread_win32.c" | /* end confdefs.h. */ | #include | #include | | int | main (void) | { | if (sizeof (NET_LUID)) | return 0; | ; | return 0; | } ``` ---------------------------------------- Bug #20480: Complie failure for unable to configure NET_LUID using msys2 mingw64-gcc https://bugs.ruby-lang.org/issues/20480#change-108236 * Author: nekoyama32767 (Jinsong Yu) * Status: Open * ruby -v: ruby 3.4.0dev (2024-05-10T04:54:31Z master 2f915e729a) [x64-mingw32] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Master commit:`2f915e729ac8c66f4009f4b28a57773923d7e7d1` NET_LUID is not successfully checked in win32 configure. When try to compile in msys2 mingw64-gcc there will be a error message like follow. ``` win32/win32.c:4365:7: error: conflicting types for 'NET_LUID'; have 'struct ' 4365 | } NET_LUID; | ^~~~~~~~ In file included from D:/msys64/mingw64/include/iptypes.h:17, from D:/msys64/mingw64/include/iphlpapi.h:17, from ./include/ruby/win32.h:40, from ./include/ruby/internal/dosish.h:38, from ./include/ruby/defines.h:78, from ./include/ruby/ruby.h:25, from win32/win32.c:24: D:/msys64/mingw64/include/ifdef.h:106:3: note: previous declaration of 'NET_LUID' with type 'NET_LUID' 106 | } NET_LUID, *PNET_LUID; | ^~~~~~~~ ``` Mingw64-gcc has NET_LUID, when comment out line 4357-line 4367 in `win32/win32.c` in follow, compile will be successed. ``` #ifndef HAVE_TYPE_NET_LUID typedef struct { uint64_t Value; struct { uint64_t Reserved :24; uint64_t NetLuidIndex :24; uint64_t IfType :16; } Info; } NET_LUID; #endif ``` mingw64-gcc version ``` gcc --version gcc.exe (Rev4, Built by MSYS2 project) 13.2.0 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` ---Files-------------------------------- config.zip (68.4 KB) -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/