public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* libstdc++-v3 failing to compile due to no matching function for call to ‘operator new(sizetype, sizetype)
@ 2022-05-02  9:20 Zopolis0
  2022-05-02  9:29 ` Xi Ruoyao
  0 siblings, 1 reply; 7+ messages in thread
From: Zopolis0 @ 2022-05-02  9:20 UTC (permalink / raw)
  To: gcc-help

While trying to compile gcj, it breaks on a number of errors, many of which
are along the lines of "no matching function for call to ‘operator
new(sizetype, sizetype)". However, I have not touched this code, and this
error does not appear on another branch which is a few months back from
master. This leads me to believe that this is an error present on master,
although I have not yet been able to locate the breaking commit. (Example
of one such error:)
In file included from
/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_classes.h:857,
                 from
/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ios_base.h:41,
                 from
/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libstdc++-v3/include/ios:42,
                 from
/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libstdc++-v3/include/istream:38,
                 from
/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libstdc++-v3/include/sstream:38,
                 from
/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libstdc++-v3/include/complex:45,
                 from
/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libstdc++-v3/include/ccomplex:39,
                 from
/home/zopolis4/gcj/libstdc++-v3/include/precompiled/stdc++.h:54:
/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_classes.tcc:
In constructor ‘std::locale::locale(const std::locale&, _Facet*)’:
/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_classes.tcc:47:46:
error: no matching function for call to ‘operator new(sizetype, sizetype)’
   47 |       _M_impl = new _Impl(*__other._M_impl, 1);
      |                                              ^

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

* Re: libstdc++-v3 failing to compile due to no matching function for call to ‘operator new(sizetype, sizetype)
  2022-05-02  9:20 libstdc++-v3 failing to compile due to no matching function for call to ‘operator new(sizetype, sizetype) Zopolis0
@ 2022-05-02  9:29 ` Xi Ruoyao
  2022-05-02 10:02   ` Zopolis0
  0 siblings, 1 reply; 7+ messages in thread
From: Xi Ruoyao @ 2022-05-02  9:29 UTC (permalink / raw)
  To: Zopolis0, gcc-help

On Mon, 2022-05-02 at 19:20 +1000, Zopolis0 via Gcc-help wrote:
> While trying to compile gcj, it breaks on a number of errors, many of which
> are along the lines of "no matching function for call to ‘operator
> new(sizetype, sizetype)". However, I have not touched this code, and this
> error does not appear on another branch which is a few months back from
> master. This leads me to believe that this is an error present on master,
> although I have not yet been able to locate the breaking commit. (Example
> of one such error:)

Don't guess.  Just build the unmodified trunk and if it fails reports to
https://gcc.gnu.org/bugzilla.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

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

* Re: libstdc++-v3 failing to compile due to no matching function for call to ‘operator new(sizetype, sizetype)
  2022-05-02  9:29 ` Xi Ruoyao
@ 2022-05-02 10:02   ` Zopolis0
  2022-05-02 10:24     ` Xi Ruoyao
  0 siblings, 1 reply; 7+ messages in thread
From: Zopolis0 @ 2022-05-02 10:02 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: gcc-help

The thing is, that builds fine, but I havent changed anything to do
with libstdc++-v3.

On Mon, May 2, 2022 at 7:29 PM Xi Ruoyao <xry111@mengyan1223.wang> wrote:

> On Mon, 2022-05-02 at 19:20 +1000, Zopolis0 via Gcc-help wrote:
> > While trying to compile gcj, it breaks on a number of errors, many of
> which
> > are along the lines of "no matching function for call to ‘operator
> > new(sizetype, sizetype)". However, I have not touched this code, and this
> > error does not appear on another branch which is a few months back from
> > master. This leads me to believe that this is an error present on master,
> > although I have not yet been able to locate the breaking commit. (Example
> > of one such error:)
>
> Don't guess.  Just build the unmodified trunk and if it fails reports to
> https://gcc.gnu.org/bugzilla.
> --
> Xi Ruoyao <xry111@mengyan1223.wang>
> School of Aerospace Science and Technology, Xidian University
>

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

* Re: libstdc++-v3 failing to compile due to no matching function for call to ‘operator new(sizetype, sizetype)
  2022-05-02 10:02   ` Zopolis0
@ 2022-05-02 10:24     ` Xi Ruoyao
  2022-05-02 12:07       ` Zopolis0
  0 siblings, 1 reply; 7+ messages in thread
From: Xi Ruoyao @ 2022-05-02 10:24 UTC (permalink / raw)
  To: Zopolis0; +Cc: gcc-help

On Mon, 2022-05-02 at 20:02 +1000, Zopolis0 wrote:
> The thing is, that builds fine, but I havent changed anything to do
> with libstdc++-v3.

Then maybe you've modified some compiler code common for languages and
cause GCC to misbehave on libstdc++ code (then stage 1 libstdc++ fails),
or maybe it causes GCC to miscompile itself and generate a compiler
misbehaving on libstdc++ code (so stage 2 libstdc++ fails).  Or maybe
some modification to the building system causes libstdc++ built with
wrong CXXFLAGS.  Who knows?  We have no idea how the code is modified.

> On Mon, May 2, 2022 at 7:29 PM Xi Ruoyao <xry111@mengyan1223.wang>
> wrote:
> > On Mon, 2022-05-02 at 19:20 +1000, Zopolis0 via Gcc-help wrote:
> > > While trying to compile gcj, it breaks on a number of errors, many
> > > of which
> > > are along the lines of "no matching function for call to ‘operator
> > > new(sizetype, sizetype)". However, I have not touched this code,
> > > and this
> > > error does not appear on another branch which is a few months back
> > > from
> > > master. This leads me to believe that this is an error present on
> > > master,
> > > although I have not yet been able to locate the breaking commit.
> > > (Example
> > > of one such error:)
> > 
> > Don't guess.  Just build the unmodified trunk and if it fails
> > reports to
> > https://gcc.gnu.org/bugzilla.

-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

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

* Re: libstdc++-v3 failing to compile due to no matching function for call to ‘operator new(sizetype, sizetype)
  2022-05-02 10:24     ` Xi Ruoyao
@ 2022-05-02 12:07       ` Zopolis0
  2022-05-02 12:42         ` Xi Ruoyao
  0 siblings, 1 reply; 7+ messages in thread
From: Zopolis0 @ 2022-05-02 12:07 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: gcc-help

I've bisected the issue (which still happens with only
--enable-languages=c,c++ instead of --enable-languages=java),
and 0a0c2c3f06227d46b5e9542dfdd4e0fd2d67d894 is the first bad commit
apparently. I think I've done it wrong though, and
that 7a42b1fa1a090ead96cc0f94a8060a9650c810d5 is the breaking change.
Judging by the commit details, that seems likely, as it modifies what
appears to be relevant code. I wonder why it didn't break bootstrap on
upstream.

On Mon, May 2, 2022 at 8:24 PM Xi Ruoyao <xry111@mengyan1223.wang> wrote:

> On Mon, 2022-05-02 at 20:02 +1000, Zopolis0 wrote:
> > The thing is, that builds fine, but I havent changed anything to do
> > with libstdc++-v3.
>
> Then maybe you've modified some compiler code common for languages and
> cause GCC to misbehave on libstdc++ code (then stage 1 libstdc++ fails),
> or maybe it causes GCC to miscompile itself and generate a compiler
> misbehaving on libstdc++ code (so stage 2 libstdc++ fails).  Or maybe
> some modification to the building system causes libstdc++ built with
> wrong CXXFLAGS.  Who knows?  We have no idea how the code is modified.
>
> > On Mon, May 2, 2022 at 7:29 PM Xi Ruoyao <xry111@mengyan1223.wang>
> > wrote:
> > > On Mon, 2022-05-02 at 19:20 +1000, Zopolis0 via Gcc-help wrote:
> > > > While trying to compile gcj, it breaks on a number of errors, many
> > > > of which
> > > > are along the lines of "no matching function for call to ‘operator
> > > > new(sizetype, sizetype)". However, I have not touched this code,
> > > > and this
> > > > error does not appear on another branch which is a few months back
> > > > from
> > > > master. This leads me to believe that this is an error present on
> > > > master,
> > > > although I have not yet been able to locate the breaking commit.
> > > > (Example
> > > > of one such error:)
> > >
> > > Don't guess.  Just build the unmodified trunk and if it fails
> > > reports to
> > > https://gcc.gnu.org/bugzilla.
>
> --
> Xi Ruoyao <xry111@mengyan1223.wang>
> School of Aerospace Science and Technology, Xidian University
>

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

* Re: libstdc++-v3 failing to compile due to no matching function for call to ‘operator new(sizetype, sizetype)
  2022-05-02 12:07       ` Zopolis0
@ 2022-05-02 12:42         ` Xi Ruoyao
  2022-05-03  5:30           ` Zopolis0
  0 siblings, 1 reply; 7+ messages in thread
From: Xi Ruoyao @ 2022-05-02 12:42 UTC (permalink / raw)
  To: Zopolis0; +Cc: gcc-help

On Mon, 2022-05-02 at 22:07 +1000, Zopolis0 wrote:
> I've bisected the issue (which still happens with only --enable-
> languages=c,c++ instead of --enable-languages=java),
> and 0a0c2c3f06227d46b5e9542dfdd4e0fd2d67d894 is the first bad commit
> apparently. I think I've done it wrong though, and
> that 7a42b1fa1a090ead96cc0f94a8060a9650c810d5 is the breaking change.

Again, don't guess.  You can revert one of those changes or both of them
to try.  As I've indicated, you can't just look the diagnostic output
from the compiler and guess "this is the relevant modification, that is
not".  You are compiling libstdc++ with g++, so a change to either
libstdc++ or g++ may break the compiliation.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

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

* Re: libstdc++-v3 failing to compile due to no matching function for call to ‘operator new(sizetype, sizetype)
  2022-05-02 12:42         ` Xi Ruoyao
@ 2022-05-03  5:30           ` Zopolis0
  0 siblings, 0 replies; 7+ messages in thread
From: Zopolis0 @ 2022-05-03  5:30 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: gcc-help

Turns out it was some code from 0a0c2c3f06227d46b5e9542dfdd4e0fd2d67d894 I
acidentally deleted in a rebase, fixed.

On Mon, May 2, 2022 at 10:42 PM Xi Ruoyao <xry111@mengyan1223.wang> wrote:

> On Mon, 2022-05-02 at 22:07 +1000, Zopolis0 wrote:
> > I've bisected the issue (which still happens with only --enable-
> > languages=c,c++ instead of --enable-languages=java),
> > and 0a0c2c3f06227d46b5e9542dfdd4e0fd2d67d894 is the first bad commit
> > apparently. I think I've done it wrong though, and
> > that 7a42b1fa1a090ead96cc0f94a8060a9650c810d5 is the breaking change.
>
> Again, don't guess.  You can revert one of those changes or both of them
> to try.  As I've indicated, you can't just look the diagnostic output
> from the compiler and guess "this is the relevant modification, that is
> not".  You are compiling libstdc++ with g++, so a change to either
> libstdc++ or g++ may break the compiliation.
> --
> Xi Ruoyao <xry111@mengyan1223.wang>
> School of Aerospace Science and Technology, Xidian University
>

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

end of thread, other threads:[~2022-05-03  5:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02  9:20 libstdc++-v3 failing to compile due to no matching function for call to ‘operator new(sizetype, sizetype) Zopolis0
2022-05-02  9:29 ` Xi Ruoyao
2022-05-02 10:02   ` Zopolis0
2022-05-02 10:24     ` Xi Ruoyao
2022-05-02 12:07       ` Zopolis0
2022-05-02 12:42         ` Xi Ruoyao
2022-05-03  5:30           ` Zopolis0

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