Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Saagar Jha <saagar@saagarjha.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Rename block.{h,c} to gdb-block.{h, c}
Date: Sun, 6 Sep 2020 22:27:29 -0700	[thread overview]
Message-ID: <7B84453A-73B3-4A9D-AD61-04EAF635F566@saagarjha.com> (raw)
In-Reply-To: <20200906195321.598e166c@f32-m1.lan>

Ok, so I was tinkering around with Travis some more (trying to fix other thing, which happened to be spurious) and got an email that the build passed; it turns out that Apple shipped that header for just a couple weeks until LLVM realized that this would break things: https://github.com/llvm/llvm-project/commit/19bc9ea480b60b607a3e303f20c7a3a2ea553369. Since they’ve rolled that out for now and Apple has pulled that into Xcode the build is green again on macOS, so there’s no need for this patch anymore. Travis should email me if the build breaks again, so hopefully the build gets fixed quicker now that it’s checked more often than me me taking a weekend looking at getting GDB working again, making some progress, then putting it down again :P

For completeness’s sake, here’s a sample error from the build:

In file included from common-debug.cc:20:
In file included from ./common-defs.h:123:
In file included from ./ptid.h:35:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:512:
In file included from ./../gdb/Block.h:23:
In file included from ./../gdb/dictionary.h:26:
In file included from ./../gdb/symfile.h:24:
In file included from ./../gdb/symtab.h:23:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/array:111:
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:1503:81: error: expected '(' for function-style cast or type construction
    return _VSTD::__search<typename add_lvalue_reference<_BinaryPredicate>::type>
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:1503:19: error: no member named '__search' in namespace 'std::__1'
    return _VSTD::__search<typename add_lvalue_reference<_BinaryPredicate>::type>
           ~~~~~~~^

You can see it go off the rails when <functional> includes GDB’s block.h instead of the system’s Block.h.

> On Sep 6, 2020, at 19:53, Kevin Buettner <kevinb@redhat.com> wrote:
> 
> On Sun, 6 Sep 2020 18:47:33 -0700
> Saagar Jha <saagar@saagarjha.com> wrote:
> 
>> macOS, by default, uses a case-insensitive filesystem and ships with a
>> header in its SDK (as part of Xcode) at /usr/include/Block.h.
>> <functional> from Xcode 12's SDK for macOS 11 includes this file but
>> due to GDB's compilation flags ends up including gdb/block.h. The
>> simplest solution to fix the resulting build errors is to just rename it
>> to something that doesn't conflict.
> 
> As you may have gathered in my reply to Simon, I'm not (yet) in favor
> of your renaming changes, but I would like to understand it better. 
> Could you provide additional details about where things go wrong?
> I.e. please show the error messages and code snippets from the
> relevant header files...
> 
> Thanks,
> 
> Kevin
> 



  reply	other threads:[~2020-09-07  5:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06  2:21 Saagar Jha
2020-09-06 11:52 ` Simon Marchi
2020-09-07  1:47   ` Saagar Jha
2020-09-07  2:53     ` Kevin Buettner
2020-09-07  5:27       ` Saagar Jha [this message]
2020-09-07  2:40   ` Kevin Buettner

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=7B84453A-73B3-4A9D-AD61-04EAF635F566@saagarjha.com \
    --to=saagar@saagarjha.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.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