realm-cpp icon indicating copy to clipboard operation
realm-cpp copied to clipboard

no type named 'uint_fast16_t' in namespace 'std' (Ubuntu + Clang)

Open adamski opened this issue 1 year ago • 5 comments

Building with Clang 18 on Ubuntu 24, I'm getting the following build error:

/include/cpprealm/internal/bridge/realm.hpp:77:35: error: no type named 'uint_fast16_t' in namespace 'std'; did you mean simply 'uint_fast16_t'?
   77 |                 using port_type = std::uint_fast16_t;
      |                                   ^~~~~~~~~~~~~~~~~~
      |                                   uint_fast16_t
/usr/include/stdint.h:62:27: note: 'uint_fast16_t' declared here
   62 | typedef unsigned long int       uint_fast16_t;
      |                                 ^

adamski avatar Jul 12 '24 21:07 adamski

➤ PM Bot commented:

Jira ticket: RCPP-85

sync-by-unito[bot] avatar Jul 12 '24 21:07 sync-by-unito[bot]

@adamski Had the same issue.

This patch fixes it it's just a missing: #include <cstdint> in include/cpprealm/internal/bridge/realm.hpp

missing-cstdint.patch

Tested on Ubuntu 24.04 with:

gcc (Ubuntu 12.3.0-17ubuntu1) 12.3.0

BestITUserEUW avatar Jul 27 '24 20:07 BestITUserEUW

Thanks @BestITUserEUW !

@leemaguire any chance of getting this patch merged in?

adamski avatar Jul 28 '24 20:07 adamski

@adamski I'll try merge it in this week.

leemaguire avatar Jul 30 '24 09:07 leemaguire

@leemaguire There is also another error when building example with gcc. I can try to fix it and submit a pr next few days.

BestITUserEUW avatar Jul 30 '24 11:07 BestITUserEUW