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
[R] Support gnu libtool? #40248
Comments
Does this work? diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake
index 083ac2fe9a..c8da0d43d4 100644
--- a/cpp/cmake_modules/BuildUtils.cmake
+++ b/cpp/cmake_modules/BuildUtils.cmake
@@ -96,10 +96,7 @@ function(arrow_create_merged_static_lib output_target)
list(APPEND all_library_paths $<TARGET_FILE:${lib}>)
endforeach()
- if(APPLE)
- set(BUNDLE_COMMAND "libtool" "-no_warning_for_no_symbols" "-static" "-o"
- ${output_lib_path} ${all_library_paths})
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|GNU|Intel|IntelLLVM)$")
+ if(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|GNU|Intel|IntelLLVM)$")
set(ar_script_path ${CMAKE_BINARY_DIR}/${ARG_NAME}.ar)
file(WRITE ${ar_script_path}.in "CREATE ${output_lib_path}\n")
@@ -120,7 +117,9 @@ function(arrow_create_merged_static_lib output_target)
endif()
set(BUNDLE_COMMAND ${ar_tool} -M < ${ar_script_path})
-
+ elseif(APPLE)
+ set(BUNDLE_COMMAND "libtool" "-no_warning_for_no_symbols" "-static" "-o"
+ ${output_lib_path} ${all_library_paths})
elseif(MSVC)
if(CMAKE_LIBTOOL)
set(BUNDLE_TOOL ${CMAKE_LIBTOOL}) |
BTW, can we see all build log? |
Oh, yes, I can try that as well — when I tried that locally I saw errors with arguments being passed to |
Ok I've tried swapping those if/else blocks (locally) and on macOS we still hit the |
I also tried adding
|
Ah, sorry. I should have explained the idea of the suggested patch. In general, Apache Arrow C++ build uses Apple's C/C++ toolchain. So If macOS + CRAN build does NOT use Apple's C/C++ toolchain (uses C/C++ toolchain provided by R.framework that also includes GNU libtool, gcc, g++, GNU ar and so on), |
Ah, right got it — in this case I don't think that CRAN is using a full toolchain in R.framework. The most direct evidence is in the CRAN logs:
The bin dir of that framework also doesn't have too much there (though does have libtool!):
|
Thanks!
Oh, why... OK. We need to choose your approach (#40259). |
😂 |
…40259) ### Rationale for this change On the CRAN build machines the GNU libtool is on the path in front of the macOS libtool. Though these are named the same thing, they are actually very different and don't actually appear to be substitutes I checked on a non-developer's machine to see if `/usr/bin/libtool` exists, and it did. So I believe we _should_ be ok with this even if xcode / command line tools haven't been installed. One note: it's possible that we could get the GNU libtool in link mode to work with the right incantation (something like `libtool --mode=link --tag=CXX ${cmake_compiler} -o ...` but when I tried this I kept getting symbol not found errors. Ultimately, I think any mac that we are on will have the apple-provided libtool, so decided to go the route of finding it. ### What changes are included in this PR? When we detect we are on a GNU libtool, we look to `/usr/bin/libtool` instead. ### Are these changes tested? Yes. See a broken config failing at #40259 (comment) and then the next one passes ### Are there any user-facing changes? We will remain on CRAN **This PR contains a "Critical Fix".** * GitHub Issue: #40248 Lead-authored-by: Jonathan Keane <jkeane@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Jonathan Keane <jkeane@gmail.com>
Issue resolved by pull request 40259 |
…40259) ### Rationale for this change On the CRAN build machines the GNU libtool is on the path in front of the macOS libtool. Though these are named the same thing, they are actually very different and don't actually appear to be substitutes I checked on a non-developer's machine to see if `/usr/bin/libtool` exists, and it did. So I believe we _should_ be ok with this even if xcode / command line tools haven't been installed. One note: it's possible that we could get the GNU libtool in link mode to work with the right incantation (something like `libtool --mode=link --tag=CXX ${cmake_compiler} -o ...` but when I tried this I kept getting symbol not found errors. Ultimately, I think any mac that we are on will have the apple-provided libtool, so decided to go the route of finding it. ### What changes are included in this PR? When we detect we are on a GNU libtool, we look to `/usr/bin/libtool` instead. ### Are these changes tested? Yes. See a broken config failing at #40259 (comment) and then the next one passes ### Are there any user-facing changes? We will remain on CRAN **This PR contains a "Critical Fix".** * GitHub Issue: #40248 Lead-authored-by: Jonathan Keane <jkeane@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Jonathan Keane <jkeane@gmail.com>
…U one (apache#40259) ### Rationale for this change On the CRAN build machines the GNU libtool is on the path in front of the macOS libtool. Though these are named the same thing, they are actually very different and don't actually appear to be substitutes I checked on a non-developer's machine to see if `/usr/bin/libtool` exists, and it did. So I believe we _should_ be ok with this even if xcode / command line tools haven't been installed. One note: it's possible that we could get the GNU libtool in link mode to work with the right incantation (something like `libtool --mode=link --tag=CXX ${cmake_compiler} -o ...` but when I tried this I kept getting symbol not found errors. Ultimately, I think any mac that we are on will have the apple-provided libtool, so decided to go the route of finding it. ### What changes are included in this PR? When we detect we are on a GNU libtool, we look to `/usr/bin/libtool` instead. ### Are these changes tested? Yes. See a broken config failing at apache#40259 (comment) and then the next one passes ### Are there any user-facing changes? We will remain on CRAN **This PR contains a "Critical Fix".** * GitHub Issue: apache#40248 Lead-authored-by: Jonathan Keane <jkeane@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Jonathan Keane <jkeane@gmail.com>
…40259) ### Rationale for this change On the CRAN build machines the GNU libtool is on the path in front of the macOS libtool. Though these are named the same thing, they are actually very different and don't actually appear to be substitutes I checked on a non-developer's machine to see if `/usr/bin/libtool` exists, and it did. So I believe we _should_ be ok with this even if xcode / command line tools haven't been installed. One note: it's possible that we could get the GNU libtool in link mode to work with the right incantation (something like `libtool --mode=link --tag=CXX ${cmake_compiler} -o ...` but when I tried this I kept getting symbol not found errors. Ultimately, I think any mac that we are on will have the apple-provided libtool, so decided to go the route of finding it. ### What changes are included in this PR? When we detect we are on a GNU libtool, we look to `/usr/bin/libtool` instead. ### Are these changes tested? Yes. See a broken config failing at #40259 (comment) and then the next one passes ### Are there any user-facing changes? We will remain on CRAN **This PR contains a "Critical Fix".** * GitHub Issue: #40248 Lead-authored-by: Jonathan Keane <jkeane@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Jonathan Keane <jkeane@gmail.com>
Describe the enhancement requested
We currently are failing on most macOS systems on CRAN. It appears that the CRAN runners have GNU libtool installed instead of the xcode version so we need to avoid
'-no_warning_for_no_symbols'
.Note: the mac builder CRAN machine does not exhibit this behavior. So we will need to test this on our own.
Component(s)
R
The text was updated successfully, but these errors were encountered: