diff --git a/contrib/libgsasl b/contrib/libgsasl index 0324680f13f..f4e7bf0bb06 160000 --- a/contrib/libgsasl +++ b/contrib/libgsasl @@ -1 +1 @@ -Subproject commit 0324680f13f22bb43df5353a08e26453d7d640ac +Subproject commit f4e7bf0bb068030d57266f87ccac4c8c012fb5c4 diff --git a/contrib/libhdfs3 b/contrib/libhdfs3 index 9194af44588..9ee3ce77215 160000 --- a/contrib/libhdfs3 +++ b/contrib/libhdfs3 @@ -1 +1 @@ -Subproject commit 9194af44588633c1b2dae44bf945804401ff883e +Subproject commit 9ee3ce77215fca83b7fdfcfe2186a3db0d0bdb74 diff --git a/contrib/libhdfs3-cmake/CMakeLists.txt b/contrib/libhdfs3-cmake/CMakeLists.txt index 15d7a4df424..b270f2090c3 100644 --- a/contrib/libhdfs3-cmake/CMakeLists.txt +++ b/contrib/libhdfs3-cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -if(NOT ARCH_AARCH64 AND NOT OS_FREEBSD AND NOT APPLE AND NOT ARCH_PPC64LE) +if(NOT ARCH_AARCH64 AND NOT OS_FREEBSD AND NOT APPLE) option(ENABLE_HDFS "Enable HDFS" ${ENABLE_LIBRARIES}) elseif(ENABLE_HDFS) message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use HDFS3 with current configuration") @@ -99,9 +99,19 @@ set(SRCS "${HDFS3_SOURCE_DIR}/common/Hash.cpp" "${HDFS3_SOURCE_DIR}/common/SWCrc32c.cpp" "${HDFS3_SOURCE_DIR}/common/Thread.cpp" + "${HDFS3_SOURCE_DIR}/common/IntelAsmCrc32c.cpp" ${PROTO_SOURCES} ) +if (ARCH_AMD64) + find_program(YASM_PATH NAMES yasm) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/crc_iscsi_v_pcl.o + COMMAND ${YASM_PATH} -f x64 -f elf64 -X gnu -g dwarf2 -D LINUX -o ${CMAKE_CURRENT_BINARY_DIR}/crc_iscsi_v_pcl.o ${HDFS3_SOURCE_DIR}/common/crc_iscsi_v_pcl.asm + COMMENT "Translating Intel CRC assembly to object code") + LIST(APPEND SRCS ${CMAKE_CURRENT_BINARY_DIR}/crc_iscsi_v_pcl.o) +endif () + # old kernels (< 3.17) doesn't have SYS_getrandom. Always use POSIX implementation to have better compatibility set_source_files_properties("${HDFS3_SOURCE_DIR}/rpc/RpcClient.cpp" PROPERTIES COMPILE_FLAGS "-DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX=1") @@ -110,9 +120,16 @@ add_library(_hdfs3 ${SRCS}) add_dependencies(_hdfs3 protoc) -target_include_directories(_hdfs3 PRIVATE ${HDFS3_SOURCE_DIR}) -target_include_directories(_hdfs3 PRIVATE ${HDFS3_COMMON_DIR}) -target_include_directories(_hdfs3 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +if (ENABLE_CLICKHOUSE_BENCHMARK) + message(STATUS "enable perf checksum") + target_include_directories(_hdfs3 PUBLIC ${HDFS3_SOURCE_DIR}) + target_include_directories(_hdfs3 PUBLIC ${HDFS3_COMMON_DIR}) + target_include_directories(_hdfs3 PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +else () + target_include_directories(_hdfs3 PRIVATE ${HDFS3_SOURCE_DIR}) + target_include_directories(_hdfs3 PRIVATE ${HDFS3_COMMON_DIR}) + target_include_directories(_hdfs3 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +endif () target_include_directories(_hdfs3 SYSTEM BEFORE INTERFACE "${ClickHouse_SOURCE_DIR}/contrib/libhdfs3/include") @@ -129,3 +146,8 @@ if (TARGET OpenSSL::SSL) endif() add_library(ch_contrib::hdfs ALIAS _hdfs3) + +if (ENABLE_CLICKHOUSE_BENCHMARK) + add_executable(perf_checksum ${HDFS3_SOURCE_DIR}/common/perf_checksum.cpp) + target_link_libraries(perf_checksum PRIVATE ch_contrib::hdfs) +endif () diff --git a/docker/packager/binary/Dockerfile b/docker/packager/binary/Dockerfile index cd9eb133f62..f750dbf4f74 100644 --- a/docker/packager/binary/Dockerfile +++ b/docker/packager/binary/Dockerfile @@ -23,6 +23,7 @@ RUN apt-get update && \ libc6 \ libc6-dev \ libc6-dev-arm64-cross \ + yasm \ zstd && \ apt-get clean diff --git a/docker/server/Dockerfile.ubuntu b/docker/server/Dockerfile.ubuntu index ba2d7430e06..beb70cbe662 100644 --- a/docker/server/Dockerfile.ubuntu +++ b/docker/server/Dockerfile.ubuntu @@ -16,6 +16,7 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list gnupg \ locales \ wget \ + yasm \ tzdata \ && apt-get clean