Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: SiZiOUS <sizious@gmail.com>
To: Pedro Alves <palves@redhat.com>, Simon Marchi <simon.marchi@polymtl.ca>
Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
Subject: Re: [PATCH][PR build/23568] Fix gdb-7.12.1 MinGW/MSYS build issue
Date: Wed, 29 Aug 2018 21:07:00 -0000	[thread overview]
Message-ID: <e673959a-dabb-8221-7d9c-284fe4d0d457@gmail.com> (raw)
In-Reply-To: <b649f5c5-e18d-f13f-5623-d310f62f7d96@redhat.com>

First of all, thank for your time!
Also thanks for the explanation, you're right, I was thinking 7.12 was 
maintenance release of 7.11 and I understand that isn't the case.

Just for your information, I tried as requested to compile the current 
version of gdb (gdb-8.2.50.20180829), just to know the results.
It doesn't compile:

   CXX    ser-tcp.o
ser-tcp.c:43:21: fatal error: wspiapi.h: No such file or directory
  #include <wspiapi.h>
                      ^
compilation terminated.
make[2]: *** [ser-tcp.o] Error 1

I searched this file in my MinGW install but no luck, so I went to 
Internet and found something:
https://groups.google.com/forum/#!topic/wx-dev/mquqPOh8fFs

That file doesn't exist on MinGW, but exists on MinGW-w64.

According to the post above, I tried to fix the issue with:

#ifdef __MINGW32__
#include <ws2spi.h>
#else
#include <wspiapi.h>
#endif

But new errors are coming:

   CXX    ser-tcp.o
ser-tcp.c: In function 'int try_connect(const addrinfo*, unsigned int*)':
ser-tcp.c:171:39: error: invalid use of incomplete type 'const struct 
addrinfo'
    int sock = gdb_socket_cloexec (ainfo->ai_family, ainfo->ai_socktype,
                                        ^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
    explicit scoped_free_addrinfo (struct addrinfo *ainfo)
                                          ^~~~~~~~
ser-tcp.c:171:57: error: invalid use of incomplete type 'const struct 
addrinfo'
    int sock = gdb_socket_cloexec (ainfo->ai_family, ainfo->ai_socktype,
                                                          ^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
    explicit scoped_free_addrinfo (struct addrinfo *ainfo)
                                          ^~~~~~~~
ser-tcp.c:172:11: error: invalid use of incomplete type 'const struct 
addrinfo'
       ainfo->ai_protocol);
            ^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
    explicit scoped_free_addrinfo (struct addrinfo *ainfo)
                                          ^~~~~~~~
ser-tcp.c:188:27: error: invalid use of incomplete type 'const struct 
addrinfo'
    if (connect (sock, ainfo->ai_addr, ainfo->ai_addrlen) < 0)
                            ^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
    explicit scoped_free_addrinfo (struct addrinfo *ainfo)
                                          ^~~~~~~~
ser-tcp.c:188:43: error: invalid use of incomplete type 'const struct 
addrinfo'
    if (connect (sock, ainfo->ai_addr, ainfo->ai_addrlen) < 0)
                                            ^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
    explicit scoped_free_addrinfo (struct addrinfo *ainfo)
                                          ^~~~~~~~
ser-tcp.c: In function 'int net_open(serial*, const char*)':
ser-tcp.c:283:19: error: aggregate 'addrinfo hint' has incomplete type 
and cannot be defined
    struct addrinfo hint;
                    ^~~~
ser-tcp.c:300:23: error: 'getaddrinfo' was not declared in this scope
           &hint, &ainfo);
                        ^
ser-tcp.c:305:27: error: 'gai_strerror' was not declared in this scope
       name, gai_strerror (r));
                            ^
ser-tcp.c:327:68: error: invalid use of incomplete type 'struct addrinfo'
        for (struct addrinfo *iter = ainfo; iter != NULL; iter = 
iter->ai_next)
^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
    explicit scoped_free_addrinfo (struct addrinfo *ainfo)
                                          ^~~~~~~~
ser-tcp.c:378:20: error: invalid use of incomplete type 'struct addrinfo'
    if (success_ainfo->ai_protocol == IPPROTO_TCP)
                     ^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
    explicit scoped_free_addrinfo (struct addrinfo *ainfo)
                                          ^~~~~~~~
make[2]: *** [ser-tcp.o] Error 1

So this time, fixing GDB for MinGW is harder than 7.12.1.
Too tired to do that now.

Have a good night,
Mike Laranjeira (SiZiOUS)

Le 29/08/2018 à 20:27, Pedro Alves a écrit :
> On 08/29/2018 05:59 PM, SiZiOUS wrote:
>>
>> But in fact, GDB 7.11.1 is confirmed to work. As this version isn't compiling under MinGW for some reason, I updated to the latest 7.x version, and the only issue I had was this little build problem.
>> I've not tested GDB now, so I don't know if it's work or not with the Dreamcast.
>>
>> For the 8.x, I opened a bug about building on MinGW, but seems to be a similar reason.
> I think you're confused with GDB's release numbering.
> The set of 7.x releases are not all part of a single maintenance "gdb 7"
> tree/family. Likewise, set of 8.x releases are not all part of a
> single maintenance "gdb 8" tree/family.  I.e., 7.12 is not a maintenance
> release of 7.11.  7.11 is not a maintenance release of 7.10.  etc.
>
> GDB 7.12 was just as much of an increase over 7.11, as 8.0 was over 7.12.
> It just happened that when we got all the way up to "12" we though that
> that would be a good time to roll over to 8.0, because small numbers are
> nice.
>
> Maintenance bugfix releases are instead the z in x.y.z, as in
> 7.11.1, 7.11.2, etc.
>
> Currently, we're about to release gdb 8.2, so the 8.2.x branch
> in git is open for regression bugfixes.  Build fixes like yours
> would be a good fit too.  It's possible to merge fixes to older
> branches, but it's not very usual.  As we move on to newer
> releases, the older branches tend to become unmaintained.
>
> Thanks,
> Pedro Alves


  reply	other threads:[~2018-08-29 21:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 12:01 SiZiOUS
2018-08-28 16:57 ` Pedro Alves
2018-08-28 17:22   ` Eli Zaretskii
2018-08-28 22:19     ` SiZiOUS
2018-08-29  8:04       ` SiZiOUS
2018-09-09 20:06         ` Eli Zaretskii
     [not found]           ` <ddb12e03-7fc3-bf4b-cd24-235b43c33d38@gmail.com>
2018-12-02 13:52             ` SiZiOUS
2018-08-29 15:50       ` Simon Marchi
2018-08-29 16:19         ` Eli Zaretskii
2018-08-29 16:25         ` Tom Tromey
2018-08-29 17:01           ` SiZiOUS
2018-08-29 17:46           ` Pedro Alves
2018-08-29 16:59         ` SiZiOUS
2018-08-29 18:27           ` Pedro Alves
2018-08-29 21:07             ` SiZiOUS [this message]
2018-08-29 17:54         ` Pedro Alves
2018-08-29 18:09           ` Eli Zaretskii

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=e673959a-dabb-8221-7d9c-284fe4d0d457@gmail.com \
    --to=sizious@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    /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