public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
@ 2020-08-07  8:02 vries at gcc dot gnu.org
  2020-08-07  8:04 ` [Bug build/26344] " vries at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2020-08-07  8:02 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

            Bug ID: 26344
           Summary: [build, gcc 4.8] error: no matching function for call
                    to 'std::pair<const riscv_gdbarch_features, const
                    std::unique_ptr<target_desc, target_desc_deleter>
                    >::pair(const riscv_gdbarch_features&, target_desc*&)'
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

src/gdb/arch/riscv.c:112:45:   required from here
/usr/include/c++/4.8/bits/hashtable_policy.h:195:39: error: no matching
function for call to 'std::pair<const riscv_gdbarch_features, const
std::unique_ptr<target_desc, target_desc_deleter> >::pair(const
riscv_gdbarch_features&, target_desc*&)'
  : _M_v(std::forward<_Args>(__args)...) { }
                                       ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug build/26344] [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
  2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
@ 2020-08-07  8:04 ` vries at gcc dot gnu.org
  2020-08-07  9:25 ` vries at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2020-08-07  8:04 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrew.burgess at embecosm dot com
                   |                            |, palmer at dabbelt dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug build/26344] [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
  2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
  2020-08-07  8:04 ` [Bug build/26344] " vries at gcc dot gnu.org
@ 2020-08-07  9:25 ` vries at gcc dot gnu.org
  2020-08-07 10:01 ` andrew.burgess at embecosm dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2020-08-07  9:25 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative fix:
...
diff --git a/gdb/arch/riscv.c b/gdb/arch/riscv.c
index e43aafc1c2..dbedb99c94 100644
--- a/gdb/arch/riscv.c
+++ b/gdb/arch/riscv.c
@@ -109,7 +109,7 @@ riscv_lookup_target_description (const struct
riscv_gdbarch_featur
es features)
   target_desc *tdesc = riscv_create_target_description (features);

   /* Add to the cache.  */
-  riscv_tdesc_cache.emplace (features, tdesc);
+  riscv_tdesc_cache.emplace (features, target_desc_up (tdesc));

   return tdesc;
 }
...

Looks somewhat similar to commit 6d0cf4464e "Fix build with gcc-4.8.x".

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug build/26344] [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
  2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
  2020-08-07  8:04 ` [Bug build/26344] " vries at gcc dot gnu.org
  2020-08-07  9:25 ` vries at gcc dot gnu.org
@ 2020-08-07 10:01 ` andrew.burgess at embecosm dot com
  2020-08-07 10:02 ` andrew.burgess at embecosm dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: andrew.burgess at embecosm dot com @ 2020-08-07 10:01 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

--- Comment #2 from Andrew Burgess <andrew.burgess at embecosm dot com> ---
I have this patch here:
  https://sourceware.org/pipermail/gdb-patches/2020-July/170639.html

that I'd completely forgotten about.  I don't know if this applies cleanly to
head still, but it looks like it should fix the issue... maybe.

I can rebase and test this if you'd be happy for this to go in instead?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug build/26344] [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
  2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-08-07 10:01 ` andrew.burgess at embecosm dot com
@ 2020-08-07 10:02 ` andrew.burgess at embecosm dot com
  2020-08-07 11:35 ` vries at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: andrew.burgess at embecosm dot com @ 2020-08-07 10:02 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

--- Comment #3 from Andrew Burgess <andrew.burgess at embecosm dot com> ---
I should have said, your patch looks fine if we only wanted to fix RISC-V.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug build/26344] [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
  2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-08-07 10:02 ` andrew.burgess at embecosm dot com
@ 2020-08-07 11:35 ` vries at gcc dot gnu.org
  2020-08-08 17:14 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2020-08-07 11:35 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Andrew Burgess from comment #3)
> I should have said, your patch looks fine if we only wanted to fix RISC-V.

AFAICT the problem reported in this issue only happens in riscv.c (I should
probably try this gdb_mbuild.sh that I heard about recently to know for sure).

(In reply to Andrew Burgess from comment #2)
> I have this patch here:
>   https://sourceware.org/pipermail/gdb-patches/2020-July/170639.html
> 
> that I'd completely forgotten about.  I don't know if this applies cleanly
> to head still,

It does.

> but it looks like it should fix the issue... maybe.
> 

I checked, and it does fix the build.

> I can rebase and test this if you'd be happy for this to go in instead?

I'd rather commit this minimal workaround first.

That said, I've looked at your patch, and it looks ok to me.  I'm not sure if
timingwise is makes sense to wait after gdb-10 branching to commit this, just a
thought.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug build/26344] [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
  2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-08-07 11:35 ` vries at gcc dot gnu.org
@ 2020-08-08 17:14 ` vries at gcc dot gnu.org
  2020-08-08 21:34 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2020-08-08 17:14 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simark at simark dot ca

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Hmm, commit 888bdb2b74 "gdb: change regcache list to be a map" just introduced
another occurrence.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug build/26344] [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
  2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-08-08 17:14 ` vries at gcc dot gnu.org
@ 2020-08-08 21:34 ` cvs-commit at gcc dot gnu.org
  2020-08-08 21:36 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-08 21:34 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=38f8aa06d9c422934e635779783107c0d3be419a

commit 38f8aa06d9c422934e635779783107c0d3be419a
Author: Tom de Vries <tdevries@suse.de>
Date:   Sat Aug 8 23:34:19 2020 +0200

    [gdb/build] Fix missing implicit constructor call with gcc 4.8

    When building gdb on x86_64-linux with --enable-targets riscv64-suse-linux,
I
    run into:
    ...
    src/gdb/arch/riscv.c:112:45:   required from here
    /usr/include/c++/4.8/bits/hashtable_policy.h:195:39: error: no matching \
      function for call to 'std::pair<const riscv_gdbarch_features, const \
      std::unique_ptr<target_desc, target_desc_deleter> >::pair(const \
      riscv_gdbarch_features&, target_desc*&)'
      : _M_v(std::forward<_Args>(__args)...) { }
                                           ^
    ...
    for this code in riscv_lookup_target_description:
    ...
      /* Add to the cache.  */
      riscv_tdesc_cache.emplace (features, tdesc);
    ...

    Work around this compiler problem (filed as PR gcc/96537), similar to how
that
    was done in commit 6d0cf4464e "Fix build with gcc-4.8.x":
    ...
    -  riscv_tdesc_cache.emplace (features, tdesc);
    +  riscv_tdesc_cache.emplace (features, target_desc_up (tdesc));
    ...
    That is, call the target_desc_up constructor explictly instead of
implicitly.

    Also, work around a similar issue in get_thread_arch_aspace_regcache.

    Build on x86_64-linux with --enable-targets riscv64-suse-linux, and
    reg-tested.

    gdb/ChangeLog:

    2020-08-08  Tom de Vries  <tdevries@suse.de>

            PR build/26344
            * arch/riscv.c (riscv_lookup_target_description): Use an explicit
            constructor.
            * regcache.c (get_thread_arch_aspace_regcache): Same.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug build/26344] [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
  2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-08-08 21:34 ` cvs-commit at gcc dot gnu.org
@ 2020-08-08 21:36 ` vries at gcc dot gnu.org
  2020-08-10 11:55 ` vries at gcc dot gnu.org
  2020-08-10 12:55 ` simark at simark dot ca
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2020-08-08 21:36 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
Patch fixing build with gcc 4.8 committed, marking resolved-fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug build/26344] [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
  2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2020-08-08 21:36 ` vries at gcc dot gnu.org
@ 2020-08-10 11:55 ` vries at gcc dot gnu.org
  2020-08-10 12:55 ` simark at simark dot ca
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2020-08-10 11:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to cvs-commit@gcc.gnu.org from comment #6)
>     Work around this compiler problem (filed as PR gcc/96537),

FTR, the gcc PR was marked as invalid.

The fact that the code compiles with g++-7.5.0 -std=c++11, and doesn't with
g++-4.8.5 -std=c++11 doesn't indicate a bug in g++-4.8.5, but that a language
update ( http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4387 ) was
retroactively applied to older standard modes in g++-7.5.0.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug build/26344] [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)'
  2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2020-08-10 11:55 ` vries at gcc dot gnu.org
@ 2020-08-10 12:55 ` simark at simark dot ca
  9 siblings, 0 replies; 11+ messages in thread
From: simark at simark dot ca @ 2020-08-10 12:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26344

--- Comment #9 from Simon Marchi <simark at simark dot ca> ---
Ok, thanks for investigating and fixing it.  At least, it's easy to please all
compilers.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-08-10 12:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07  8:02 [Bug build/26344] New: [build, gcc 4.8] error: no matching function for call to 'std::pair<const riscv_gdbarch_features, const std::unique_ptr<target_desc, target_desc_deleter> >::pair(const riscv_gdbarch_features&, target_desc*&)' vries at gcc dot gnu.org
2020-08-07  8:04 ` [Bug build/26344] " vries at gcc dot gnu.org
2020-08-07  9:25 ` vries at gcc dot gnu.org
2020-08-07 10:01 ` andrew.burgess at embecosm dot com
2020-08-07 10:02 ` andrew.burgess at embecosm dot com
2020-08-07 11:35 ` vries at gcc dot gnu.org
2020-08-08 17:14 ` vries at gcc dot gnu.org
2020-08-08 21:34 ` cvs-commit at gcc dot gnu.org
2020-08-08 21:36 ` vries at gcc dot gnu.org
2020-08-10 11:55 ` vries at gcc dot gnu.org
2020-08-10 12:55 ` simark at simark dot ca

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).