You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jonkeane (via GitHub)" <gi...@apache.org> on 2026/02/22 17:44:40 UTC
[PR] GH-49369: [C++][R] Deal with validating libtool again [arrow]
jonkeane opened a new pull request, #49370:
URL: https://github.com/apache/arrow/pull/49370
### Rationale for this change
Deal with bespoke frameworks on CRAN machines, ensure we can detect Apple-provided `libtool` as opposed to GNU `libtool`. Modernize cmake.
### What changes are included in this PR?
Use `VALIDATOR` to validate `libtool`, a slightly more flexible regex
### Are these changes tested?
Yes
### Are there any user-facing changes?
No, well just 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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3941445841
@github-actions crossbow submit test-r-install-local
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3945018608
This is something that showed up on CRAN: the red M1Mac on https://cran.r-project.org/web/checks/check_results_arrow.html.
```
-- CMAKE_CXX_FLAGS_RELEASE: -O3 -DNDEBUG -O2
CMake Error at cmake_modules/BuildUtils.cmake:114 (message):
libtool found appears not to be Apple's libtool: /usr/bin/libtool
```
And then separately I also received this from one of the CRAN maintainers:
```
/usr/bin/libtool -V
Apple Inc. version cctools_ld-1266.5
```
The whole reason for this detection issue is because some CRAN machines had GNU `libtool` (an _entirely different tool_ higher on their path than the apple-provided `libtool` that does the linking we want/need see #40259). So we sniffed for a string that could tell the difference. I'm not sure why on this machine (suddenly! nothing in our code here has changed since 2024...) the version string is slightly different, but this new regex is a bit more flexible.
We test this in crossbow jobs installing macos locally https://github.com/ursacomputing/crossbow/actions/runs/22282130627/job/64454329380#step:9:790 which we setup to use GNU `libtool` specially: https://github.com/ursacomputing/crossbow/actions/runs/22282130627/job/64454329380#step:6:2 though that runner has the standard (apple) `libtool` version string that we detect just fine with our stricter regex.
I am also going to add a print if I can to the cmake to also print out the version string we get when it errors so that we didn't need one of the CRAN maintainers to send us the string.
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3941434155
Revision: b6fa4e78553f9590dd82573b9d240a3edd424778
Submitted crossbow builds: [ursacomputing/crossbow @ actions-dd37c5e22c](https://github.com/ursacomputing/crossbow/branches/all?query=actions-dd37c5e22c)
|Task|Status|
|----|------|
|test-r-install-local|[](https://github.com/ursacomputing/crossbow/actions/runs/22282130627/job/64454329382)|
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3941448600
Revision: dcc373dbef1d42fa037f5ee00aff191b8e182651
Submitted crossbow builds: [ursacomputing/crossbow @ actions-cb360883d6](https://github.com/ursacomputing/crossbow/branches/all?query=actions-cb360883d6)
|Task|Status|
|----|------|
|test-r-install-local|[](https://github.com/ursacomputing/crossbow/actions/runs/22282311546/job/64454769116)|
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3941610826
The failures are either on main (macos 14) or transient (ubuntu gcc)
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3948374457
@github-actions crossbow submit test-r-install-local
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3948427621
Revision: 7f0f2a6a4cdb6b9b361cd15569142caaec30ff36
Submitted crossbow builds: [ursacomputing/crossbow @ actions-2fb3dea162](https://github.com/ursacomputing/crossbow/branches/all?query=actions-2fb3dea162)
|Task|Status|
|----|------|
|test-r-install-local|[](https://github.com/ursacomputing/crossbow/actions/runs/22333228953/job/64620016459)|
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3948421710
@github-actions crossbow submit test-r-install-local
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane merged PR #49370:
URL: https://github.com/apache/arrow/pull/49370
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #49370:
URL: https://github.com/apache/arrow/pull/49370#discussion_r2843894818
##########
cpp/cmake_modules/BuildUtils.cmake:
##########
@@ -91,28 +91,59 @@ function(arrow_create_merged_static_lib output_target)
endforeach()
if(APPLE)
+ # Get the version string from a libtool binary.
+ function(get_libtool_version item result_var)
+ execute_process(COMMAND "${item}" -V
+ OUTPUT_VARIABLE _version
+ OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+ set(${result_var}
+ "${_version}"
+ PARENT_SCOPE)
+ endfunction()
+
+ # Validator function to confirm that the libtool is Apple's libtool.
+ # The apple-distributed libtool is what we want for bundling, but there is
+ # a GNU libtool that has a name collision (and happens to be bundled with R, too).
+ # We are not compatible with GNU libtool, so we need to avoid it.
+ function(validate_apple_libtool result_var item)
+ get_libtool_version("${item}" libtool_version)
+ if("${libtool_version}" MATCHES ".*cctools.+([0-9.]+).*")
+ set(${result_var}
+ TRUE
+ PARENT_SCOPE)
+ else()
+ set(${result_var}
+ FALSE
+ PARENT_SCOPE)
+ endif()
+ endfunction()
Review Comment:
It seems that we need to set only when the given `item` is invalid:
```suggestion
if(NOT "${libtool_version}" MATCHES ".*cctools.+([0-9.]+).*")
set(${result_var}
FALSE
PARENT_SCOPE)
endif()
endfunction()
```
https://cmake.org/cmake/help/latest/command/find_program.html
> The result variable will hold a true value when the validator function is entered.
>
> ```cmake
> function(my_check validator_result_var item)
> if(NOT item MATCHES ...)
> set(${validator_result_var} FALSE PARENT_SCOPE)
> endif()
> endfunction()
> ```
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3941431334
@github-actions crossbow submit test-r-install-local
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3948380727
Revision: ad966fa9e8cd11a40b5d0dd80d5ee8283e7a802f
Submitted crossbow builds: [ursacomputing/crossbow @ actions-69584c2a2e](https://github.com/ursacomputing/crossbow/branches/all?query=actions-69584c2a2e)
|Task|Status|
|----|------|
|test-r-install-local|[](https://github.com/ursacomputing/crossbow/actions/runs/22332896846/job/64618987437)|
--
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-49369: [C++][R] Deal with validating libtool again [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49370:
URL: https://github.com/apache/arrow/pull/49370#issuecomment-3949843064
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit cbe2618431e413f12aa16aeba88b3a98914f194b.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/64645723238) has more details. It also includes information about 1 possible false positive 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