arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject arrow git commit: ARROW-753: [Python] Fix linker error for python-test on OS X
Date Sun, 02 Apr 2017 18:40:14 GMT
Repository: arrow
Updated Branches:
  refs/heads/master d54ab9a23 -> c4d535ca1


ARROW-753: [Python] Fix linker error for python-test on OS X

We don't link to libpython in the pyarrow C extensions, but we need to run the googletest
unit tests.

I thought we were building and running this test in Travis CI, but we're not yet. It's not
that easy to add that right now, so this triages the builds in the meantime

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #478 from wesm/ARROW-753 and squashes the following commits:

bcc2455 [Wes McKinney] Fix linker error for python-test on OS X


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/c4d535ca
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/c4d535ca
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/c4d535ca

Branch: refs/heads/master
Commit: c4d535ca1ed98981c62ecceba81fa7c4efeaf66d
Parents: d54ab9a
Author: Wes McKinney <wes.mckinney@twosigma.com>
Authored: Sun Apr 2 14:40:08 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Sun Apr 2 14:40:08 2017 -0400

----------------------------------------------------------------------
 cpp/cmake_modules/FindPythonLibsNew.cmake | 10 ++++------
 cpp/src/arrow/python/CMakeLists.txt       |  2 +-
 2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/c4d535ca/cpp/cmake_modules/FindPythonLibsNew.cmake
----------------------------------------------------------------------
diff --git a/cpp/cmake_modules/FindPythonLibsNew.cmake b/cpp/cmake_modules/FindPythonLibsNew.cmake
index 1000a95..3e248a9 100644
--- a/cpp/cmake_modules/FindPythonLibsNew.cmake
+++ b/cpp/cmake_modules/FindPythonLibsNew.cmake
@@ -148,12 +148,10 @@ if(CMAKE_HOST_WIN32)
         set(PYTHON_LIBRARY "${PYTHON_PREFIX}/libs/libpython${PYTHON_LIBRARY_SUFFIX}.a")
     endif()
 elseif(APPLE)
-     # Seems to require "-undefined dynamic_lookup" instead of linking
-     # against the .dylib, otherwise it crashes. This flag is added
-     # below
-    set(PYTHON_LIBRARY "")
-    #set(PYTHON_LIBRARY
-    #    "${PYTHON_PREFIX}/lib/libpython${PYTHON_LIBRARY_SUFFIX}.dylib")
+  # In Python C extensions on OS X, the flag "-undefined dynamic_lookup" can
+  # avoid certain kinds of dynamic linking issues with portable binaries, so
+  # you should avoid targeting libpython at link time if at all possible
+  set(PYTHON_LIBRARY "${PYTHON_PREFIX}/lib/libpython${PYTHON_LIBRARY_SUFFIX}.dylib")
 else()
     if(${PYTHON_SIZEOF_VOID_P} MATCHES 8)
         set(_PYTHON_LIBS_SEARCH "${PYTHON_PREFIX}/lib64" "${PYTHON_PREFIX}/lib" "${PYTHON_LIBRARY_PATH}")

http://git-wip-us.apache.org/repos/asf/arrow/blob/c4d535ca/cpp/src/arrow/python/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/python/CMakeLists.txt b/cpp/src/arrow/python/CMakeLists.txt
index a8b4cc7..c69d976 100644
--- a/cpp/src/arrow/python/CMakeLists.txt
+++ b/cpp/src/arrow/python/CMakeLists.txt
@@ -39,7 +39,7 @@ set(ARROW_PYTHON_MIN_TEST_LIBS
   arrow_io_static
   arrow_static)
 
-if(NOT APPLE AND ARROW_BUILD_TESTS)
+if(ARROW_BUILD_TESTS)
   ADD_THIRDPARTY_LIB(python
     SHARED_LIB "${PYTHON_LIBRARIES}")
   list(APPEND ARROW_PYTHON_MIN_TEST_LIBS python)


Mime
View raw message