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

ARROW-12326: [C++] Avoid needless c-ares detection #9977

Closed
wants to merge 3 commits into from

Conversation

kou
Copy link
Member

@kou kou commented Apr 10, 2021

If we use system gRPC, we don't need to detect c-ares.

This change also simplifies gRPC detection. System gRPC detection
requires CMake config or pkg-config. System gRPC detection by
gRPC_ROOT is removed because we can't maintain Abseil dependencies.

If we use system gRPC, we don't need to detect c-ares.

This change also simplifies gRPC detection. System gRPC detection
requires CMake config or pkg-config. System gRPC detection by
gRPC_ROOT is removed because we can't maintain Abseil dependencies.
@github-actions
Copy link

@kou

This comment has been minimized.

@github-actions

This comment has been minimized.

@kszucs

This comment has been minimized.

@github-actions

This comment has been minimized.

@kszucs
Copy link
Member

kszucs commented Apr 10, 2021

@github-actions crossbow submit -g nightly

@github-actions
Copy link

Revision: 056a87a

Submitted crossbow builds: ursacomputing/crossbow @ actions-308

Task Status
centos-7-amd64 Github Actions
centos-8-amd64 Github Actions
centos-8-arm64 TravisCI
conda-clean Azure
conda-linux-gcc-py36-arm64 Drone
conda-linux-gcc-py36-cpu-r36 Azure
conda-linux-gcc-py36-cuda Azure
conda-linux-gcc-py37-arm64 Drone
conda-linux-gcc-py37-cpu-r40 Azure
conda-linux-gcc-py37-cuda Azure
conda-linux-gcc-py38-arm64 Drone
conda-linux-gcc-py38-cpu Azure
conda-linux-gcc-py38-cuda Azure
conda-linux-gcc-py39-arm64 Drone
conda-linux-gcc-py39-cpu Azure
conda-linux-gcc-py39-cuda Azure
conda-osx-clang-py36-r36 Azure
conda-osx-clang-py37-r40 Azure
conda-osx-clang-py38 Azure
conda-osx-clang-py39 Azure
conda-win-vs2017-py36-r36 Azure
conda-win-vs2017-py37-r40 Azure
conda-win-vs2017-py38 Azure
debian-bullseye-amd64 Github Actions
debian-bullseye-arm64 TravisCI
debian-buster-amd64 Github Actions
debian-buster-arm64 TravisCI
example-cpp-minimal-build-static Github Actions
example-cpp-minimal-build-static-system-dependency Github Actions
gandiva-jar-osx Github Actions
gandiva-jar-ubuntu Github Actions
homebrew-cpp Github Actions
homebrew-r-autobrew Github Actions
nuget Github Actions
python-sdist Github Actions
test-build-vcpkg-win Github Actions
test-conda-cpp Github Actions
test-conda-cpp-valgrind Github Actions
test-conda-python-3.6 Github Actions
test-conda-python-3.6-pandas-0.23 Github Actions
test-conda-python-3.7 Github Actions
test-conda-python-3.7-dask-latest Github Actions
test-conda-python-3.7-hdfs-3.2 Github Actions
test-conda-python-3.7-kartothek-latest Github Actions
test-conda-python-3.7-kartothek-master Github Actions
test-conda-python-3.7-pandas-latest Github Actions
test-conda-python-3.7-pandas-master Github Actions
test-conda-python-3.7-spark-branch-3.0 Github Actions
test-conda-python-3.7-turbodbc-latest Github Actions
test-conda-python-3.7-turbodbc-master Github Actions
test-conda-python-3.8 Github Actions
test-conda-python-3.8-dask-master Github Actions
test-conda-python-3.8-hypothesis Github Actions
test-conda-python-3.8-jpype Github Actions
test-conda-python-3.8-pandas-latest Github Actions
test-conda-python-3.8-pandas-nightly Github Actions
test-conda-python-3.8-spark-master Github Actions
test-conda-python-3.9 Github Actions
test-debian-10-cpp Github Actions
test-debian-10-go-1.15 Azure
test-debian-10-python-3 Azure
test-debian-c-glib Github Actions
test-debian-ruby Github Actions
test-fedora-33-cpp Github Actions
test-fedora-33-python-3 Azure
test-r-install-local Github Actions
test-r-linux-as-cran Github Actions
test-r-minimal-build Azure
test-r-rhub-ubuntu-gcc-release Azure
test-r-rocker-r-base-latest Azure
test-r-rstudio-r-base-3.6-bionic Azure
test-r-rstudio-r-base-3.6-centos7-devtoolset-8 Azure
test-r-rstudio-r-base-3.6-centos8 Azure
test-r-rstudio-r-base-3.6-opensuse15 Azure
test-r-rstudio-r-base-3.6-opensuse42 Azure
test-r-version-compatibility Github Actions
test-r-versions Github Actions
test-r-without-arrow Azure
test-ubuntu-18.04-cpp Github Actions
test-ubuntu-18.04-cpp-release Github Actions
test-ubuntu-18.04-cpp-static Github Actions
test-ubuntu-18.04-docs Azure
test-ubuntu-18.04-python-3 Azure
test-ubuntu-18.04-r-sanitizer Azure
test-ubuntu-20.04-cpp Github Actions
test-ubuntu-20.04-cpp-14 Github Actions
test-ubuntu-20.04-cpp-17 Github Actions
test-ubuntu-20.04-cpp-thread-sanitizer Github Actions
test-ubuntu-c-glib Github Actions
test-ubuntu-ruby Github Actions
ubuntu-bionic-amd64 Github Actions
ubuntu-bionic-arm64 TravisCI
ubuntu-focal-amd64 Github Actions
ubuntu-focal-arm64 TravisCI
ubuntu-groovy-amd64 Github Actions
ubuntu-groovy-arm64 TravisCI
wheel-manylinux2010-cp36-amd64 Github Actions
wheel-manylinux2010-cp37-amd64 Github Actions
wheel-manylinux2010-cp38-amd64 Github Actions
wheel-manylinux2010-cp39-amd64 Github Actions
wheel-manylinux2014-cp36-amd64 Github Actions
wheel-manylinux2014-cp36-arm64 TravisCI
wheel-manylinux2014-cp37-amd64 Github Actions
wheel-manylinux2014-cp37-arm64 TravisCI
wheel-manylinux2014-cp38-amd64 Github Actions
wheel-manylinux2014-cp38-arm64 TravisCI
wheel-manylinux2014-cp39-amd64 Github Actions
wheel-manylinux2014-cp39-arm64 TravisCI
wheel-osx-high-sierra-cp36 Github Actions
wheel-osx-high-sierra-cp37 Github Actions
wheel-osx-high-sierra-cp38 Github Actions
wheel-osx-high-sierra-cp39 Github Actions
wheel-osx-mavericks-cp36 Github Actions
wheel-osx-mavericks-cp37 Github Actions
wheel-osx-mavericks-cp38 Github Actions
wheel-osx-mavericks-cp39 Github Actions
wheel-windows-cp36 Github Actions
wheel-windows-cp37 Github Actions
wheel-windows-cp38 Github Actions
wheel-windows-cp39 Github Actions

@kou kou marked this pull request as ready for review April 10, 2021 20:39
@kou
Copy link
Member Author

kou commented Apr 10, 2021

This works now.

set(GRPCPP_COMPILE_OPTIONS ${GRPCPP_PC_CFLAGS_OTHER})
else()
set(GRPCPP_LINK_LIBRARIES)
foreach(GRPCPP_LIBRARY_NAME ${GRPCPP_PC_STATIC_LIBRARIES})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be an assertion here to check that the required libraries are in GRPCPP_PC_STATIC_LIBRARIES before iterating over them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we need it.
Because we already check GRPCC_PC_FOUND. We can assume that pkg_check_modules() sets GRPCPP_PC_* and GRPCPP_PC_STATIC_* variables.
(I don't think that it can be occurred but) If GRPCPP_PC_STATIC_LIBRARIES is empty, the following list(GET GRPCPP_LINK_LIBRARIES 0 GRPCPP_IMPORTED_LOCATION) is failed. So we can detect invalid value eventually.

"${GRPC_INCLUDE_DIR}")
"${GRPCPP_INCLUDE_DIRECTORIES}"
INTERFACE_LINK_LIBRARIES
"${GRPCPP_LINK_LIBRARIES}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could GRPCPP_LINK_LIBRARIES contain extraneous libraries that might cause problems here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If grpc++.pc is broken, it can be occurred. But it's a grpc++.pc problem. We should fix grpc++.pc instead of our .cmake.

Copy link
Member

@kszucs kszucs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kszucs kszucs closed this in 62f8c20 Apr 13, 2021
@kou kou deleted the cpp-avoid-needless-c-ares-detection branch April 14, 2021 06:38
Dandandan pushed a commit to Dandandan/arrow that referenced this pull request Apr 14, 2021
If we use system gRPC, we don't need to detect c-ares.

This change also simplifies gRPC detection. System gRPC detection
requires CMake config or pkg-config. System gRPC detection by
gRPC_ROOT is removed because we can't maintain Abseil dependencies.

Closes apache#9977 from kou/cpp-avoid-needless-c-ares-detection

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
If we use system gRPC, we don't need to detect c-ares.

This change also simplifies gRPC detection. System gRPC detection
requires CMake config or pkg-config. System gRPC detection by
gRPC_ROOT is removed because we can't maintain Abseil dependencies.

Closes apache#9977 from kou/cpp-avoid-needless-c-ares-detection

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 10, 2021
If we use system gRPC, we don't need to detect c-ares.

This change also simplifies gRPC detection. System gRPC detection
requires CMake config or pkg-config. System gRPC detection by
gRPC_ROOT is removed because we can't maintain Abseil dependencies.

Closes apache#9977 from kou/cpp-avoid-needless-c-ares-detection

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 13, 2021
If we use system gRPC, we don't need to detect c-ares.

This change also simplifies gRPC detection. System gRPC detection
requires CMake config or pkg-config. System gRPC detection by
gRPC_ROOT is removed because we can't maintain Abseil dependencies.

Closes apache#9977 from kou/cpp-avoid-needless-c-ares-detection

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants