Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pkgs/by-name/ap/apache-orc/cmake-link-abseil.patch
Original file line number Diff line number Diff line change
@@ -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
26 changes: 20 additions & 6 deletions pkgs/by-name/ap/apache-orc/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
];
Expand Down Expand Up @@ -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 = {
Expand Down
15 changes: 15 additions & 0 deletions pkgs/by-name/ap/apache-orc/protobuf34-nodiscard.patch
Original file line number Diff line number Diff line change
@@ -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;
6 changes: 4 additions & 2 deletions pkgs/by-name/ar/arrow-cpp/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Loading