-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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-17795: [C++][R] Add missing PKG_CONFIG_PATH to use system zstd #14202
Conversation
@github-actions crossbow submit r-binary-packages |
|
This comment was marked as outdated.
This comment was marked as outdated.
@github-actions crossbow submit r-binary-packages |
This comment was marked as outdated.
This comment was marked as outdated.
@github-actions crossbow submit r-binary-packages |
This comment was marked as outdated.
This comment was marked as outdated.
@github-actions crossbow submit r-binary-packages |
This comment was marked as off-topic.
This comment was marked as off-topic.
@github-actions crossbow submit r-binary-packages |
This comment was marked as outdated.
This comment was marked as outdated.
@github-actions crossbow submit r-binary-packages |
This comment was marked as outdated.
This comment was marked as outdated.
@github-actions crossbow submit r-binary-packages |
This comment was marked as outdated.
This comment was marked as outdated.
@github-actions crossbow submit -g r |
Revision: c04e0da Submitted crossbow builds: ursacomputing/crossbow @ actions-4116018602 |
@github-actions crossbow submit test-r-arrow-backwards-compatibility test-r-install-local test-r-offline-maximal |
Revision: 3cef9bf Submitted crossbow builds: ursacomputing/crossbow @ actions-48ab0ff1eb
|
@assignUser You may want to review this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still not sure about the changes to FinzstdAlt.cmake (it worked before and now needs special casing -> a regression in my eyes) but as I don't quite understand them and your fix passes ci... 🤷
Should we add a note in the documentation about this?
export PKG_CONFIG_PATH=${LIB_DIR}/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} | ||
PKG_LIBS="`pkg-config --libs --static --silence-errors ${PKG_CONFIG_NAME}`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are not required for configure.win because we use the mysys stuff anyway right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see configure.win
but it seems that configure.win
doesn't use pkg-config
on release build. configure.win
uses pkg-config
on dev build but it already uses pkg-config --libs ...
.
@@ -324,6 +329,7 @@ jobs: | |||
env: | |||
LIBARROW_BINARY: "FALSE" | |||
ARROW_R_DEV: "TRUE" | |||
CMAKE_FIND_DEBUG_MODE: "ON" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this before merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to keep this to debug a problem in the future.
This step is executed only when the above build step is failed. Is it accepted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 makes sense!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still not sure about the changes to FinzstdAlt.cmake (it worked before and now needs special casing -> a regression in my eyes) but as I don't quite understand them and your fix passes ci... 🤷
Sorry. I explain it:
- ARROW-17728 / ARROW-17728: [C++][Gandiva] Accept LLVM 15.0 #14125 adds support for system
zstdConfig.cmake
(the CMake package for Zstandard) to find system Zstandard - GitHub Actions' Ubuntu hosted runner provides Zstandard installed by Homebrew by default
- GitHub Actions' Ubuntu hosted runner has
$(brew --prefix)/bin
in$PATH
by default - CMake's
find_package
can find$(brew --prefix)/lib/cmake/zstd/zstdConfig.cmake
because$(brew --prefix)/bin
exists in$PATH
See also: https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure"5. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed or by setting the CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH to FALSE. Path entries ending in /bin or /sbin are automatically converted to their parent directories"
- We can use
pkg-config --static ...
to get build flags suitable for static linking pkg-config
usesRequires.private
andLibs.private
in.pc
file only whenpkg-config --static ...
is usedarrow.pc
is generated by our CMake config and our CMake config tries settingRequires.private
andLibs.private
for static linking- Our CMake config adds
pkg-config
package name toRequires.private
for system libraries ( such as Zstandard (installed by Homebrew by default) in this case) only if our CMake config can find.pc
for the system libraries - But our CMake config couldn't add
pkg-config
package name for the system Zstandard (installed by Homebrew by default) because our CMake config couldn't findzstd.pc
for the system Zstandard - Our CMake config can find
zstd.pc
for the system Zstandard by settingPKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig
- GitHub Actions' Ubuntu hosted runner adds
$(brew --prefix)/bin
to$PATH
but doesn't setPKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig
- I think that this is a GitHub Actions' Ubuntu hosted runner's problem not our CMake config's problem. So I set it manually in this pull request.
- GitHub Actions' Ubuntu hosted runner adds
Does the explanation help you?
Should we add a note in the documentation about this?
Hmm. Do you have any idea which documentation page is suitable?
I think that this is a GitHub Actions' Ubuntu hosted runner's specific problem not a general problem. Generally, users will set all related environment variables (PATH
, PKG_CONFIG_PATH
, LD_LIBRARY_PATH
and so on) when they add a new package prefix such as $(brew --prefix)
, /usr/local
and so on.
@@ -324,6 +329,7 @@ jobs: | |||
env: | |||
LIBARROW_BINARY: "FALSE" | |||
ARROW_R_DEV: "TRUE" | |||
CMAKE_FIND_DEBUG_MODE: "ON" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to keep this to debug a problem in the future.
This step is executed only when the above build step is failed. Is it accepted?
export PKG_CONFIG_PATH=${LIB_DIR}/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} | ||
PKG_LIBS="`pkg-config --libs --static --silence-errors ${PKG_CONFIG_NAME}`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see configure.win
but it seems that configure.win
doesn't use pkg-config
on release build. configure.win
uses pkg-config
on dev build but it already uses pkg-config --libs ...
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kou Thanks for the detailed explanation, it helped me a lot! So this issue did not happen before because this is new functionality.
I think that this is a GitHub Actions' Ubuntu hosted runner's specific problem not a general problem.
Now that I understand the issue I agree.
OK. I merge this. |
Benchmark runs are scheduled for baseline = b75e9e9 and contender = 83ad54c. 83ad54c is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
…pache#14202) Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
No description provided.