kou commented on PR #49575:
URL: https://github.com/apache/arrow/pull/49575#issuecomment-4114663588

   Hmm. I don't know why this fixes the problem... The build doesn't use LLVM 
because Gandiva is off. Why do clang based tools relate to linked libraries...?
   
   Anyway, we don't need them. Can we solve the problem by removing clang-tools 
and infer-tools related codes something like the following?
   
   ```diff
   diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
   index ea15bb7066..a77ed39eac 100644
   --- a/cpp/CMakeLists.txt
   +++ b/cpp/CMakeLists.txt
   @@ -211,17 +211,6 @@ else()
      set(MSVC_TOOLCHAIN FALSE)
    endif()
    
   -find_package(ClangTools)
   -find_package(InferTools)
   -if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1"
   -   OR CLANG_TIDY_FOUND
   -   OR INFER_FOUND)
   -  # Generate a Clang compile_commands.json "compilation database" file for 
use
   -  # with various development tools, such as Vim's YouCompleteMe plugin.
   -  # See http://clang.llvm.org/docs/JSONCompilationDatabase.html
   -  set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
   -endif()
   -
    # Needed for Gandiva.
    # Use the first Python installation on PATH, not the newest one
    set(Python3_FIND_STRATEGY "LOCATION")
   @@ -649,22 +638,6 @@ if(UNIX)
                        VERBATIM)
    endif(UNIX)
    
   -#
   -# "make infer" target
   -#
   -
   -if(${INFER_FOUND})
   -  # runs infer capture
   -  add_custom_target(infer ${BUILD_SUPPORT_DIR}/run-infer.sh ${INFER_BIN}
   -                          ${CMAKE_BINARY_DIR}/compile_commands.json 1)
   -  # runs infer analyze
   -  add_custom_target(infer-analyze ${BUILD_SUPPORT_DIR}/run-infer.sh 
${INFER_BIN}
   -                                  ${CMAKE_BINARY_DIR}/compile_commands.json 
2)
   -  # runs infer report
   -  add_custom_target(infer-report ${BUILD_SUPPORT_DIR}/run-infer.sh 
${INFER_BIN}
   -                                 ${CMAKE_BINARY_DIR}/compile_commands.json 
3)
   -endif()
   -
    #
    # Link targets
    #
   ```
   
   ```bash
   git rm cpp/cmake_modules/FindClangTools.cmake
   git rm cpp/cmake_modules/FindInferTools.cmake
   ```


-- 
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]

Reply via email to