ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "nobu (Nobuyoshi Nakada) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "nobu (Nobuyoshi Nakada)" <noreply@ruby-lang.org>
Subject: [ruby-core:117827] [Ruby master Bug#20480] Complie failure for unable to configure NET_LUID using msys2 mingw64-gcc
Date: Fri, 10 May 2024 09:31:56 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-108235.20240510093156.51663@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-20480.20240510083401.51663@ruby-lang.org>

Issue #20480 has been updated by nobu (Nobuyoshi Nakada).


Could you share `AC_CHECK_TYPE([NET_LUID], ...)` part in your config.log?

----------------------------------------
Bug #20480: Complie failure for unable to configure NET_LUID using msys2 mingw64-gcc
https://bugs.ruby-lang.org/issues/20480#change-108235

* 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 <anonymous>'
 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.
```




-- 
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/

  reply	other threads:[~2024-05-10  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10  8:34 [ruby-core:117826] " nekoyama32767 (Jinsong Yu) via ruby-core
2024-05-10  9:31 ` nobu (Nobuyoshi Nakada) via ruby-core [this message]
2024-05-10 10:53 ` [ruby-core:117828] " nekoyama32767 (Jinsong Yu) via ruby-core
2025-01-10  3:52 ` [ruby-core:120593] " nekoyama32767 (Jinsong Yu) via ruby-core

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-108235.20240510093156.51663@ruby-lang.org \
    --to=ruby-core@ml.ruby-lang.org \
    --cc=noreply@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).