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

Revert build script changes #425

Merged
merged 3 commits into from
Oct 26, 2023
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
27 changes: 13 additions & 14 deletions CMake/Findlz4.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,18 @@ find_package_handle_standard_args(lz4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR)

mark_as_advanced(LZ4_LIBRARY LZ4_INCLUDE_DIR)

get_filename_component(liblz4_ext ${LZ4_LIBRARY} EXT)
if(liblz4_ext STREQUAL ".a")
set(liblz4_type STATIC)
else()
set(liblz4_type SHARED)
endif()

if(NOT TARGET lz4::lz4)
add_library(lz4::lz4 UNKNOWN IMPORTED)
set_target_properties(lz4::lz4 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LZ4_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION_RELEASE "${LZ4_LIBRARY_RELEASE}")
set_property(TARGET lz4::lz4 APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)

if(LZ4_LIBRARY_DEBUG)
set_property(TARGET lz4::lz4 APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG)
set_property(TARGET lz4::lz4 PROPERTY
IMPORTED_LOCATION_DEBUG "${LZ4_LIBRARY_DEBUG}")
endif()
add_library(lz4::lz4 ${liblz4_type} IMPORTED)
set_target_properties(lz4::lz4 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LZ4_INCLUDE_DIR}")
set_target_properties(
lz4::lz4 PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LZ4_LIBRARIES}")
endif()
15 changes: 5 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,10 @@ if(VELOX_ENABLE_ABFS)
endif()

if(VELOX_ENABLE_HDFS)
find_package(libhdfs3)
if(libhdfs3_FOUND AND TARGET HDFS::hdfs3)
set(LIBHDFS3 HDFS::hdfs3)
else()
find_library(
LIBHDFS3
NAMES libhdfs3.so libhdfs3.dylib
HINTS "${CMAKE_SOURCE_DIR}/hawq/depends/libhdfs3/_build/src/" REQUIRED)
endif()
find_library(
LIBHDFS3
NAMES libhdfs3.so libhdfs3.dylib
HINTS "${CMAKE_SOURCE_DIR}/hawq/depends/libhdfs3/_build/src/" REQUIRED)
add_definitions(-DVELOX_ENABLE_HDFS3)
endif()

Expand Down Expand Up @@ -385,7 +380,7 @@ resolve_dependency(Boost 1.66.0 COMPONENTS ${BOOST_INCLUDE_LIBRARIES})
# for reference. find_package(range-v3)

set_source(gflags)
resolve_dependency(gflags)
resolve_dependency(gflags COMPONENTS shared)
if(NOT TARGET gflags::gflags)
# This is a bit convoluted, but we want to be able to use gflags::gflags as a
# target even when velox is built as a subproject which uses
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export CMAKE_BUILD_TYPE=Release
# Install all velox and folly dependencies.
# The is an issue on 22.04 where a version conflict prevents glog install,
# installing libunwind first fixes this.
sudo --preserve-env apt update && \
sudo --preserve-env apt update && sudo --preserve-env apt install -y libunwind-dev && \
sudo --preserve-env apt install -y \
g++ \
cmake \
Expand Down
2 changes: 0 additions & 2 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ if(VELOX_ENABLE_ARROW)
set(ARROW_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/arrow_ep")
set(ARROW_CMAKE_ARGS
-DARROW_PARQUET=ON
-DARROW_FILESYSTEM=ON

Choose a reason for hiding this comment

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

In file included from ../core/shuffle/LocalPartitionWriter.cc:18:
../core/shuffle/LocalPartitionWriter.h:20:10: fatal error: arrow/filesystem/localfs.h: No such file or directory
   20 | #include <arrow/filesystem/localfs.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

@marin-ma Does ARROW_FILESYSTEM not needed?

-DARROW_WITH_LZ4=ON
-DARROW_WITH_SNAPPY=ON
-DARROW_WITH_ZLIB=ON
Expand Down Expand Up @@ -69,7 +68,6 @@ if(VELOX_ENABLE_ARROW)
arrow_ep
PREFIX ${ARROW_PREFIX}
URL ${VELOX_ARROW_SOURCE_URL}
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/arrow_patches/helpers.patch
URL_HASH ${VELOX_ARROW_BUILD_SHA256_CHECKSUM}
SOURCE_SUBDIR cpp
CMAKE_ARGS ${ARROW_CMAKE_ARGS}
Expand Down
32 changes: 0 additions & 32 deletions third_party/arrow_patches/helpers.patch

This file was deleted.

2 changes: 1 addition & 1 deletion velox/common/process/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ add_executable(velox_process_test TraceContextTest.cpp)
add_test(velox_process_test velox_process_test)

target_link_libraries(velox_process_test PRIVATE velox_process fmt::fmt gtest
gtest_main glog::glog gflags::gflags)
gtest_main)
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ HdfsMiniCluster::HdfsMiniCluster() {
"Failed to find minicluster executable {}'", miniClusterExecutableName);
}
boost::filesystem::path hadoopHomeDirectory = exePath_;
hadoopHomeDirectory.remove_filename().remove_filename();
hadoopHomeDirectory.remove_leaf().remove_leaf();
setupEnvironment(hadoopHomeDirectory.string());
}

Expand Down
3 changes: 1 addition & 2 deletions velox/dwio/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,4 @@ target_link_libraries(
velox_exec
Boost::regex
Folly::folly
glog::glog
protobuf::libprotobuf)
glog::glog)
4 changes: 1 addition & 3 deletions velox/dwio/parquet/writer/arrow/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ target_link_libraries(
gtest_main
parquet
arrow
arrow_testing
glog::glog
gflags::gflags)
arrow_testing)

add_library(
velox_dwio_arrow_parquet_writer_test_lib
Expand Down
1 change: 1 addition & 0 deletions velox/exec/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ add_executable(
ParseTypeSignatureTest.cpp
PlanBuilderTest.cpp
QueryAssertionsTest.cpp
TaskTest.cpp
TreeOfLosersTest.cpp)

add_test(
Expand Down
Loading