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

adar 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 b04cb34  [thirdparty] Bump LZ4 to version 1.9.1
b04cb34 is described below

commit b04cb34e6da79842d0239a3a9cf565d68090c32b
Author: Yingchun Lai <[email protected]>
AuthorDate: Tue Aug 13 10:32:55 2019 +0800

    [thirdparty] Bump LZ4 to version 1.9.1
    
    New version of LZ4 have some speed improvements, we ought to
    upgrade it.
    
    Change-Id: I11c0de2db6d524b7f40c905a2a0abb0cb12a281b
    Reviewed-on: http://gerrit.cloudera.org:8080/14045
    Tested-by: Kudu Jenkins
    Reviewed-by: Alexey Serbin <[email protected]>
    Reviewed-by: Adar Dembo <[email protected]>
---
 src/kudu/util/CMakeLists.txt                       |  5 +++
 thirdparty/build-definitions.sh                    |  4 +-
 thirdparty/download-thirdparty.sh                  |  7 ++-
 ...Fix-cmake-build-to-use-gnu-flags-on-clang.patch | 51 ----------------------
 thirdparty/vars.sh                                 |  4 +-
 5 files changed, 12 insertions(+), 59 deletions(-)

diff --git a/src/kudu/util/CMakeLists.txt b/src/kudu/util/CMakeLists.txt
index a9a56ce..be764c5 100644
--- a/src/kudu/util/CMakeLists.txt
+++ b/src/kudu/util/CMakeLists.txt
@@ -313,9 +313,14 @@ set(UTIL_COMPRESSION_LIBS
   lz4
   snappy
   zlib)
+
 ADD_EXPORTABLE_LIBRARY(kudu_util_compression
   SRCS ${UTIL_COMPRESSION_SRCS}
   DEPS ${UTIL_COMPRESSION_LIBS})
+# Define LZ4_DISABLE_DEPRECATE_WARNINGS to mute warnings like:
+# "'int LZ4_compress(const char*, char*, int)' is deprecated".
+target_compile_definitions(kudu_util_compression PUBLIC 
LZ4_DISABLE_DEPRECATE_WARNINGS)
+target_compile_definitions(kudu_util_compression_exported PUBLIC 
LZ4_DISABLE_DEPRECATE_WARNINGS)
 
 # See the comment in sanitizer_options.cc for details on this library's usage.
 # The top-level CMakeLists sets a ${SANITIZER_OPTIONS_OVERRIDE} variable which
diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index b5216cf..6fd7cc0 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -545,10 +545,10 @@ build_lz4() {
   CFLAGS="$EXTRA_CFLAGS" \
     cmake \
     -DCMAKE_BUILD_TYPE=release \
-    -DBUILD_TOOLS=0 \
+    -DBUILD_STATIC_LIBS=On \
     -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX \
     $EXTRA_CMAKE_FLAGS \
-    $LZ4_SOURCE/cmake_unofficial
+    $LZ4_SOURCE/contrib/cmake_unofficial
   ${NINJA:-make} -j$PARALLEL $EXTRA_MAKEFLAGS install
   popd
 }
diff --git a/thirdparty/download-thirdparty.sh 
b/thirdparty/download-thirdparty.sh
index d9f2a27..ee481c3 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -331,12 +331,11 @@ fetch_and_patch \
   "patch -d projects -p1 < $TP_DIR/patches/llvm-ustat-removal.patch" \
   "patch -d projects -p1 < 
$TP_DIR/patches/llvm-fix-944-destruction-of-a-locked-mutex.patch"
 
-LZ4_PATCHLEVEL=1
+LZ4_PATCHLEVEL=0
 fetch_and_patch \
- lz4-lz4-$LZ4_VERSION.tar.gz \
+ lz4-$LZ4_VERSION.tar.gz \
  $LZ4_SOURCE \
- $LZ4_PATCHLEVEL \
- "patch -p1 < 
$TP_DIR/patches/lz4-0001-Fix-cmake-build-to-use-gnu-flags-on-clang.patch"
+ $LZ4_PATCHLEVEL
 
 BITSHUFFLE_PATCHLEVEL=0
 fetch_and_patch \
diff --git 
a/thirdparty/patches/lz4-0001-Fix-cmake-build-to-use-gnu-flags-on-clang.patch 
b/thirdparty/patches/lz4-0001-Fix-cmake-build-to-use-gnu-flags-on-clang.patch
deleted file mode 100644
index 7e268c4..0000000
--- 
a/thirdparty/patches/lz4-0001-Fix-cmake-build-to-use-gnu-flags-on-clang.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From f5f137b7b2fddf3e3232e4859b62da42654d0f87 Mon Sep 17 00:00:00 2001
-From: Todd Lipcon <[email protected]>
-Date: Thu, 25 Jun 2015 14:45:27 -0700
-Subject: [PATCH] Fix cmake build to use gnu flags on clang
-
-Previously, the cmake build was only adding -fPIC and -std=c99 on
-gcc. However, these flags are also appropriate when building with
-clang.
----
- cmake_unofficial/CMakeLists.txt | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/cmake_unofficial/CMakeLists.txt b/cmake_unofficial/CMakeLists.txt
-index 4c3eb65..a986f43 100644
---- a/cmake_unofficial/CMakeLists.txt
-+++ b/cmake_unofficial/CMakeLists.txt
-@@ -17,7 +17,12 @@ ENDIF()
- option(BUILD_TOOLS "Build the command line tools" ON)
- option(BUILD_LIBS  "Build the libraries in addition to the tools" ON)
- 
--if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-+IF("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR
-+   "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
-+  SET(GNU_COMPATIBLE_COMPILER 1)
-+ENDIF()
-+
-+if(GNU_COMPATIBLE_COMPILER)
- if(UNIX AND BUILD_LIBS)
-     add_definitions(-fPIC)
- endif()
-@@ -68,7 +73,7 @@ endif()
- if(MSVC)
- ADD_DEFINITIONS("-W4")
- endif()
--if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-+if(GNU_COMPATIBLE_COMPILER)
- ADD_DEFINITIONS("-Wall")
- endif()
- if(CMAKE_COMPILER_IS_GNUCXX)
-@@ -78,7 +83,7 @@ ADD_DEFINITIONS("-Wshadow")
- ADD_DEFINITIONS("-Wcast-align")
- ADD_DEFINITIONS("-Wstrict-prototypes")
- endif(CMAKE_COMPILER_IS_GNUCXX)
--if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND
-+if(GNU_COMPATIBLE_COMPILER AND
-    (NOT CMAKE_SYSTEM_NAME MATCHES "SunOS"))
- ADD_DEFINITIONS("-std=c99")
- endif()
--- 
-1.8.3.2
-
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index fdabdaa..3bbcaa1 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -68,8 +68,8 @@ SNAPPY_VERSION=1.1.4
 SNAPPY_NAME=snappy-$SNAPPY_VERSION
 SNAPPY_SOURCE=$TP_SOURCE_DIR/$SNAPPY_NAME
 
-LZ4_VERSION=r130
-LZ4_NAME=lz4-lz4-$LZ4_VERSION
+LZ4_VERSION=1.9.1
+LZ4_NAME=lz4-$LZ4_VERSION
 LZ4_SOURCE=$TP_SOURCE_DIR/$LZ4_NAME
 
 # from https://github.com/kiyo-masui/bitshuffle

Reply via email to