grpc-rs icon indicating copy to clipboard operation
grpc-rs copied to clipboard

grpcio-sys-0.12.1+1.46.5-patched compile error on latest `clang`

Open purew opened this issue 2 years ago • 3 comments

Using a newer version of clang:

$ clang --version
clang version 15.0.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

The linked C++ code fails to compile with

 In file included from /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc
:16:
 /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:34:35: error: unknown
type name 'uint8_t'
 enum class FormatConversionChar : uint8_t;
                                   ^
 /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:35:38: error: unknown
type name 'uint64_t'
 enum class FormatConversionCharSet : uint64_t;
                                      ^
 /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:131:20: error: unknown
type name 'uint8_t'
 enum class Flags : uint8_t {
                    ^
 /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:144:41: error: unknown
type name 'uint8_t'
   return static_cast<Flags>(static_cast<uint8_t>(a) | static_cast<uint8_t>(b));
                                         ^
 /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:144:67: error: unknown
type name 'uint8_t'
   return static_cast<Flags>(static_cast<uint8_t>(a) | static_cast<uint8_t>(b));
                                                                   ^
 /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:148:23: error: unknown
type name 'uint8_t'
   return (static_cast<uint8_t>(haystack) & static_cast<uint8_t>(needle)) ==
                       ^
 /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:148:56: error: unknown
type name 'uint8_t'
   return (static_cast<uint8_t>(haystack) & static_cast<uint8_t>(needle)) ==
                                                        ^
 /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:148:42: error: invalid
operands to binary expression ('absl::str_format_internal::Flags' and 'absl::str_format_internal::Flags')
   return (static_cast<uint8_t>(haystack) & static_cast<uint8_t>(needle)) ==
                                ~~~~~~~~  ^                      ~~~~~~
 /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:149:22: error: unknown
type name 'uint8_t'
          static_cast<uint8_t>(needle);
                      ^
 /home/anders/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:187:21: error: unknown
type name 'uint8_t'
   enum class Enum : uint8_t {

purew avatar May 18 '23 20:05 purew

I believe this issue is a duplicate of #617

regar42 avatar May 19 '23 16:05 regar42

Ahh, I actually saw that ticket first but at the time I only saw other errors in my build log which made me think this was a different issue for clang.

However, those errors were actually just warnings and the hard error is the one above which #617 already documents.

purew avatar May 19 '23 18:05 purew

0.13.0 is published, please try again and see if it's fixed.

BusyJay avatar Aug 25 '23 15:08 BusyJay