Re: Errors when trying to use C++ modules with cmake and GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux