Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpcio v0.12.1 failed to build #617

Closed
ycytt-rs opened this issue May 11, 2023 · 13 comments
Closed

grpcio v0.12.1 failed to build #617

ycytt-rs opened this issue May 11, 2023 · 13 comments

Comments

@ycytt-rs
Copy link

Describe the bug
Failed to build grpcio:

rust log:

  --- stderr
  CMake Warning at third_party/abseil-cpp/CMakeLists.txt:74 (message):
    A future Abseil release will default ABSL_PROPAGATE_CXX_STD to ON for CMake
    3.8 and up.  We recommend enabling this option to ensure your project still
    builds correctly.


  CMake Warning at cmake/protobuf.cmake:51 (message):
    gRPC_PROTOBUF_PROVIDER is "module" but PROTOBUF_ROOT_DIR is wrong
  Call Stack (most recent call first):
    CMakeLists.txt:317 (include)


  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_ASM_COMPILER
      CMAKE_ASM_FLAGS


  In file included from /home/cslo/.cargo/registry/src/garden.eu.org-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc:16:
  /home/cslo/.cargo/registry/src/garden.eu.org-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:34:6: warning: elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword
     34 | enum class FormatConversionChar : uint8_t;
        | ~~~~ ^~~~~
        |      -----
  /home/cslo/.cargo/registry/src/garden.eu.org-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:34:33: error: found ‘:’ in nested-name-specifier, expected ‘::’
     34 | enum class FormatConversionChar : uint8_t;
        |                                 ^
        |                                 ::
  /home/cslo/.cargo/registry/src/garden.eu.org-1ecc6299db9ec823/grpcio-sys-0.12.1+1.46.5-patched/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h:34:12: error: ‘FormatConversionChar’ has not been declared
     34 | enum class FormatConversionChar : uint8_t;
        |            ^~~~~~~~~~~~~~~~~~~~

features enabled:
"prost-codec",
"openssl-vendored",

System information

  • CPU architecture: x86
  • Distribution and kernel version: 6.3.1
  • SELinux on?: no
  • Any other system details we should know?:
  • gcc: 13.1.1-1
  • cmake: 3.26.3-1
  • clang: 15.0.7-9
@regar42
Copy link

regar42 commented May 19, 2023

I also started having this issue when I upgraded from GCC12 to GCC13 (13.1.1).
Unfortunately I don't have time to dig into this right now (reverted to GCC12 instead) :/

@heftig
Copy link
Contributor

heftig commented May 23, 2023

It's a missing #include <cstdint>.

@Ten0
Copy link
Contributor

Ten0 commented May 23, 2023

Chances are we just need to bump the grpc core fork, no?

@purew
Copy link

purew commented May 31, 2023

I'd be happy to try out any fixes, as I'm having these issues.

@Ten0
Copy link
Contributor

Ten0 commented May 31, 2023

As our current workaround we are using an old version of gcc

@heftig
Copy link
Contributor

heftig commented May 31, 2023

I've worked around it by using LLVM's libc++ instead of GCC's libstdc++.

export CXX="clang++" CXXFLAGS="-stdlib=libc++"

@grahamking
Copy link

grahamking commented Jun 6, 2023

Editing grpc-rs/grpc-sys/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h to add #include <cstdint> with the other includes, like @heftig said, fixes it - thanks!

Abseil has that include already. If https://github.com/pingcap/grpc can update it's abseil submodule link (like upstream grpc/grpc has done), and then this project update it's pingcap/grpc submodule , it should then build with GCC 13.

@Ten0
Copy link
Contributor

Ten0 commented Jun 6, 2023

@BusyJay sorry to ping but that seems to be a big enough issue easy enough to solve

@BusyJay
Copy link
Member

BusyJay commented Jun 15, 2023

Will fix it this weekend. I don't have access to pingcap/grpc anymore, I was waiting for https://github.com/pingcap/grpc moving to https://github.com/tikv/grpc these days.

@lance6716
Copy link

@BusyJay Hi, kindly ask do you have time to fix it?

@purew
Copy link

purew commented Jul 12, 2023

Will fix it this weekend. I don't have access to pingcap/grpc anymore, I was waiting for https://github.com/pingcap/grpc moving to https://github.com/tikv/grpc these days.

Looks like the move has completed? The two urls both point to tikv/grpc.

@BusyJay
Copy link
Member

BusyJay commented Jul 13, 2023

Yes, and #621 should fix this issue.

@BusyJay
Copy link
Member

BusyJay commented Aug 25, 2023

Now the change is published as 0.13.0.

@BusyJay BusyJay closed this as completed Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants