public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: GDB Patches <gdb-patches@sourceware.org>, Tom Tromey <tom@tromey.com>
Subject: Re: GDB AIX build broken
Date: Mon, 24 Oct 2016 23:00:00 -0000	[thread overview]
Message-ID: <01ba546d-060d-8591-9c5a-84d4bda2af22@redhat.com> (raw)
In-Reply-To: <CAGWvny=MpD1Tk9RqXrbAFCecv=hkTyROpSEuvg895wcsuKzU8Q@mail.gmail.com>

On 10/24/2016 11:52 PM, David Edelsohn wrote:
> On Mon, Oct 24, 2016 at 6:46 PM, Pedro Alves <palves@redhat.com> wrote:
>> [fixed Tom's address]
>>
>> On 10/24/2016 11:40 PM, David Edelsohn wrote:
>>> GDB build on AIX is broken due to a recent commit.
>>>
>>
>> Which commit?  Maybe the gnulib update?  Is this a clean
>> build from scratch?
> 
> I have no idea which commit.  

git bisect will tell.

> It probably was a bad idea to completely
> disrupt the GDB Buildbots while disruptively converting GDB to C++.

It's probably a bad idea to speculate and throw blame around.

> 
>>
>>> /home/dje/src/binutils-gdb/gdb/common/buffer.c
>>> /home/dje/src/binutils-gdb/gdb/common/buffer.c: In function 'void
>>> buffer_xml_printf(buffer*, const char*, ...)':
>>> /home/dje/src/binutils-gdb/gdb/common/buffer.c:133:27: error: expected
>>> ')' before 'PRId64'
>>>          sprintf (str, "%" PRId64,
>>>                            ^~~~~~
>>
>>> Errors with PRIxxx macros normally mean a problem with header file
>>> inclusion.  for example, gdb/btrace.c, which also uses PRIxxx macros,
>>> builds without error.
>>
>> Sounds like what you'd get if PRId64 is not defined in that
>> compilation unit, somehow.
> 
> First, strangely, gdb/common/buffer.c uses
> 
> #include "inttypes.h"
> 
> with quotes, not brackets.  I can't find a local definition of that header file.
> 
> It seems to be much happier with <inttypes.h> included first
> 
> diff --git a/gdb/common/buffer.c b/gdb/common/buffer.c
> index e9eee09..a989024 100644
> --- a/gdb/common/buffer.c
> +++ b/gdb/common/buffer.c
> @@ -17,10 +17,10 @@
>     You should have received a copy of the GNU General Public License
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> 
> +#include <inttypes.h>
>  #include "common-defs.h"
>  #include "xml-utils.h"
>  #include "buffer.h"
> -#include "inttypes.h"

That's a hint, but it can't be the fix.  common-defs.h must be the
first file included.  I suspect that gnulib's inttypes.h
replacement logic is broken on AIX.

Thanks,
Pedro Alves

  reply	other threads:[~2016-10-24 23:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 22:40 David Edelsohn
2016-10-24 22:46 ` Pedro Alves
2016-10-24 22:53   ` David Edelsohn
2016-10-24 23:00     ` Pedro Alves [this message]
2016-10-25  0:13       ` David Edelsohn
2016-10-25  0:31         ` Pedro Alves
2016-10-25  0:50           ` Pedro Alves
2016-10-25  1:08             ` David Edelsohn
2016-10-25  1:22               ` Pedro Alves
2016-10-25 10:58                 ` [pushed] Define __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS again (Re: GDB AIX build broken) Pedro Alves
2016-10-25 12:41                   ` David Edelsohn
2016-10-25 12:48                     ` Pedro Alves
2016-10-25 12:54                       ` [pushed] common/common-defs.h: Define __STDC_FORMAT_MACROS as well " Pedro Alves
2016-10-25 13:01                         ` David Edelsohn
2016-10-25  0:51           ` GDB AIX build broken David Edelsohn
2016-10-25  1:10             ` Pedro Alves

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=01ba546d-060d-8591-9c5a-84d4bda2af22@redhat.com \
    --to=palves@redhat.com \
    --cc=dje.gcc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).