Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[orc] update to 1.7.6 #26603

Merged
merged 4 commits into from
Aug 31, 2022
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
148 changes: 89 additions & 59 deletions ports/orc/0003-dependencies-from-vcpkg.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 3d4a162..6926bc3 100644
index d4cd035..0701a7d 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -230,12 +230,13 @@ endif(BUILD_LIBHDFSPP)
@@ -239,12 +239,13 @@ endif(BUILD_LIBHDFSPP)
add_library (orc STATIC ${SOURCE_FILES})

target_link_libraries (orc
- protobuf
- zlib
- snappy
- lz4
- zstd
- orc::protobuf
- orc::zlib
- orc::snappy
- orc::lz4
- orc::zstd
- ${LIBHDFSPP_LIBRARIES}
+ PRIVATE
+ protobuf::libprotobuf
Expand All @@ -23,10 +23,10 @@ index 3d4a162..6926bc3 100644

install(TARGETS orc DESTINATION lib)
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index 3a35325..56ffd74 100644
index 6919847..ad52cf2 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -59,8 +59,8 @@ endif ()
@@ -66,8 +66,8 @@ endif ()
# ----------------------------------------------------------------------
# Snappy

Expand All @@ -37,18 +37,23 @@ index 3a35325..56ffd74 100644
set(SNAPPY_VENDORED FALSE)
else ()
set(SNAPPY_HOME "${THIRDPARTY_DIR}/snappy_ep-install")
@@ -78,10 +78,6 @@ else ()
@@ -90,15 +90,6 @@ else ()
set(SNAPPY_VENDORED TRUE)
endif ()

-include_directories (SYSTEM ${SNAPPY_INCLUDE_DIR})
-add_library (snappy STATIC IMPORTED)
-set_target_properties (snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_STATIC_LIB})
-add_library (orc_snappy INTERFACE)
-add_library (orc::snappy ALIAS orc_snappy)
-if (ORC_PREFER_STATIC_SNAPPY AND ${SNAPPY_STATIC_LIB})
- target_link_libraries(orc_snappy INTERFACE ${SNAPPY_STATIC_LIB})
-else ()
- target_link_libraries(orc_snappy INTERFACE ${SNAPPY_LIBRARY})
-endif ()
-target_include_directories (orc_snappy SYSTEM INTERFACE ${SNAPPY_INCLUDE_DIR})
-
if (SNAPPY_VENDORED)
add_dependencies (snappy snappy_ep)
add_dependencies (orc_snappy snappy_ep)
if (INSTALL_VENDORED_LIBS)
@@ -93,7 +89,7 @@ endif ()
@@ -110,7 +101,7 @@ endif ()
# ----------------------------------------------------------------------
# ZLIB

Expand All @@ -57,62 +62,86 @@ index 3a35325..56ffd74 100644
find_package (ZLIB REQUIRED)
set(ZLIB_VENDORED FALSE)
else ()
@@ -120,10 +116,6 @@ else ()
@@ -142,15 +133,6 @@ else ()
set(ZLIB_VENDORED TRUE)
endif ()

-include_directories (SYSTEM ${ZLIB_INCLUDE_DIR})
-add_library (zlib STATIC IMPORTED)
-set_target_properties (zlib PROPERTIES IMPORTED_LOCATION ${ZLIB_STATIC_LIB})
-add_library (orc_zlib INTERFACE)
-add_library (orc::zlib ALIAS orc_zlib)
-if (ORC_PREFER_STATIC_ZLIB AND ${ZLIB_STATIC_LIB})
- target_link_libraries (orc_zlib INTERFACE ${ZLIB_STATIC_LIB})
-else ()
- target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARY})
-endif ()
-target_include_directories (orc_zlib SYSTEM INTERFACE ${ZLIB_INCLUDE_DIR})
-
if (ZLIB_VENDORED)
add_dependencies (zlib zlib_ep)
add_dependencies (orc_zlib zlib_ep)
if (INSTALL_VENDORED_LIBS)
@@ -135,8 +127,8 @@ endif ()
@@ -162,8 +144,8 @@ endif ()
# ----------------------------------------------------------------------
# Zstd

-if (NOT "${ZSTD_HOME}" STREQUAL "")
- find_package (ZSTD REQUIRED)
+if (1)
+ find_package (zstd CONFIG REQUIRED)
+ find_package (ZSTD CONFIG REQUIRED)
set(ZSTD_VENDORED FALSE)
else ()
set(ZSTD_HOME "${THIRDPARTY_DIR}/zstd_ep-install")
@@ -169,10 +161,6 @@ else ()
@@ -201,15 +183,6 @@ else ()
set(ZSTD_VENDORED TRUE)
endif ()

-include_directories (SYSTEM ${ZSTD_INCLUDE_DIR})
-add_library (zstd STATIC IMPORTED)
-set_target_properties (zstd PROPERTIES IMPORTED_LOCATION ${ZSTD_STATIC_LIB})
-add_library (orc_zstd INTERFACE)
-add_library (orc::zstd ALIAS orc_zstd)
-if (ORC_PREFER_STATIC_ZSTD AND ${ZSTD_STATIC_LIB})
- target_link_libraries (orc_zstd INTERFACE ${ZSTD_STATIC_LIB})
-else ()
- target_link_libraries (orc_zstd INTERFACE ${ZSTD_LIBRARY})
-endif ()
-target_include_directories (orc_zstd SYSTEM INTERFACE ${ZSTD_INCLUDE_DIR})
-
if (ZSTD_VENDORED)
add_dependencies (zstd zstd_ep)
add_dependencies (orc_zstd zstd_ep)
if (INSTALL_VENDORED_LIBS)
@@ -184,8 +172,8 @@ endif ()
@@ -221,8 +194,8 @@ endif ()
# ----------------------------------------------------------------------
# LZ4

-if (NOT "${LZ4_HOME}" STREQUAL "")
- find_package (LZ4 REQUIRED)
+if (1)
+ find_package (lz4 CONFIG REQUIRED)
+ find_package (LZ4 CONFIG REQUIRED)
set(LZ4_VENDORED FALSE)
else ()
set(LZ4_PREFIX "${THIRDPARTY_DIR}/lz4_ep-install")
@@ -211,10 +199,6 @@ else ()
@@ -253,15 +226,6 @@ else ()
set(LZ4_VENDORED TRUE)
endif ()

-include_directories (SYSTEM ${LZ4_INCLUDE_DIR})
-add_library (lz4 STATIC IMPORTED)
-set_target_properties (lz4 PROPERTIES IMPORTED_LOCATION ${LZ4_STATIC_LIB})
-add_library (orc_lz4 INTERFACE)
-add_library (orc::lz4 ALIAS orc_lz4)
-if (ORC_PREFER_STATIC_LZ4 AND ${LZ4_STATIC_LIB})
- target_link_libraries (orc_lz4 INTERFACE ${LZ4_STATIC_LIB})
-else ()
- target_link_libraries (orc_lz4 INTERFACE ${LZ4_LIBRARY})
-endif ()
-target_include_directories (orc_lz4 SYSTEM INTERFACE ${LZ4_INCLUDE_DIR})
-
if (LZ4_VENDORED)
add_dependencies (lz4 lz4_ep)
add_dependencies (orc_lz4 lz4_ep)
if (INSTALL_VENDORED_LIBS)
@@ -288,8 +272,8 @@ endif ()
@@ -273,7 +237,7 @@ endif ()
# ----------------------------------------------------------------------
# IANA - Time Zone Database

-if (WIN32)
+if (WIN32 AND TEST_VALGRIND_MEMCHECK)
SET(CURRENT_TZDATA_FILE "")
SET(CURRENT_TZDATA_SHA512 "")
File(DOWNLOAD "https://ftp.osuosl.org/pub/cygwin/noarch/release/tzdata/sha512.sum" ${CMAKE_CURRENT_BINARY_DIR}/sha512.sum)
@@ -372,8 +336,8 @@ endif ()
# ----------------------------------------------------------------------
# Protobuf

Expand All @@ -123,40 +152,41 @@ index 3a35325..56ffd74 100644
set(PROTOBUF_VENDORED FALSE)
else ()
set(PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install")
@@ -327,12 +311,6 @@ endif ()

include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR})

-add_library (protobuf STATIC IMPORTED)
-set_target_properties (protobuf PROPERTIES IMPORTED_LOCATION ${PROTOBUF_STATIC_LIB})
-
-add_library (protoc STATIC IMPORTED)
-set_target_properties (protoc PROPERTIES IMPORTED_LOCATION ${PROTOC_STATIC_LIB})
@@ -421,19 +385,7 @@ add_library (orc::protobuf ALIAS orc_protobuf)
add_library (orc_protoc INTERFACE)
add_library (orc::protoc ALIAS orc_protoc)

-if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOBUF_STATIC_LIB})
- target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_STATIC_LIB})
-else ()
- target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_LIBRARY})
-endif()
-target_include_directories (orc_protobuf SYSTEM INTERFACE ${PROTOBUF_INCLUDE_DIR})
-
-if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_STATIC_LIB})
-else ()
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_LIBRARY})
-endif()
-target_include_directories (orc_protoc SYSTEM INTERFACE ${PROTOBUF_INCLUDE_DIR})
+include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR})

if (PROTOBUF_VENDORED)
add_dependencies (protoc protobuf_ep)
add_dependencies (protobuf protobuf_ep)
add_dependencies (orc_protoc protobuf_ep)
diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt
index f5a53ca..ec22e7a 100644
index d55581b..701fd7c 100644
--- a/tools/src/CMakeLists.txt
+++ b/tools/src/CMakeLists.txt
@@ -51,7 +51,6 @@ add_executable (orc-metadata

target_link_libraries (orc-metadata
orc
- protobuf
${CMAKE_THREAD_LIBS_INIT}
)

@@ -92,7 +91,7 @@ target_link_libraries (csv-import
@@ -95,11 +95,7 @@ target_link_libraries (csv-import
)

install(TARGETS
- orc-contents
- orc-metadata
- orc-statistics
orc-scan
orc-memory
- timezone-dump
csv-import
- DESTINATION bin)
+ orc-scan
+ orc-memory
+ csv-import
+ DESTINATION tools/orc)
30 changes: 0 additions & 30 deletions ports/orc/0005-disable-tzdata.patch

This file was deleted.

21 changes: 21 additions & 0 deletions ports/orc/fix-linux-error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index ad52cf2..ed7ff28 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -145,7 +145,7 @@ endif ()
# Zstd

if (1)
- find_package (ZSTD CONFIG REQUIRED)
+ find_package (zstd CONFIG REQUIRED)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix error:

CMake Error at /agent/_work/1/s/scripts/buildsystems/vcpkg.cmake:829 (_find_package):
  Could not find a package configuration file provided by "ZSTD" with any of
  the following names:

    ZSTDConfig.cmake
    zstd-config.cmake

set(ZSTD_VENDORED FALSE)
else ()
set(ZSTD_HOME "${THIRDPARTY_DIR}/zstd_ep-install")
@@ -338,6 +338,7 @@ endif ()

if (1)
find_package (Protobuf CONFIG REQUIRED)
+ include_directories(${Protobuf_INCLUDE_DIRS})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix error:

/Users/vagrant/Data/buildtrees/orc/x64-osx-dbg/c++/src/orc_proto.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found
#include <google/protobuf/port_def.inc>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

set(PROTOBUF_VENDORED FALSE)
else ()
set(PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install")
6 changes: 3 additions & 3 deletions ports/orc/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/orc
REF 23ecc03e87548f6d6783c2d8af2b46672c52214c # rel/release-1.6.4
SHA512 907984c7e036ddaa90e7cbfabb9af4f6fd3520820b9a8732b304f2213030f7d67cef89ad87d50e028a51bff06f68ff359345ad6894850e299b2fca343d7c0c3e
REF 7ff749a4234c3db58d272a8fc1c7cc1860245692 # rel/release-1.7.6
SHA512 1e7f0366530b691d7ea7ce671aa1e1a655cde2feb0fb0c3639da36ef565aceaf6f05e49a39c3c0ab7417dc324dc2cbb6e8babbf21f899ccb4cf5f0e63217afbf
HEAD_REF master
PATCHES
0003-dependencies-from-vcpkg.patch
0005-disable-tzdata.patch
fix-linux-error.patch
)

file(REMOVE "${SOURCE_PATH}/cmake_modules/FindGTest.cmake")
Expand Down
4 changes: 2 additions & 2 deletions ports/orc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "orc",
"version": "1.6.4",
"port-version": 4,
"version": "1.7.6",
"description": "The smallest, fastest columnar storage for Hadoop workloads.",
"homepage": "https://orc.apache.org/",
"license": "Apache-2.0",
"dependencies": [
"gtest",
"lz4",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5397,8 +5397,8 @@
"port-version": 1
},
"orc": {
"baseline": "1.6.4",
"port-version": 4
"baseline": "1.7.6",
"port-version": 0
},
"orocos-kdl": {
"baseline": "1.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/orc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8db2855196eeddb1ac131df74e028367480613d5",
"version": "1.7.6",
"port-version": 0
},
{
"git-tree": "8c8bc9de897f95a0499e5dc4a49545cda6e496b2",
"version": "1.6.4",
Expand Down