You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "WillAyd (via GitHub)" <gi...@apache.org> on 2025/03/18 23:23:44 UTC
[PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
WillAyd opened a new pull request, #45858:
URL: https://github.com/apache/arrow/pull/45858
### Rationale for this change
The Meson configure runs very slowly in Archery
### What changes are included in this PR?
This makes it so that ccache or sccache can be used
### Are these changes tested?
Yes
### Are there any user-facing changes?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2737794719
> By keeping the work here to the executing environment, all of our modifications are in one place rather than spread between the environment and the build system generator.
Well, `cpp_build.sh` is used mostly for CI but not an official entry point for developers to use.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2734943635
:warning: GitHub issue #45853 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2004993230
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,36 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CC="${CC}"
+ if [ -n "${CC}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CC="ccache ${CC}"
+ else
+ if command -v sccache; then
Review Comment:
This will only enable `sccache` if `CC` is set, is that what we want?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2021030294
##########
dev/tasks/tasks.yml:
##########
@@ -815,7 +815,10 @@ tasks:
ci: github
template: docker-tests/github.linux.yml
params:
- flags: -e ARROW_USE_MESON=ON
+ # ARROWCCACHE=OFF is for using sccache
+ flags: >-
+ -e ARROW_CCACHE=OFF
Review Comment:
But it's spelt `ARROW_USE_CCACHE` above. Are you sure this is working as intended?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2021313135
##########
dev/tasks/tasks.yml:
##########
@@ -815,7 +815,10 @@ tasks:
ci: github
template: docker-tests/github.linux.yml
params:
- flags: -e ARROW_USE_MESON=ON
+ # ARROWCCACHE=OFF is for using sccache
+ flags: >-
+ -e ARROW_CCACHE=OFF
Review Comment:
I have confirmed in crossbow that this is now using sccache:
https://github.com/ursacomputing/crossbow/actions/runs/14175037282/job/39707754711#step:6:417
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2025000395
##########
dev/tasks/tasks.yml:
##########
@@ -815,7 +815,10 @@ tasks:
ci: github
template: docker-tests/github.linux.yml
params:
- flags: -e ARROW_USE_MESON=ON
+ # ARROW_USE_CACHE=OFF is for using sccache
Review Comment:
Note that this is from the request in https://github.com/apache/arrow/pull/45858#issuecomment-2741723075
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2002478098
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
Review Comment:
```suggestion
ORIGINAL_CXX="${CXX}"
```
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ export CXX="ccache ${CXX}"
Review Comment:
```suggestion
export CXX="ccache ${CXX}"
```
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ export CXX="ccache ${CXX}"
+ else
+ export CXX="sccache ${CXX}"
Review Comment:
I think that we don't need `export` here.
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ export CXX="ccache ${CXX}"
+ else
+ export CXX="sccache ${CXX}"
+ fi
meson setup \
--prefix=${MESON_PREFIX:-${ARROW_HOME}} \
--buildtype=${ARROW_BUILD_TYPE:-debug} \
-Dtests=$(meson_boolean ${ARROW_BUILD_TESTS:-OFF}) \
. \
${source_dir}
+
+ export CXX=${ORIGINAL_CXX}
Review Comment:
I think that we don't need `export` here:
```suggestion
CXX="${ORIGINAL_CXX}"
```
If `CXX` is already exported, we don't need to `export` here. If `CXX` isn't exported, we don't need to export an empty `CXX`.
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ export CXX="ccache ${CXX}"
+ else
+ export CXX="sccache ${CXX}"
Review Comment:
```suggestion
if command -v sccache &> /dev/null; then
export CXX="sccache ${CXX}"
fi
```
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ export CXX="ccache ${CXX}"
+ else
+ export CXX="sccache ${CXX}"
+ fi
Review Comment:
Could you surround this with `if [ -n "${CXX}" ]; then ... fi`? `CXX` may not be defined.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2021029474
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,36 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CC="${CC}"
+ if [ -n "${CC}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CC="ccache ${CC}"
+ else
+ if command -v sccache; then
+ CC="sccache ${CC}"
+ fi
+ fi
+ fi
+
+ ORIGINAL_CXX="${CXX}"
+ if [ -n "${CXX}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CXX="ccache ${CXX}"
+ else
+ if command -v sccache; then
+ CXX="sccache ${CXX}"
+ fi
+ fi
+ fi
meson setup \
Review Comment:
Shouldn't we `export` those variables for them to be noticed by the meson process? Or is it just not necessary?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2735189422
Revision: 0ee91da89d066e52cd604e6010de109d55a9f518
Submitted crossbow builds: [ursacomputing/crossbow @ actions-83e6c7432e](https://github.com/ursacomputing/crossbow/branches/all?query=actions-83e6c7432e)
|Task|Status|
|----|------|
|test-conda-cpp-meson|[](https://github.com/ursacomputing/crossbow/actions/runs/13937765800/job/39008844685)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2844919571
Revision: 37687628801f6b8b4b891c5460ab876f3d2c72a6
Submitted crossbow builds: [ursacomputing/crossbow @ actions-7ddf751b7b](https://github.com/ursacomputing/crossbow/branches/all?query=actions-7ddf751b7b)
|Task|Status|
|----|------|
|test-conda-cpp-meson|[](https://github.com/ursacomputing/crossbow/actions/runs/14776824083/job/41486836026)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2741723075
Could you apply this to use sccache with Crossbow? We can't use `actions/cache` + `ccache` with Crossbow.
```diff
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index ebbfd3e078..4b6d916f10 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -815,7 +815,10 @@ tasks:
ci: github
template: docker-tests/github.linux.yml
params:
- flags: -e ARROW_USE_MESON=ON
+ # ARROWCCACHE=OFF is for using sccache
+ flags: >-
+ -e ARROW_CCACHE=OFF
+ -e ARROW_USE_MESON=ON
image: conda-cpp
test-conda-cpp-valgrind:
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2737976856
Revision: 01eaa3bf5b57b2dfe02eb9c9c4dc61975f64dae5
Submitted crossbow builds: [ursacomputing/crossbow @ actions-4079679e7a](https://github.com/ursacomputing/crossbow/branches/all?query=actions-4079679e7a)
|Task|Status|
|----|------|
|test-conda-cpp-meson|[](https://github.com/ursacomputing/crossbow/actions/runs/13955706004/job/39066156690)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2003903816
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
Review Comment:
You will need to handle `CC` in addition to `CXX` (we have a couple C dependencies which also deserve being ccache'd).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2070971869
##########
dev/tasks/tasks.yml:
##########
@@ -657,7 +657,10 @@ tasks:
ci: github
template: docker-tests/github.linux.yml
params:
- flags: -e ARROW_USE_MESON=ON
+ # ARROW_USE_CACHE=OFF is for using sccache
Review Comment:
```suggestion
# ARROW_USE_CCACHE=OFF is for using sccache
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2737971497
@github-actions crossbow submit *meson
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2021236445
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,36 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CC="${CC}"
+ if [ -n "${CC}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CC="ccache ${CC}"
+ else
+ if command -v sccache; then
+ CC="sccache ${CC}"
+ fi
+ fi
+ fi
+
+ ORIGINAL_CXX="${CXX}"
+ if [ -n "${CXX}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CXX="ccache ${CXX}"
+ else
+ if command -v sccache; then
+ CXX="sccache ${CXX}"
+ fi
+ fi
+ fi
meson setup \
Review Comment:
Ah, I see.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2021057784
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,36 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CC="${CC}"
+ if [ -n "${CC}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CC="ccache ${CC}"
+ else
+ if command -v sccache; then
+ CC="sccache ${CC}"
+ fi
+ fi
+ fi
+
+ ORIGINAL_CXX="${CXX}"
+ if [ -n "${CXX}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CXX="ccache ${CXX}"
+ else
+ if command -v sccache; then
+ CXX="sccache ${CXX}"
+ fi
+ fi
+ fi
meson setup \
Review Comment:
My knowledge of bash syntax is pretty limited, but I did start with an export and was asked to remove in https://github.com/apache/arrow/pull/45858#discussion_r2002481071
##########
dev/tasks/tasks.yml:
##########
@@ -815,7 +815,10 @@ tasks:
ci: github
template: docker-tests/github.linux.yml
params:
- flags: -e ARROW_USE_MESON=ON
+ # ARROWCCACHE=OFF is for using sccache
+ flags: >-
+ -e ARROW_CCACHE=OFF
Review Comment:
Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2021072800
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,36 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CC="${CC}"
+ if [ -n "${CC}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CC="ccache ${CC}"
+ else
+ if command -v sccache; then
+ CC="sccache ${CC}"
+ fi
+ fi
+ fi
+
+ ORIGINAL_CXX="${CXX}"
+ if [ -n "${CXX}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CXX="ccache ${CXX}"
+ else
+ if command -v sccache; then
+ CXX="sccache ${CXX}"
+ fi
+ fi
+ fi
meson setup \
Review Comment:
> My knowledge of bash syntax is pretty limited
Same for me... Apparently "being exported" is an attribute that is being set and inherited accross processes, though I don't see it specified clearly in the [POSIX doc](https://pubs.opengroup.org/onlinepubs/009695399/utilities/export.html). Is it bash-specific? @kou
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2002193098
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
+ if [ "${ARROW_USE_CCACHE}" == "ON" ]; then
Review Comment:
Cool thanks for that info. Looks like this file contains a mixed bag of use; I'll leave cleaning up the rest to a separate PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "eli-schwartz (via GitHub)" <gi...@apache.org>.
eli-schwartz commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2002551988
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ export CXX="ccache ${CXX}"
+ else
+ export CXX="sccache ${CXX}"
Review Comment:
command -v is guaranteed to not produce stderr, so you only need to redirect stdout.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2844975806
Any further comments on this one?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "eli-schwartz (via GitHub)" <gi...@apache.org>.
eli-schwartz commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2021212646
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,36 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CC="${CC}"
+ if [ -n "${CC}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CC="ccache ${CC}"
+ else
+ if command -v sccache; then
+ CC="sccache ${CC}"
+ fi
+ fi
+ fi
+
+ ORIGINAL_CXX="${CXX}"
+ if [ -n "${CXX}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CXX="ccache ${CXX}"
+ else
+ if command -v sccache; then
+ CXX="sccache ${CXX}"
+ fi
+ fi
+ fi
meson setup \
Review Comment:
In section 2.12 of the Shell Command Language: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
The shell execution environment is described as:
> Variables with the export attribute, along with those explicitly exported for the duration of the command, shall be passed to the utility environment variables
which works together with the docs you linked for the `export` special built-in command, that notes that the effect of `export XXX` is to mark the variable `XXX` with the export attribute.
In section 2.5.3, shell variables:
> If a variable is initialized from the environment, it shall be marked for export immediately; see the export special built-in.
That is the distinction of an environment variable inherited from the parent process: it is marked for export "immediately", rather than when you use the `export` special built-in.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2810505704
Revision: 8f646a868e5309f47e0e95f614b0bff8aa42ef41
Submitted crossbow builds: [ursacomputing/crossbow @ actions-1b31b845a1](https://github.com/ursacomputing/crossbow/branches/all?query=actions-1b31b845a1)
|Task|Status|
|----|------|
|test-conda-cpp-meson|[](https://github.com/ursacomputing/crossbow/actions/runs/14500567918/job/40678990281)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "eli-schwartz (via GitHub)" <gi...@apache.org>.
eli-schwartz commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2002187650
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
+ if [ "${ARROW_USE_CCACHE}" == "ON" ]; then
Review Comment:
Nit: elsewhere in this file, a single equals sign is used. The script shebang uses GNU Bash, rather than `/bin/sh`, so this silently works anyway, but `[` is a POSIX utility and differs from Bash-specific `[[`.
The POSIX definition of `[` does not accept `==`. Even GNU Bash only supports `==` as doing the same thing as `=`. It is literally "you can spell it either way, in case you want to". Zero semantic difference between the two, so I would simply use a single equals everywhere.
...
I think it's terrible that bash supports it, personally -- the only use case I have ever seen for `==` is for:
> Yeah, so, I'd like to intentionally write scripts that wreck my ability to remember what works in /bin/sh scripts, so that on the occasion I need to write /bin/sh scripts my muscle memory has me accidentally writing bashisms that fail in production.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2737777338
I don't have a strong preference, but I think the downside to handling this in the Meson configuration is that Meson natively handles finding ccache, i.e. if we did not touch the environment variables it would detect and use it appropriately.
By keeping the work here to the executing environment, all of our modifications are in one place rather than spread between the environment and the build system generator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2005169689
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,36 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CC="${CC}"
+ if [ -n "${CC}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CC="ccache ${CC}"
+ else
+ if command -v sccache; then
Review Comment:
When CC is not set if Meson detects a caching tool on the system Meson should use it automatically. sccache gets a higher priority than ccache.
See also https://mesonbuild.com/Feature-autodetection.html#ccache
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2810499226
@github-actions crossbow submit *meson
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2766555763
@github-actions crossbow submit *meson
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2766561846
Revision: ee58e3469bdb9c15283e402fd688fe67df8f2720
Submitted crossbow builds: [ursacomputing/crossbow @ actions-c8a044df8f](https://github.com/ursacomputing/crossbow/branches/all?query=actions-c8a044df8f)
|Task|Status|
|----|------|
|test-conda-cpp-meson|[](https://github.com/ursacomputing/crossbow/actions/runs/14175037282/job/39707754711)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2024727068
##########
dev/tasks/tasks.yml:
##########
@@ -815,7 +815,10 @@ tasks:
ci: github
template: docker-tests/github.linux.yml
params:
- flags: -e ARROW_USE_MESON=ON
+ # ARROW_USE_CACHE=OFF is for using sccache
Review Comment:
Yes - instead of using ccache this will use sccache.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2844915777
@github-actions crossbow submit *meson
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2024704581
##########
dev/tasks/tasks.yml:
##########
@@ -815,7 +815,10 @@ tasks:
ci: github
template: docker-tests/github.linux.yml
params:
- flags: -e ARROW_USE_MESON=ON
+ # ARROW_USE_CACHE=OFF is for using sccache
Review Comment:
Does this mean ccache won't be used here? CMake-based docker builds use ccache by default, which is very useful for local development work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "eli-schwartz (via GitHub)" <gi...@apache.org>.
eli-schwartz commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2002557632
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
Review Comment:
Many people recommend always quoting variables for stylistic reasons. That being said, this is a variable assignment. Variable assignments do perform tilde expansion, parameter expansion, command substitution, arithmetic expansion, and quote removal, but they don't perform field splitting. Quoting the right hand side is not necessary to prevent field splitting.
(In the case of `CXX="ccache ${CXX}"` the quotes do not do field splitting but rather, field joining. :slightly_smiling_face: )
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2002658531
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CXX=${CXX}
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ export CXX="ccache ${CXX}"
+ else
+ export CXX="sccache ${CXX}"
Review Comment:
Wow! I didn't know it!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2737513320
Do we want to do this implicitly in the Meson configuration instead of having the user enable it explicitly? This is how the CMake configuration works, after all.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2005202794
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,36 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CC="${CC}"
+ if [ -n "${CC}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CC="ccache ${CC}"
+ else
+ if command -v sccache; then
Review Comment:
Ah, ok. It's a pity we have to replicate the same logic here...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2735187079
@github-actions crossbow submit *meson
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++] Fix Meson compilation issues in Archery [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2737797846
It would be nice if Meson had something like [`CMAKE_{C,CXX}_COMPILER_LAUNCHER`](https://cmake.org/cmake/help/latest/envvar/CMAKE_LANG_COMPILER_LAUNCHER.html).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "eli-schwartz (via GitHub)" <gi...@apache.org>.
eli-schwartz commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2021212646
##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,36 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
fi
}
+ ORIGINAL_CC="${CC}"
+ if [ -n "${CC}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CC="ccache ${CC}"
+ else
+ if command -v sccache; then
+ CC="sccache ${CC}"
+ fi
+ fi
+ fi
+
+ ORIGINAL_CXX="${CXX}"
+ if [ -n "${CXX}" ]; then
+ if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+ CXX="ccache ${CXX}"
+ else
+ if command -v sccache; then
+ CXX="sccache ${CXX}"
+ fi
+ fi
+ fi
meson setup \
Review Comment:
In section 2.12 of the Shell Command Language: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
The shell execution environment is described as:
> Variables with the export attribute, along with those explicitly exported for the duration of the command, shall be passed to the utility environment variables
which works together with the docs you linked for the `export` special built-in command, that notes that the effect of `export XXX` is to mark the variable `XXX` with the export attribute.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2025024674
##########
dev/tasks/tasks.yml:
##########
@@ -815,7 +815,10 @@ tasks:
ci: github
template: docker-tests/github.linux.yml
params:
- flags: -e ARROW_USE_MESON=ON
+ # ARROW_USE_CACHE=OFF is for using sccache
Review Comment:
Ah, sorry, I misread. Since it's in `dev/tasks/tasks.yml`, not `docker-compose.yml`, it is fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou merged PR #45858:
URL: https://github.com/apache/arrow/pull/45858
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-45853: [C++][Dev] Fix Meson compilation issues in Docker builds [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #45858:
URL: https://github.com/apache/arrow/pull/45858#issuecomment-2846928984
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 24b0d917221ce3c631361542a875cfd605b9a2c0.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/41536442762) has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org