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-15040: [C++] Improve pkg-config support for ARROW_BUILD_SHARED=OFF #15075

Merged
merged 4 commits into from
Dec 27, 2022

Conversation

kou
Copy link
Member

@kou kou commented Dec 23, 2022

If ARROW_BUILD_SHARED=OFF is specified, pkg-config --cflags --libs arrow doesn't work. Because pkg-config --cflags --libs arrow misses build options for static linking. Users need to specify pkg-config --cflags --libs --static arrow for static linking even when ARROW_BUILD_SHARED=OFF is specified.

This change adds support for pkg-config --cflags --libs arrow with ARROW_BUILD_SHARED=OFF. The command outputs build options for linking against libarrow.a. But these build options don't use static linking for dependencies. On the other hand, pkg-config --cflags --libs --static arrow still use static linking for all libraries including Apache Arrow C++ and its dependencies.

With this change, Apache Arrow R doesn't need to use pkg-config --static. Because pkg-config --cflags --libs arrow works for both of libarrow.so and libarrow.a.

…ED=OFF

If `ARROW_BUILD_SHARED=OFF` is specified, `pkg-config --cflags --libs
arrow` doesn't work. Because `pkg-config --cflags --libs arrow` misses
build options for static linking. Users need to specify `pkg-config
--cflags --libs --static arrow` for static linking even when
`ARROW_BUILD_SHARED=OFF` is specified.

This change adds support for `pkg-config --cflags --libs arrow` with
`ARROW_BUILD_SHARED=OFF`. The command outputs build options for
linking against `libarrow.a`. But these build options don't use
static linking for dependencies. On the other hand, `pkg-config
--cflags --libs --static arrow` still use static linking for all
libraries including Apache Arrow C++ and its dependencies.

With this change, Apache Arrow R doesn't need to use `pkg-config
--static`. Because `pkg-config --cflags --libs arrow` works for both
of `libarrow.so` and `libarrow.a`.
@github-actions
Copy link

@kou
Copy link
Member Author

kou commented Dec 23, 2022

@github-actions crossbow submit -g r

@github-actions
Copy link

Revision: 9df548a

Submitted crossbow builds: ursacomputing/crossbow @ actions-f48dce693b

Task Status
conda-linux-aarch64-cpu-r41 Azure
conda-linux-aarch64-cpu-r42 Azure
conda-linux-x64-cpu-r41 Azure
conda-linux-x64-cpu-r42 Azure
conda-osx-arm64-cpu-r41 Azure
conda-osx-arm64-cpu-r42 Azure
conda-osx-x64-cpu-r41 Azure
conda-osx-x64-cpu-r42 Azure
conda-win-x64-cpu-r41 Azure
homebrew-r-autobrew Github Actions
homebrew-r-brew Github Actions
r-binary-packages Github Actions
test-fedora-r-clang-sanitizer Azure
test-r-arrow-backwards-compatibility Github Actions
test-r-depsource-bundled Azure
test-r-depsource-system Github Actions
test-r-dev-duckdb Github Actions
test-r-devdocs Github Actions
test-r-gcc-11 Github Actions
test-r-gcc-12 Github Actions
test-r-install-local Github Actions
test-r-install-local-minsizerel Github Actions
test-r-library-r-base-latest Azure
test-r-linux-as-cran Github Actions
test-r-linux-rchk Github Actions
test-r-linux-valgrind Azure
test-r-minimal-build Azure
test-r-offline-maximal Github Actions
test-r-offline-minimal Azure
test-r-rhub-debian-gcc-devel-lto-latest Azure
test-r-rhub-debian-gcc-release-custom-ccache Azure
test-r-rhub-ubuntu-gcc-release-latest Azure
test-r-rstudio-r-base-4.1-opensuse153 Azure
test-r-rstudio-r-base-4.2-centos7-devtoolset-8 Azure
test-r-rstudio-r-base-4.2-focal Azure
test-r-ubuntu-22.04 Github Actions
test-r-versions Github Actions
test-ubuntu-18.04-r-sanitizer Azure

@kou
Copy link
Member Author

kou commented Dec 23, 2022

@github-actions crossbow submit r-binary-packages

@github-actions

This comment was marked as outdated.

@kou
Copy link
Member Author

kou commented Dec 23, 2022

@github-actions crossbow submit r-binary-packages

@github-actions

This comment was marked as outdated.

@kou
Copy link
Member Author

kou commented Dec 23, 2022

@github-actions crossbow submit r-binary-packages

@github-actions

This comment was marked as outdated.

@kou
Copy link
Member Author

kou commented Dec 23, 2022

@github-actions crossbow submit r-binary-packages

@github-actions
Copy link

Revision: 62e7a27

Submitted crossbow builds: ursacomputing/crossbow @ actions-67a83aaaad

Task Status
r-binary-packages Github Actions

@kou
Copy link
Member Author

kou commented Dec 24, 2022

This is ready to review/merge.

@kou
Copy link
Member Author

kou commented Dec 27, 2022

I merge this. If there are problems, I'll fix them in follow-up pull requests.

@kou kou merged commit 43b95e6 into apache:master Dec 27, 2022
@kou kou deleted the cpp-pkg-config-static branch December 27, 2022 01:45
@ursabot
Copy link

ursabot commented Dec 27, 2022

Benchmark runs are scheduled for baseline = 130f41a and contender = 43b95e6. 43b95e6 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed] test-mac-arm
[Finished ⬇️2.3% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️2.24% ⬆️0.89%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 43b95e6e ec2-t3-xlarge-us-east-2
[Failed] 43b95e6e test-mac-arm
[Finished] 43b95e6e ursa-i9-9960x
[Finished] 43b95e6e ursa-thinkcentre-m75q
[Finished] 130f41af ec2-t3-xlarge-us-east-2
[Failed] 130f41af test-mac-arm
[Finished] 130f41af ursa-i9-9960x
[Finished] 130f41af ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@ursabot
Copy link

ursabot commented Dec 27, 2022

['Python', 'R'] benchmarks have high level of regressions.
ursa-i9-9960x

EpsilonPrime pushed a commit to EpsilonPrime/arrow that referenced this pull request Jan 5, 2023
…ED=OFF (apache#15075)

If `ARROW_BUILD_SHARED=OFF` is specified, `pkg-config --cflags --libs arrow` doesn't work. Because `pkg-config --cflags --libs arrow` misses build options for static linking. Users need to specify `pkg-config --cflags --libs --static arrow` for static linking even when `ARROW_BUILD_SHARED=OFF` is specified.

This change adds support for `pkg-config --cflags --libs arrow` with `ARROW_BUILD_SHARED=OFF`. The command outputs build options for linking against `libarrow.a`. But these build options don't use static linking for dependencies. On the other hand, `pkg-config --cflags --libs --static arrow` still use static linking for all libraries including Apache Arrow C++ and its dependencies.

With this change, Apache Arrow R doesn't need to use `pkg-config --static`. Because `pkg-config --cflags --libs arrow` works for both of `libarrow.so` and `libarrow.a`.
* Closes: apache#15040

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.

[R][CI] Arrow nightly binaries require aws sdk system dependency
2 participants