You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/05/27 21:16:31 UTC

[GitHub] [arrow] kou commented on a change in pull request #7284: ARROW-7409: [C++][Python] Windows link error LNK1104: cannot open file 'python37_d.lib'

kou commented on a change in pull request #7284:
URL: https://github.com/apache/arrow/pull/7284#discussion_r431438314



##########
File path: cpp/cmake_modules/DefineOptions.cmake
##########
@@ -120,6 +120,8 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
 
   define_option(ARROW_GGDB_DEBUG "Pass -ggdb flag to debug builds" ON)
 
+  define_option(ARROW_USE_DEPRECATED_FIND_PYTHONLIBS "Force using deprecated FindPythonLibsNew script" OFF)

Review comment:
       Could you remove this?
   This isn't used for forcing using deprecated `FindPythonLibsNew`.

##########
File path: cpp/src/arrow/python/CMakeLists.txt
##########
@@ -60,7 +60,11 @@ endif()
 
 set(ARROW_PYTHON_SHARED_LINK_LIBS arrow_shared)
 if(WIN32)
-  list(APPEND ARROW_PYTHON_SHARED_LINK_LIBS ${PYTHON_LIBRARIES} ${PYTHON_OTHER_LIBS})
+  if(ARROW_USE_DEPRECATED_FIND_PYTHONLIBS)
+    list(APPEND ARROW_PYTHON_SHARED_LINK_LIBS $<$<CONFIG:Debug>:${PYTHON_DEBUG_LIBRARIES}> $<$<CONFIG:Release>:${PYTHON_LIBRARIES}>)
+  else()
+    list(APPEND ARROW_PYTHON_SHARED_LINK_LIBS ${PYTHON_OTHER_LIBS})

Review comment:
       `${PYTHON_OTHER_LIBS}` should be always used.

##########
File path: cpp/cmake_modules/FindPythonLibsNew.cmake
##########
@@ -246,7 +248,7 @@ FUNCTION(PYTHON_ADD_MODULE _NAME )
       SET_TARGET_PROPERTIES(${_NAME} PROPERTIES LINK_FLAGS
                           "-undefined dynamic_lookup")
     ELSEIF(MSVC)
-      target_link_libraries(${_NAME} ${PYTHON_LIBRARIES})
+      target_link_libraries(${_NAME} ${PYTHON_LIBRARIES} $<$<CONFIG:Debug>:${PYTHON_DEBUG_LIBRARIES}> $<$<CONFIG:Release>:${PYTHON_LIBRARIES}>)

Review comment:
       `${PYTHON_LIBRARIES}` is duplicated in the `Release` configuration.
   




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org