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

GH-37352: [C++] Don't put all dependencies to ArrowConfig.cmake/arrow.pc #37399

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

kou
Copy link
Member

@kou kou commented Aug 26, 2023

Rationale for this change

Currently, arrow.pc has Requires.private: grpc++ when Flight is enabled and system gRPC is used. grpc++.pc depends on re2.pc on Amazon Linux 2023 and re2.pc has -std=c++11. It causes a problem when an user uses c++ -std=c++17 a.cc $(pkg-config --cflags --libs arrow). Because the command will be expanded to c++ -std=c++17 ... -std=c++11 .... The expanded command line uses C++11 not C++17 because -std=c++11 is appeared after -std=c++17. In general, the user must use c++ ... $(pkg-config --cflags --libs arrow) -std=c++17 to ensure using their -std=XXX. But we want to avoid this case as much as possible.

What changes are included in this PR?

Split Flight related dependencies such as gRPC to ArrowFlightConfig.cmake/arrow-flight.pc from ArrowConfig.cmake/arrow.pc.

Split Parquet related dependencies such as Thrift to ParquetConfig.cmake/parquet.pc from ArrowConfig.cmake/arrow.pc.

With this change, c++ -std=c++17 ... $(pkg-config --cflags --libs arrow) works because arrow.pc doesn't depend on grpc++ (re2). But c++ -std=c++17 ... $(pkg-config --cflags --libs arrow-flight) still doesn't work on Amazon Linux 2023. c++ ... $(pkg-config --cflags --libs arrow-flight) ... -std=c++17 ... should be used for the case.

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes.

@kou
Copy link
Member Author

kou commented Aug 26, 2023

@github-actions crossbow submit -g linux

@github-actions
Copy link

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

@github-actions
Copy link

Revision: b0acb86

Submitted crossbow builds: ursacomputing/crossbow @ actions-0369c3fde3

Task Status
almalinux-8-amd64 Github Actions
almalinux-8-arm64 Github Actions
almalinux-9-amd64 Github Actions
almalinux-9-arm64 Github Actions
amazon-linux-2023-amd64 Github Actions
amazon-linux-2023-arm64 Github Actions
centos-7-amd64 Github Actions
centos-8-stream-amd64 Github Actions
centos-8-stream-arm64 Github Actions
centos-9-stream-amd64 Github Actions
centos-9-stream-arm64 Github Actions
debian-bookworm-amd64 Github Actions
debian-bookworm-arm64 Github Actions
debian-bullseye-amd64 Github Actions
debian-bullseye-arm64 Github Actions
debian-trixie-amd64 Github Actions
debian-trixie-arm64 Github Actions
ubuntu-focal-amd64 Github Actions
ubuntu-focal-arm64 Github Actions
ubuntu-jammy-amd64 Github Actions
ubuntu-jammy-arm64 Github Actions
ubuntu-lunar-amd64 Github Actions
ubuntu-lunar-arm64 Github Actions

@kou kou force-pushed the packaging-amazon-linux-2023 branch 2 times, most recently from 382d666 to e352564 Compare August 26, 2023 21:05
…/arrow.pc

Split Flight related dependencies such as gRPC to
ArrowFlightConfig.cmake/arrow-flight.pc from ArrowConfig.cmake/arrow.pc.

Split Parquet related dependencies such as Thrift to
ParquetConfig.cmake/parquet.pc from ArrowConfig.cmake/arrow.pc.
@kou kou force-pushed the packaging-amazon-linux-2023 branch from e352564 to 0e53976 Compare August 26, 2023 21:50
Copy link
Member Author

@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

@kou kou merged commit e1227a2 into apache:main Aug 29, 2023
36 checks passed
@kou kou deleted the packaging-amazon-linux-2023 branch August 29, 2023 00:24
@kou kou removed the awaiting committer review Awaiting committer review label Aug 29, 2023
@github-actions github-actions bot added the awaiting changes Awaiting changes label Aug 29, 2023
@conbench-apache-arrow
Copy link

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

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.

@thisisnic
Copy link
Member

@github-actions crossbow submit test-r-gcc-11

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Revision: 0e53976

Submitted crossbow builds: ursacomputing/crossbow @ actions-663bda6898

Task Status
test-r-gcc-11 Github Actions

kou added a commit that referenced this pull request Sep 11, 2023
#37603)

### Rationale for this change

GH-37399 removed "thrift" pkg-config package dependency from "parquet" pkg-config package accidentally. 
Before GH-37399, "arrow" pkg-config packages has "thrift" pkg-config package dependency as `Requires.private`.

### What changes are included in this PR?

Add "thrift" to `Requires.private` of `parquet.pc`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* Closes: #37535

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…/arrow.pc (apache#37399)

### Rationale for this change

Currently, `arrow.pc` has `Requires.private: grpc++` when Flight is enabled and system gRPC is used. `grpc++.pc` depends on `re2.pc` on Amazon Linux 2023 and `re2.pc` has `-std=c++11`. It causes a problem when an user uses `c++ -std=c++17 a.cc $(pkg-config --cflags --libs arrow)`. Because the command will be expanded to `c++ -std=c++17 ... -std=c++11 ...`. The expanded command line uses C++11 not C++17 because `-std=c++11` is appeared after `-std=c++17`. In general, the user must use `c++ ... $(pkg-config --cflags --libs arrow) -std=c++17` to ensure using their `-std=XXX`. But we want to avoid this case as much as possible. 

### What changes are included in this PR?

Split Flight related dependencies such as gRPC to ArrowFlightConfig.cmake/arrow-flight.pc from ArrowConfig.cmake/arrow.pc.

Split Parquet related dependencies such as Thrift to ParquetConfig.cmake/parquet.pc from ArrowConfig.cmake/arrow.pc.

With this change, `c++ -std=c++17 ... $(pkg-config --cflags --libs arrow)` works because `arrow.pc` doesn't depend on `grpc++` (`re2`). But `c++ -std=c++17 ... $(pkg-config --cflags --libs arrow-flight)` still doesn't work on Amazon Linux 2023. `c++ ... $(pkg-config --cflags --libs arrow-flight) ... -std=c++17 ...` should be used for the case.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* Closes: apache#37352

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…quet.pc (apache#37603)

### Rationale for this change

apacheGH-37399 removed "thrift" pkg-config package dependency from "parquet" pkg-config package accidentally. 
Before apacheGH-37399, "arrow" pkg-config packages has "thrift" pkg-config package dependency as `Requires.private`.

### What changes are included in this PR?

Add "thrift" to `Requires.private` of `parquet.pc`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* Closes: apache#37535

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…quet.pc (apache#37603)

### Rationale for this change

apacheGH-37399 removed "thrift" pkg-config package dependency from "parquet" pkg-config package accidentally. 
Before apacheGH-37399, "arrow" pkg-config packages has "thrift" pkg-config package dependency as `Requires.private`.

### What changes are included in this PR?

Add "thrift" to `Requires.private` of `parquet.pc`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* Closes: apache#37535

Authored-by: Sutou Kouhei <kou@clear-code.com>
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.

[Packaging][RPM][AmazonLinux2023] arrow.pc doesn't work
2 participants