-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Fix wrong version in gRPCConfigVersion.cmake and grpc++*.pc #22529
Conversation
They use PACKAGE_VERSION to generate version information but PACKAGE_VERSION may be overridden by find_package(). For example, -DgRPC_CARES_PROVIDER=package with c-ares 1.16.0 overrides PACKAGE_VERSION to 1.16.0. Because c-ares-config-version.cmake has the following line: set(PACKAGE_VERSION "1.16.0") Setting PACKAGE_VERSION in version.cmake is a common CMake convention: https://cmake.org/cmake/help/latest/command/find_package.html#version-selection > PACKAGE_VERSION > > full provided version string So we should use gRPC_CPP_VERSION not PACKAGE_VERSION to generate gRPCConfigVersion.cmake and grpc++*.pc.
|
gRPC may provide wrong version information by config.cmake and .pc. See grpc/grpc#22529 for details. gRPC >= 1.17.0 detection is failed by config.cmake. Then we fallback to our FindgRPCAlt. FindgRPCAlt uses gRPC_ROOT if it's set. gRPC_ROOT is set to ARROW_PACKAGE_PREFIX automatically when we don't specify gRPC_SOURCE. But we always set gRPC_SOURCE in our CI (see ci/scripts/cpp_build.sh for details). So gRPC_ROOT isn't set. If gRPC_ROOT isn't set, pkg-config is used to detect gRPC but version information in grpc++.pc is also broken. gRPC >= 1.17.0 requirement isn't satisfied. We can't build gRPC with MinGW. grpc/grpc#21720 is needed.
gRPC may provide wrong version information by config.cmake and .pc. See grpc/grpc#22529 for details. gRPC >= 1.17.0 detection is failed by config.cmake. Then we fallback to our FindgRPCAlt. FindgRPCAlt uses gRPC_ROOT if it's set. gRPC_ROOT is set to ARROW_PACKAGE_PREFIX automatically when we don't specify gRPC_SOURCE. But we always set gRPC_SOURCE in our CI (see ci/scripts/cpp_build.sh for details). So gRPC_ROOT isn't set. If gRPC_ROOT isn't set, pkg-config is used to detect gRPC but version information in grpc++.pc is also broken. gRPC >= 1.17.0 requirement isn't satisfied. We can't build gRPC with MinGW. grpc/grpc#21720 is needed. Closes #6795 from kou/mingw-grpc Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 30 days. It will be closed automatically if no further update occurs in 7 day. Thank you for your contributions! |
Could someone review this? |
Could someone reopen this? |
Can I create a new pull request with the same change instead of waiting reopen? |
I've created: #22982 |
gRPC may provide wrong version information by config.cmake and .pc. See grpc/grpc#22529 for details. gRPC >= 1.17.0 detection is failed by config.cmake. Then we fallback to our FindgRPCAlt. FindgRPCAlt uses gRPC_ROOT if it's set. gRPC_ROOT is set to ARROW_PACKAGE_PREFIX automatically when we don't specify gRPC_SOURCE. But we always set gRPC_SOURCE in our CI (see ci/scripts/cpp_build.sh for details). So gRPC_ROOT isn't set. If gRPC_ROOT isn't set, pkg-config is used to detect gRPC but version information in grpc++.pc is also broken. gRPC >= 1.17.0 requirement isn't satisfied. We can't build gRPC with MinGW. grpc/grpc#21720 is needed. Closes #6795 from kou/mingw-grpc Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
They use PACKAGE_VERSION to generate version information but
PACKAGE_VERSION may be overridden by find_package(). For example,
-DgRPC_CARES_PROVIDER=package with c-ares 1.16.0 overrides
PACKAGE_VERSION to 1.16.0. Because c-ares-config-version.cmake has the
following line:
Setting PACKAGE_VERSION in version.cmake is a common CMake convention:
https://cmake.org/cmake/help/latest/command/find_package.html#version-selection
So we should use gRPC_CPP_VERSION not PACKAGE_VERSION to generate
gRPCConfigVersion.cmake and grpc++*.pc.
@nicolasnoble