-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[C++] ARM64 Windows: Can't build 'arrow_bundled_dependencies.lib' successfully #44368
Comments
Could you try the following? diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake
index 692efa7837..3e0a1536c3 100644
--- a/cpp/cmake_modules/BuildUtils.cmake
+++ b/cpp/cmake_modules/BuildUtils.cmake
@@ -119,6 +119,17 @@ function(arrow_create_merged_static_lib output_target)
set(BUNDLE_COMMAND ${LIBTOOL_MACOS} "-no_warning_for_no_symbols" "-static" "-o"
${output_lib_path} ${all_library_paths})
+ elseif(MSVC)
+ if(CMAKE_LIBTOOL)
+ set(BUNDLE_TOOL ${CMAKE_LIBTOOL})
+ else()
+ find_program(BUNDLE_TOOL lib HINTS "${CMAKE_CXX_COMPILER}/..")
+ if(NOT BUNDLE_TOOL)
+ message(FATAL_ERROR "Cannot locate lib.exe to bundle libraries")
+ endif()
+ endif()
+ set(BUNDLE_COMMAND ${BUNDLE_TOOL} /NOLOGO /OUT:${output_lib_path}
+ ${all_library_paths})
elseif(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|GNU|Intel|IntelLLVM)$")
set(ar_script_path ${CMAKE_BINARY_DIR}/${ARG_NAME}.ar)
@@ -140,18 +151,6 @@ function(arrow_create_merged_static_lib output_target)
endif()
set(BUNDLE_COMMAND ${ar_tool} -M < ${ar_script_path})
-
- elseif(MSVC)
- if(CMAKE_LIBTOOL)
- set(BUNDLE_TOOL ${CMAKE_LIBTOOL})
- else()
- find_program(BUNDLE_TOOL lib HINTS "${CMAKE_CXX_COMPILER}/..")
- if(NOT BUNDLE_TOOL)
- message(FATAL_ERROR "Cannot locate lib.exe to bundle libraries")
- endif()
- endif()
- set(BUNDLE_COMMAND ${BUNDLE_TOOL} /NOLOGO /OUT:${output_lib_path}
- ${all_library_paths})
else()
message(FATAL_ERROR "Unknown bundle scenario!")
endif() |
@kou Thanks you so much! WIth this change, I can compile "arrow_bundled_dependencies.lib" successfully. |
kou
added a commit
to kou/arrow
that referenced
this issue
Oct 13, 2024
…ven with "clang-cl" We can use MSVC tool such as "lib" with "clang-cl" build because it's a MSVC like build.
kou
changed the title
[C++] ARM64 Windows: Can't build 'arrow_bundled_dependencies.lib' successfully.
[C++] ARM64 Windows: Can't build 'arrow_bundled_dependencies.lib' successfully
Oct 13, 2024
kou
added a commit
that referenced
this issue
Oct 16, 2024
…th "clang-cl" (#44391) ### Rationale for this change We need to use "clang-cl" for Windows ARM64. We can use MSVC tool such as "lib" for generating bundled dependencies with "clang-cl" build because it's a MSVC like build. ### What changes are included in this PR? Prefer "lib" to `${CMAKE_AR}` with "clang-cl" for generating bundled dependencies. It seems that `${CMAKE_AR}` doesn't generate `arrow_bundled_dependencies.lib`. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * GitHub Issue: #44368 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
Issue resolved by pull request 44391 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug, including details regarding any error messages, version, and platform.
I'll get below error message while I compile Arrow in ARM64 windows. May I get your support on this issue? Thanks in advance!
More info can be found here:
#44310 (comment)
Component(s)
C++
The text was updated successfully, but these errors were encountered: