public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: HHN <harihara.sn@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Errors when trying to use C++ modules with cmake and GCC
Date: Wed, 8 Feb 2023 12:32:44 +0000	[thread overview]
Message-ID: <CAH6eHdThk2rU_1gTzWy=DysO9zvaFmD3jc=Ja8P6PmKgLW4vsw@mail.gmail.com> (raw)
In-Reply-To: <CAH6eHdTihhcD=NEw5j_RY5cuVNWEV8d5uS88o3pcn9hK7KNUow@mail.gmail.com>

On Wed, 8 Feb 2023 at 12:27, Jonathan Wakely wrote:
>
> On Wed, 8 Feb 2023 at 12:14, HHN wrote:
> >
> > I apologise for not providing the complete context, after compiling I had tried to build the test suite and faced errors. I have attached the logs of this failure. ninja fails with
> > ninja: build stopped: subcommand failed.
> >
> > No such issues had occurred with g++-11. Only changes made to was changing the compiler in CMake
>
> error: ‘intmax_t’ is not a member of ‘std’; did you mean ‘intmax_t’?
>
> This is clearly a bug in the software. If you want to use
> std::intmax_t you need to include <cstdint> not <stdint.h>. If you
> want to include <stdint.h> then you need to use ::intmax_t not
> std::intmax_t.

It looks like HPX doesn't include either <cstdint> or <stdint.h> and
just happens to have a transitive include of <stdint.h> via <memory>:

In file included from
/home/hhn/makes/gcc-modules-install/usr/local/lib/gcc/x86_64-pc-linux-gnu/13.0.0/include/stdint.h:9,
                 from
/home/hhn/makes/gcc-modules-install/usr/local/include/c++/13.0.0/bits/align.h:36,
                 from
/home/hhn/makes/gcc-modules-install/usr/local/include/c++/13.0.0/memory:72,
                 from
/home/hhn/makes/hpx/libs/core/iterator_support/include/hpx/iterator_support/iterator_facade.hpp:21,
                 from
/home/hhn/makes/hpx/libs/core/iterator_support/include/hpx/iterator_support/iterator_adaptor.hpp:15,
                 from
/home/hhn/makes/hpx/libs/core/iterator_support/include/hpx/iterator_support/counting_iterator.hpp:13:


That's a bug. Here's the fix:
https://github.com/STEllAR-GROUP/hpx/pull/6166


>
> The C++ library headers are cleaner than in previous releases and so
> buggy code that used to compile is now rejected.
> https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes

      reply	other threads:[~2023-02-08 12:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 10:52 HHN
2023-02-01 11:00 ` Jonathan Wakely
2023-02-08  9:48   ` HHN
2023-02-08 10:35     ` Jonathan Wakely
2023-02-08 12:14       ` HHN
2023-02-08 12:27         ` Jonathan Wakely
2023-02-08 12:32           ` Jonathan Wakely [this message]

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='CAH6eHdThk2rU_1gTzWy=DysO9zvaFmD3jc=Ja8P6PmKgLW4vsw@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=harihara.sn@gmail.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).