[staging-next] apache-orc: 2.2.1 -> 2.3.0, fix build with protobuf 34 (#499475)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt
|
||||
index 81e2da6f19..cdb809aed9 100644
|
||||
--- a/tools/src/CMakeLists.txt
|
||||
+++ b/tools/src/CMakeLists.txt
|
||||
@@ -64,6 +64,7 @@
|
||||
target_link_libraries (orc-metadata
|
||||
orc-tools-common
|
||||
orc::protobuf
|
||||
+ absl::raw_hash_set
|
||||
)
|
||||
|
||||
add_executable (orc-statistics
|
||||
@@ -27,15 +27,29 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "apache-orc";
|
||||
version = "2.2.1";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "apache";
|
||||
repo = "orc";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-H7nowl2pq31RIAmTUz15x48Wc99MljFJboc4F7Ln/zk=";
|
||||
hash = "sha256-QQdRzwmUF1Qwxg53kJv1Q6yFuHqSrLYwUxKt+6wK9Hs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Orc's CMake declarations do not correctly attempt to link in abseil,
|
||||
# so we add the relevant library they need. Without these, we get errors
|
||||
# like:
|
||||
# <store path>/bin/ld: <store path>/lib/libabsl_raw_hash-set.so.2601.0.0:
|
||||
# error adding symbols: DSO missing from command line
|
||||
./cmake-link-abseil.patch
|
||||
|
||||
# Protobuf 34 adds `[[nodiscard]]` to several serialization functions. In
|
||||
# order to avoid these warnings causing build failures, we add handling for
|
||||
# this failure case.
|
||||
./protobuf34-nodiscard.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
@@ -65,12 +79,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
env = {
|
||||
GTEST_HOME = gtest.dev;
|
||||
LZ4_ROOT = lz4;
|
||||
LZ4_HOME = lz4;
|
||||
ORC_FORMAT_URL = orc-format;
|
||||
PROTOBUF_HOME = protobuf;
|
||||
SNAPPY_ROOT = snappy.dev;
|
||||
ZLIB_ROOT = zlib.dev;
|
||||
ZSTD_ROOT = zstd.dev;
|
||||
SNAPPY_HOME = snappy.dev;
|
||||
ZLIB_HOME = zlib.dev;
|
||||
ZSTD_HOME = zstd.dev;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git a/c++/src/ColumnWriter.cc b/c++/src/ColumnWriter.cc
|
||||
index 9cdbae0709..d049e91bb1 100644
|
||||
--- a/c++/src/ColumnWriter.cc
|
||||
+++ b/c++/src/ColumnWriter.cc
|
||||
@@ -212,7 +212,9 @@
|
||||
}
|
||||
}
|
||||
// write row index to output stream
|
||||
- rowIndex->SerializeToZeroCopyStream(indexStream.get());
|
||||
+ if (!rowIndex->SerializeToZeroCopyStream(indexStream.get())) {
|
||||
+ throw std::logic_error("Failed to write index stream.");
|
||||
+ }
|
||||
|
||||
// construct row index stream
|
||||
proto::Stream stream;
|
||||
@@ -131,8 +131,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
};
|
||||
|
||||
# apache-orc looks for things in caps
|
||||
LZ4_ROOT = lz4;
|
||||
ZSTD_ROOT = zstd.dev;
|
||||
LZ4_HOME = lz4;
|
||||
PROTOBUF_HOME = protobuf;
|
||||
SNAPPY_HOME = snappy.dev;
|
||||
ZSTD_HOME = zstd.dev;
|
||||
ARROW_TEST_DATA = "${arrow-testing}/data";
|
||||
PARQUET_TEST_DATA = "${parquet-testing}/data";
|
||||
GTEST_FILTER =
|
||||
|
||||
Reference in New Issue
Block a user