This is an automated email from the ASF dual-hosted git repository.
omalley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/master by this push:
new 5f9382b ORC-448. Fix centos6 compilation ""error: converting ‘false’
to pointer type"
5f9382b is described below
commit 5f9382b21b9dc0a2e7d3d45457fd0bafbb38903f
Author: Owen O'Malley <[email protected]>
AuthorDate: Wed Dec 19 14:06:04 2018 -0800
ORC-448. Fix centos6 compilation ""error: converting ‘false’ to pointer
type"
Fixes #351
Signed-off-by: Owen O'Malley <[email protected]>
---
CMakeLists.txt | 2 +-
c++/test/TestDictionaryEncoding.cc | 10 +++++-----
cmake_modules/ThirdpartyToolchain.cmake | 5 ++++-
tools/src/CMakeLists.txt | 7 +++++++
4 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7757969..4484e37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@
cmake_minimum_required (VERSION 2.6)
-project(ORC)
+project(ORC C CXX)
# Version number of package
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
diff --git a/c++/test/TestDictionaryEncoding.cc
b/c++/test/TestDictionaryEncoding.cc
index d4952a9..1822558 100644
--- a/c++/test/TestDictionaryEncoding.cc
+++ b/c++/test/TestDictionaryEncoding.cc
@@ -104,7 +104,7 @@ namespace orc {
EXPECT_EQ(i % dictionarySize, static_cast<uint64_t>(atoi(str.c_str())));
}
- EXPECT_EQ(false, rowReader->next(*batch));
+ EXPECT_FALSE(rowReader->next(*batch));
}
void testVarcharDictionary(bool enableIndex, double threshold) {
@@ -170,7 +170,7 @@ namespace orc {
EXPECT_EQ(varcharRead, varcharExpected);
}
- EXPECT_EQ(false, rowReader->next(*batch));
+ EXPECT_FALSE(rowReader->next(*batch));
}
void testCharDictionary(bool enableIndex, double threshold) {
@@ -238,7 +238,7 @@ namespace orc {
EXPECT_EQ(charsExpected, charsRead);
}
- EXPECT_EQ(false, rowReader->next(*batch));
+ EXPECT_FALSE(rowReader->next(*batch));
}
void testStringDictionaryWithNull(double threshold, bool enableIndex) {
@@ -311,7 +311,7 @@ namespace orc {
}
}
- EXPECT_EQ(false, rowReader->next(*batch));
+ EXPECT_FALSE(rowReader->next(*batch));
}
void testDictionaryMultipleStripes(double threshold, bool enableIndex) {
@@ -381,7 +381,7 @@ namespace orc {
EXPECT_EQ(i % dictionarySize,
static_cast<uint64_t>(atoi(str.c_str())));
}
}
- EXPECT_EQ(false, rowReader->next(*batch));
+ EXPECT_FALSE(rowReader->next(*batch));
// test seeking to check positions
batch = rowReader->createRowBatch(1);
diff --git a/cmake_modules/ThirdpartyToolchain.cmake
b/cmake_modules/ThirdpartyToolchain.cmake
index 9bf97de..1a28b1a 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -17,6 +17,9 @@ set(GTEST_VERSION "1.8.0")
set(PROTOBUF_VERSION "3.5.1")
set(ZSTD_VERSION "1.3.5")
+# zstd requires us to add the threads
+FIND_PACKAGE(Threads REQUIRED)
+
set(THIRDPARTY_DIR "${CMAKE_BINARY_DIR}/c++/libs/thirdparty")
set(THIRDPARTY_LOG_OPTIONS LOG_CONFIGURE 1
LOG_BUILD 1
@@ -148,7 +151,7 @@ else ()
endif ()
set(ZSTD_STATIC_LIB
"${ZSTD_HOME}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${ZSTD_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(ZSTD_CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${ZSTD_HOME}
- -DBUILD_SHARED_LIBS=OFF)
+ -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_LIBDIR=lib)
if (CMAKE_VERSION VERSION_GREATER "3.7")
set(ZSTD_CONFIGURE SOURCE_SUBDIR "build/cmake" CMAKE_ARGS
${ZSTD_CMAKE_ARGS})
diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt
index 667fab4..f5a53ca 100644
--- a/tools/src/CMakeLists.txt
+++ b/tools/src/CMakeLists.txt
@@ -33,6 +33,7 @@ add_executable (orc-contents
target_link_libraries (orc-contents
orc
+ ${CMAKE_THREAD_LIBS_INIT}
)
add_executable (orc-scan
@@ -41,6 +42,7 @@ add_executable (orc-scan
target_link_libraries (orc-scan
orc
+ ${CMAKE_THREAD_LIBS_INIT}
)
add_executable (orc-metadata
@@ -50,6 +52,7 @@ add_executable (orc-metadata
target_link_libraries (orc-metadata
orc
protobuf
+ ${CMAKE_THREAD_LIBS_INIT}
)
add_executable (orc-statistics
@@ -58,6 +61,7 @@ target_link_libraries (orc-metadata
target_link_libraries (orc-statistics
orc
+ ${CMAKE_THREAD_LIBS_INIT}
)
add_executable (orc-memory
@@ -66,6 +70,7 @@ add_executable (orc-memory
target_link_libraries (orc-memory
orc
+ ${CMAKE_THREAD_LIBS_INIT}
)
add_executable (timezone-dump
@@ -74,6 +79,7 @@ add_executable (timezone-dump
target_link_libraries (timezone-dump
orc
+ ${CMAKE_THREAD_LIBS_INIT}
)
add_executable (csv-import
@@ -82,6 +88,7 @@ add_executable (csv-import
target_link_libraries (csv-import
orc
+ ${CMAKE_THREAD_LIBS_INIT}
)
install(TARGETS