You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2018/09/19 03:34:38 UTC

[incubator-pulsar] branch py-build-fix-2.1.1 created (now fbc19fd)

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a change to branch py-build-fix-2.1.1
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git.


      at fbc19fd  Enforce boost-python was found by CMake

This branch includes the following new commits:

     new 6de19c8  Fixed linking of boost and boost-python for osx build (#2302)
     new e65143a  Fixed linking of python wrapper to boost-python in MacOS build (#2366)
     new fbc19fd  Enforce boost-python was found by CMake

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-pulsar] 01/03: Fixed linking of boost and boost-python for osx build (#2302)

Posted by mm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch py-build-fix-2.1.1
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git

commit 6de19c8d67777e4fbe322df7e2f02af5df661626
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Fri Aug 3 19:31:22 2018 +0900

    Fixed linking of boost and boost-python for osx build (#2302)
    
    Build of wheels files in OSX is broken due to failures in finding boost after installing from brew.
---
 pulsar-client-cpp/python/pkg/osx/build.sh.template | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/pulsar-client-cpp/python/pkg/osx/build.sh.template b/pulsar-client-cpp/python/pkg/osx/build.sh.template
old mode 100644
new mode 100755
index 5720b27..71687ac
--- a/pulsar-client-cpp/python/pkg/osx/build.sh.template
+++ b/pulsar-client-cpp/python/pkg/osx/build.sh.template
@@ -23,21 +23,29 @@ set -e
 GITTAG=#TAG#
 PYTHONVER=#PYTHONVER#
 
+BOOST_VERSION=1.67
+
 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
 
-brew install openssl git boost pkg-config jsoncpp cmake protobuf260 log4cxx
+brew install openssl git boost@$BOOST_VERSION pkg-config jsoncpp cmake protobuf260 log4cxx
+
+brew link --force boost@$BOOST_VERSION
 
 if [ "$PYTHONVER" = "PYTHON2" ]
 then
-	brew install python@2 boost-python
+	brew install python@2 boost-python@$BOOST_VERSION
+
+	brew link --force boost-python@$BOOST_VERSION
 fi
 
 if [ "$PYTHONVER" = "PYTHON3" ]
 then
-	brew install python boost-python3
+	brew install python boost-python3@BOOST_VERSION
+	brew link --force boost-python3@$BOOST_VERSION
 fi
 
 brew link --force protobuf260
+
 rm -rf incubator-pulsar
 git clone --depth 1 --branch $GITTAG https://github.com/apache/incubator-pulsar.git
 cd incubator-pulsar/pulsar-client-cpp


[incubator-pulsar] 02/03: Fixed linking of python wrapper to boost-python in MacOS build (#2366)

Posted by mm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch py-build-fix-2.1.1
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git

commit e65143a97ad5277682f84cd5f11fe7ad62c78e9c
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Mon Aug 13 16:56:23 2018 -0700

    Fixed linking of python wrapper to boost-python in MacOS build (#2366)
---
 pulsar-client-cpp/python/CMakeLists.txt            |  4 +++-
 pulsar-client-cpp/python/pkg/osx/build.sh.template | 14 ++++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/pulsar-client-cpp/python/CMakeLists.txt b/pulsar-client-cpp/python/CMakeLists.txt
index 8e70f72..d506844 100644
--- a/pulsar-client-cpp/python/CMakeLists.txt
+++ b/pulsar-client-cpp/python/CMakeLists.txt
@@ -35,7 +35,9 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup")
 endif()
 
-set(PYTHON_WRAPPER_LIBS ${Boost_PYTHON_LIBRARY} ${Boost_PYTHON3_LIBRARY})
+# Try all possible boost-python variable namings
+set(PYTHON_WRAPPER_LIBS ${Boost_PYTHON_LIBRARY} ${Boost_PYTHON3_LIBRARY}
+                        ${Boost_PYTHON27-MT_LIBRARY} ${Boost_PYTHON37-MT_LIBRARY})
 
 if (APPLE)
     target_link_libraries(_pulsar -Wl,-all_load pulsarStatic ${PYTHON_WRAPPER_LIBS})
diff --git a/pulsar-client-cpp/python/pkg/osx/build.sh.template b/pulsar-client-cpp/python/pkg/osx/build.sh.template
index 71687ac..40b7420 100755
--- a/pulsar-client-cpp/python/pkg/osx/build.sh.template
+++ b/pulsar-client-cpp/python/pkg/osx/build.sh.template
@@ -27,7 +27,7 @@ BOOST_VERSION=1.67
 
 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
 
-brew install openssl git boost@$BOOST_VERSION pkg-config jsoncpp cmake protobuf260 log4cxx
+brew install openssl git boost@$BOOST_VERSION pkg-config jsoncpp cmake protobuf260
 
 brew link --force boost@$BOOST_VERSION
 
@@ -40,8 +40,8 @@ fi
 
 if [ "$PYTHONVER" = "PYTHON3" ]
 then
-	brew install python boost-python3@BOOST_VERSION
-	brew link --force boost-python3@$BOOST_VERSION
+	brew install python boost-python3
+	brew link --force boost-python3
 fi
 
 brew link --force protobuf260
@@ -52,4 +52,10 @@ cd incubator-pulsar/pulsar-client-cpp
 cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON
 make _pulsar -j8
 cd python
-python setup.py bdist_wheel
+
+if [ "$PYTHONVER" = "PYTHON2" ]
+then
+  python2 setup.py bdist_wheel
+else
+  python3 setup.py bdist_wheel
+fi


[incubator-pulsar] 03/03: Enforce boost-python was found by CMake

Posted by mm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch py-build-fix-2.1.1
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git

commit fbc19fde3d0983daabc70b50ad6f7ec8ea9119af
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Tue Sep 18 20:33:58 2018 -0700

    Enforce boost-python was found by CMake
---
 pulsar-client-cpp/python/CMakeLists.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pulsar-client-cpp/python/CMakeLists.txt b/pulsar-client-cpp/python/CMakeLists.txt
index d506844..78fcc67 100644
--- a/pulsar-client-cpp/python/CMakeLists.txt
+++ b/pulsar-client-cpp/python/CMakeLists.txt
@@ -37,7 +37,12 @@ endif()
 
 # Try all possible boost-python variable namings
 set(PYTHON_WRAPPER_LIBS ${Boost_PYTHON_LIBRARY} ${Boost_PYTHON3_LIBRARY}
-                        ${Boost_PYTHON27-MT_LIBRARY} ${Boost_PYTHON37-MT_LIBRARY})
+                        ${Boost_PYTHON27-MT_LIBRARY} ${Boost_PYTHON37-MT_LIBRARY}
+                        ${Boost_PYTHON27-MT_LIBRARY_RELEASE} ${Boost_PYTHON37-MT_LIBRARY_RELEASE})
+
+if (NOT PYTHON_WRAPPER_LIBS)
+    MESSAGE(FATAL_ERROR "Could not find Boost Python library")
+endif ()
 
 if (APPLE)
     target_link_libraries(_pulsar -Wl,-all_load pulsarStatic ${PYTHON_WRAPPER_LIBS})