Skip to content

GH-36598: [C++][MinGW] Fix build failure with Protobuf 23.4 - #36606

Merged
pitrou merged 3 commits into
apache:mainfrom
kou:cpp-substrait-protobuf
Jul 12, 2023
Merged

pitrou merged 3 commits into
apache:mainfrom
kou:cpp-substrait-protobuf

Conversation

@kou

@kou kou commented Jul 11, 2023 •

Copy link
Copy Markdown
Member

Rationale for this change

There are 2 problems:

  • FindProtobuf.cmake provided by CMake is incomplete with Protobuf 23.4.
  • Misses -DPROTOBUF_USE_DLLS for building Substrait related files.

What changes are included in this PR?

  • We need to use protobuf-config.cmake provided by Protobuf instead of FindProtobuf.cmake provided by CMake because FindProtobuf.cmake misses absl::status dependency.
  • Accept Protobuf 23.4.
  • Use PROTOBUF_USE_DLLS when we build Substrait related files.
  • Use Boost_INCLUDE_DIRS instead of Boost_INCLUDE_DIR because Boost_INCLUDE_DIR isn't defined in BoostConfig.cmake.

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes.

* We need to use protobuf-config.cmake provided by Protobuf instead of
  FindProtobuf.cmake provided by CMake because FindProtobuf.cmake
  misses absl::status dependency.
* Accept Protobuf 23.4.
* Use PROTOBUF_USE_DLLS when we build substrait related files.
@kou
kou requested review from assignUser and raulcd as code owners July 11, 2023 02:43
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #36598 has been automatically assigned in GitHub to PR creator.

@assignUser

Copy link
Copy Markdown
Member

@kou

kou commented Jul 11, 2023

Copy link
Copy Markdown
Member Author

Oh, we needed to use Boost_INCLUDE_DIRS (need the last S) for portability.

@pitrou

pitrou commented Jul 11, 2023

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g cpp

set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1")
endif()
resolve_dependency(Protobuf
FORCE_ANY_NEWER_VERSION

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add a comment explaning why we add FORCE_ANY_NEWER_VERSION?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

OK. Done.

@github-actions

Copy link
Copy Markdown

Revision: f9df3bb

Submitted crossbow builds: ursacomputing/crossbow @ actions-e63c8556cf

Task Status
test-alpine-linux-cpp Github Actions
test-build-cpp-fuzz Github Actions
test-conda-cpp Github Actions
test-conda-cpp-valgrind Azure
test-cuda-cpp Github Actions
test-debian-11-cpp-amd64 Github Actions
test-debian-11-cpp-i386 Github Actions
test-fedora-35-cpp Github Actions
test-ubuntu-20.04-cpp Github Actions
test-ubuntu-20.04-cpp-bundled Github Actions
test-ubuntu-20.04-cpp-minimal-with-formats Github Actions
test-ubuntu-20.04-cpp-thread-sanitizer Github Actions
test-ubuntu-22.04-cpp Github Actions
test-ubuntu-22.04-cpp-20 Github Actions

@pitrou pitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @kou !

@pitrou
pitrou merged commit f18d8b3 into apache:main Jul 12, 2023
@kou
kou deleted the cpp-substrait-protobuf branch July 12, 2023 07:25
raulcd pushed a commit that referenced this pull request Jul 13, 2023
### Rationale for this change

There are 2 problems:

* `FindProtobuf.cmake` provided by CMake is incomplete with Protobuf 23.4.
* Misses `-DPROTOBUF_USE_DLLS` for building Substrait related files.

### What changes are included in this PR?

* We need to use `protobuf-config.cmake` provided by Protobuf instead of `FindProtobuf.cmake` provided by CMake because `FindProtobuf.cmake` misses `absl::status` dependency.
* Accept Protobuf 23.4.
* Use `PROTOBUF_USE_DLLS` when we build Substrait related files.
* Use `Boost_INCLUDE_DIRS` instead of `Boost_INCLUDE_DIR` because `Boost_INCLUDE_DIR` isn't defined in `BoostConfig.cmake`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* Closes: #36598

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit f18d8b3.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them.

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.

[C++] CI failures on Windows & Substrait (appears to be abseil linking issues)

3 participants