Copilot commented on code in PR #55594:
URL: https://github.com/apache/arrow/pull/55594#discussion_r4632756827
##########
r/configure.win:
##########
@@ -69,18 +69,31 @@ function configure_binaries() {
# AZURE_LIBS="-lcurl -lssl -lxml2"
# Set the right flags to point to and enable arrow/parquet
- if [ -d "windows/r-libarrow-windows-x86_64-$VERSION" ]; then
- RWINLIB="../windows/r-libarrow-windows-x86_64-$VERSION"
- else
+ # The directory is named after the Rtools version that built the libarrow
+ # binary, so find what the dir is actually called.
+ RWINLIB_DIR="$(ls windows/ | grep "^r-libarrow-.*-${VERSION}\$" | tail -n 1)"
Review Comment:
When both toolchain directories exist (for example, installing from the same
checkout first with R 4.5 and then R 4.3), this lookup always selects
`rtools45` because it sorts after `rtools40`. Thus, even after
`identify_binary()` downloads the Rtools40 archive, configure links the
incompatible Rtools45 library and the older-R installation fails. Restrict both
directory lookups to the toolchain selected for the running R version,
retaining support for legacy archive names.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]