Skip to content

Commit

Permalink
[build] Fix boost compilation on latest macOS Catalina
Browse files Browse the repository at this point in the history
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:
boostorg/build#560

See boostorg/build#440 for additional context.

Change-Id: Ie6bb488dcadf215be708ae1b1e89ddd77bd30074
Reviewed-on: http://gerrit.cloudera.org:8080/15632
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
Reviewed-by: Andrew Wong <[email protected]>
  • Loading branch information
granthenke committed Apr 2, 2020
1 parent fa2d4c7 commit e6fa761
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
5 changes: 3 additions & 2 deletions thirdparty/download-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
19 changes: 19 additions & 0 deletions thirdparty/patches/boost-issue-440-darwin-version.patch
Original file line number Diff line number Diff line change
@@ -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 ;
}

0 comments on commit e6fa761

Please sign in to comment.