parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject parquet-cpp git commit: PARQUET-891: Do not search for snappy on system paths
Date Thu, 23 Feb 2017 07:47:21 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master a3554f92d -> 54a0ad01c


PARQUET-891: Do not search for snappy on system paths

The `libsnappy.a` from Linux package mangers (e.g. Ubuntu 14.04) may not be built with -fPIC,
which will cause a linker failure when creating `libparquet.so`. Add notes to README about
this nuance when depending on separately built/installed thirdparty components.

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

Closes #258 from wesm/PARQUET-891 and squashes the following commits:

ea6f836 [Wes McKinney] Typos
e68dc09 [Wes McKinney] Do not use libsnappy in system paths because some Linux package managers
do not build with -fPIC. Add information to README about this


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/54a0ad01
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/54a0ad01
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/54a0ad01

Branch: refs/heads/master
Commit: 54a0ad01c78b4e923820509fe676ac2067176c78
Parents: a3554f9
Author: Wes McKinney <wes.mckinney@twosigma.com>
Authored: Thu Feb 23 08:47:01 2017 +0100
Committer: Uwe L. Korn <uwe@apache.org>
Committed: Thu Feb 23 08:47:01 2017 +0100

----------------------------------------------------------------------
 README.md                      |  7 +++++++
 cmake_modules/FindSnappy.cmake | 21 +++++++++------------
 2 files changed, 16 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/54a0ad01/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 5b956b3..6086fc8 100644
--- a/README.md
+++ b/README.md
@@ -68,6 +68,13 @@ brew install boost
 You can either install these dependencies separately, otherwise they will be
 built automatically as part of the build.
 
+Symbols from Thrift, Snappy, and ZLib are statically-linked into the
+`libparquet` shared library, so these dependencies must be built with `-fPIC`
+on Linux and OS X. Since Linux package managers do not consistently compile the
+static libraries for these components with `-fPIC`, you may have issues with
+Linux packages such as `libsnappy-dev`. It may be easier to depend on the
+thirdparty toolchain that parquet-cpp builds automatically.
+
 ## Build
 
 - `cmake .`

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/54a0ad01/cmake_modules/FindSnappy.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindSnappy.cmake b/cmake_modules/FindSnappy.cmake
index 32c9387..304b4c8 100644
--- a/cmake_modules/FindSnappy.cmake
+++ b/cmake_modules/FindSnappy.cmake
@@ -38,19 +38,16 @@ elseif ( Snappy_HOME )
     list( APPEND _snappy_roots ${Snappy_HOME} )
 endif()
 
-# Try the parameterized roots, if they exist
-if ( _snappy_roots )
-    find_path( SNAPPY_INCLUDE_DIR NAMES snappy.h
-        PATHS ${_snappy_roots} NO_DEFAULT_PATH
-        PATH_SUFFIXES "include" )
-    find_library( SNAPPY_LIBRARIES NAMES snappy
-        PATHS ${_snappy_roots} NO_DEFAULT_PATH
-        PATH_SUFFIXES "lib" )
-else ()
-    find_path( SNAPPY_INCLUDE_DIR NAMES snappy.h )
-    find_library( SNAPPY_LIBRARIES NAMES snappy )
-endif ()
+message(STATUS "SNAPPY_HOME: $ENV{SNAPPY_HOME}")
+find_path(SNAPPY_INCLUDE_DIR snappy.h HINTS
+  $ENV{SNAPPY_HOME}
+  NO_DEFAULT_PATH
+  PATH_SUFFIXES "include")
 
+find_library( SNAPPY_LIBRARIES NAMES snappy PATHS
+  $ENV{SNAPPY_HOME}
+  NO_DEFAULT_PATH
+  PATH_SUFFIXES "lib")
 
 if (SNAPPY_INCLUDE_DIR AND SNAPPY_LIBRARIES)
   set(SNAPPY_FOUND TRUE)


Mime
View raw message