Skip to content

GH-40398: [C++] Expose protobuf dependency if opentelemetry or ORC are enabled#40399

Merged
kou merged 2 commits intoapache:mainfrom
tobim:build/fix-protobuf-dependency
Mar 15, 2024
Merged

GH-40398: [C++] Expose protobuf dependency if opentelemetry or ORC are enabled#40399
kou merged 2 commits intoapache:mainfrom
tobim:build/fix-protobuf-dependency

Conversation

@tobim
Copy link
Copy Markdown
Contributor

@tobim tobim commented Mar 7, 2024

Rationale for this change

When not bundling dependencies, libarrow.a depends on protobuf symbols if built with ORC or opentelemetry support. However this dependency was not looked up in ArrowConfig.cmake, causing client projects using linking to arrow_static to fail in configuration.

What changes are included in this PR?

This change makes it so that the dependency on protobuf is propagated to the installed ArrowConfig.cmake file when necessary.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2024

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

@tobim tobim force-pushed the build/fix-protobuf-dependency branch from 5836fa4 to cea9a8b Compare March 7, 2024 08:56
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Mar 7, 2024
@tobim tobim changed the title GH-40398: [C++] Expose protobuf dependency if HDFS or ORC are enabled GH-40398: [C++] Expose protobuf dependency if opentelemetry or ORC are enabled Mar 7, 2024
When not bundling dependencies, `libarrow.a` depends on protobuf
symbols if built with ORC or opentelemetry support. However this dependency
was not looked up in ArrowConfig.cmake, causing client projects
using linking to `arrow_static` to fail in configuration.
@tobim tobim force-pushed the build/fix-protobuf-dependency branch from cea9a8b to 4e623f4 Compare March 7, 2024 18:26
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Mar 7, 2024
Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

@github-actions github-actions bot added awaiting merge Awaiting merge awaiting changes Awaiting changes awaiting change review Awaiting change review and removed awaiting change review Awaiting change review awaiting merge Awaiting merge awaiting changes Awaiting changes labels Mar 8, 2024
@tobim tobim force-pushed the build/fix-protobuf-dependency branch from 0d775ba to 5ac6411 Compare March 8, 2024 09:59
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Mar 8, 2024
@tobim
Copy link
Copy Markdown
Contributor Author

tobim commented Mar 15, 2024

The CI failures seem unrelated. Anything I can do to move this forward?

@kou
Copy link
Copy Markdown
Member

kou commented Mar 15, 2024

We can resolve these failures by rebasing on main. But I'll merge this.

@kou kou merged commit 5baca0f into apache:main Mar 15, 2024
@kou kou removed the awaiting change review Awaiting change review label Mar 15, 2024
@conbench-apache-arrow
Copy link
Copy Markdown

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

There were 2 benchmark results indicating a performance regression:

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

kou added a commit that referenced this pull request Mar 18, 2024
…w-dev from libarrow-flight-dev (#40617)

### Rationale for this change

This is a follow-up of GH-40399.

### What changes are included in this PR?

Move `libprotobuf-dev` dependency to `libarrow-dev` from `libarrow-flight-dev`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* GitHub Issue: #40615

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
kou added a commit that referenced this pull request Mar 24, 2024
…strait (#40753)

### Rationale for this change

The problem #40751 seems to be introduced by #40399. Though I'm not entirely sure about the purpose of that, it seems to be missing an `OR ARROW_SUBSTRAIT` in the `if` branch in 5baca0f#diff-5cdc95f4e1b618f2f3ef10d370ce05a1ac05d9d401aecff3ccbb3d76bd366b6aR1815

Because other than `ARROW_ORC`, `ARROW_WITH_OPENTELEMETRY` and `ARROW_FLIGHT`, `ARROW_SUBSTRAIT` also implies `ARROW_WITH_PROTOBUF`:
https://github.com/apache/arrow/blob/5baca0f16e924c42741729f041b31a02883548b9/cpp/cmake_modules/ThirdpartyToolchain.cmake#L421-L423

### What changes are included in this PR?

Add the possible missing condition of `ARROW_SUBSTRAIT` for the questioning `if` branch.

### Are these changes tested?

Manually tested.

### Are there any user-facing changes?

None.

* GitHub Issue: #40751

Lead-authored-by: Ruoxi Sun <zanmato1984@gmail.com>
Co-authored-by: Rossi Sun <zanmato1984@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.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.

2 participants