library build failure with GCC 13.1.0

Issue #605 resolved
Paul Hargrove created an issue

GCC 13.1.0 was released today (x.1.0 is always the first release for major 'x').
My initial attempts to compile UPC++ with this new compiler release failed.
On Dirac the PrgEnv/gnu/13.1.0 toolchain reproduces the failure:

{phargrov@pcp-d-5 GCC13}$ module load PrgEnv/gnu/13.1.0
{phargrov@pcp-d-5 GCC13}$ ../configure --disable-mpi-compat
[...output elided...]
{phargrov@pcp-d-5 GCC13}$ make
[...]
In file included from /home/pagoda1/phargrov/upcxx/src/./segment_allocator.cpp:2:
/home/pagoda1/phargrov/upcxx/GCC13/bld/upcxx.assert1.optlev0.dbgsym1.gasnet_seq.smp/include/upcxx/segment_allocator.hpp:28:12: error: 'uintptr_t' in namespace 'std' does not name a type
   28 |       std::uintptr_t
      |            ^~~~~~~~~
/home/pagoda1/phargrov/upcxx/GCC13/bld/upcxx.assert1.optlev0.dbgsym1.gasnet_seq.smp/include/upcxx/segment_allocator.hpp:6:1: note: 'std::uintptr_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
    5 | #include <unordered_map>
  +++ |+#include <cstdint>
    6 |
[... 200+ lines of additional errors stemming from lack of std::uintptr_t ...]

Comments (1)

  1. Paul Hargrove reporter

    Add missing include to segment_allocator.hpp

    When building UPC++ with the recently released GCC 13.1.0 compilers, the type std::uintptr_t is undefined when processing segment_allocator.hpp included from segment_allocator.cpp. This commit adds #include <cstdint> to provide the necessary definition.

    Resolves issue #605.

    → <<cset 8d374d6efea8>>

  2. Log in to comment