You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2020/04/02 00:11:25 UTC

[kudu] branch master updated: [build] Fix boost compilation on latest macOS Catalina

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

granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new e6fa761  [build] Fix boost compilation on latest macOS Catalina
e6fa761 is described below

commit e6fa761a4a60118bb61883fe8342943253f350d2
Author: Grant Henke <gr...@apache.org>
AuthorDate: Wed Apr 1 14:02:20 2020 -0500

    [build] Fix boost compilation on latest macOS Catalina
    
    The latest Catalina update broke boost due to bad version parsing/checks.
    This patch applies the fix from the below pull request as a patch:
    https://github.com/boostorg/build/pull/560
    
    See https://github.com/boostorg/build/issues/440 for additional context.
    
    Change-Id: Ie6bb488dcadf215be708ae1b1e89ddd77bd30074
    Reviewed-on: http://gerrit.cloudera.org:8080/15632
    Tested-by: Kudu Jenkins
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Reviewed-by: Alexey Serbin <as...@cloudera.com>
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
 thirdparty/download-thirdparty.sh                     |  5 +++--
 .../patches/boost-issue-440-darwin-version.patch      | 19 +++++++++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh
index 9a137af..ab4e8ed 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -347,12 +347,13 @@ fetch_and_patch \
  $TRACE_VIEWER_SOURCE \
  $TRACE_VIEWER_PATCHLEVEL
 
-BOOST_PATCHLEVEL=1
+BOOST_PATCHLEVEL=2
 fetch_and_patch \
  boost_${BOOST_VERSION}.tar.gz \
  $BOOST_SOURCE \
  $BOOST_PATCHLEVEL \
- "patch -p0 < $TP_DIR/patches/boost-issue-12179-fix-compilation-errors.patch"
+ "patch -p0 < $TP_DIR/patches/boost-issue-12179-fix-compilation-errors.patch" \
+ "patch -p0 < $TP_DIR/patches/boost-issue-440-darwin-version.patch"
 
 # Return 0 if the current system appears to be el6 (either CentOS or proper RHEL)
 needs_openssl_workaround() {
diff --git a/thirdparty/patches/boost-issue-440-darwin-version.patch b/thirdparty/patches/boost-issue-440-darwin-version.patch
new file mode 100644
index 0000000..f2ab695
--- /dev/null
+++ b/thirdparty/patches/boost-issue-440-darwin-version.patch
@@ -0,0 +1,19 @@
+--- tools/build/src/tools/darwin.jam
++++ tools/build/src/tools/darwin.jam
+@@ -137,13 +137,14 @@ rule init ( version ? : command * : options * : requirement * )
+     # - Set the toolset generic common options.
+     common.handle-options darwin : $(condition) : $(command) : $(options) ;
+     
++    real-version = [ regex.split $(real-version) \\. ] ;
+     # - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
+-    if $(real-version) < "4.0.0"
++    if [ version.version-less $(real-version) : 4 0 ]
+     {
+         flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
+     }
+     # - GCC 4.2 and higher in Darwin does not have -Wno-long-double.
+-    if $(real-version) < "4.2.0"
++    if [ version.version-less $(real-version) : 4 2 ]
+     {
+         flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
+     }