You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2025/10/21 04:00:48 UTC
(doris-thirdparty) 01/01: [fix] fix some compile error
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch hadoop-3.4.2
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
commit dda1de8c835234f72433e19be070d966dfb674bb
Author: morningman <yu...@selectdb.com>
AuthorDate: Tue Oct 21 11:19:33 2025 +0800
[fix] fix some compile error
---
build.sh | 4 ++--
.../src/main/native/libhdfspp/CMakeLists.txt | 7 ++++++-
.../src/main/native/libhdfspp/lib/fs/filehandle.cc | 3 ++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/build.sh b/build.sh
index 502a7123ce4..205bde236b0 100755
--- a/build.sh
+++ b/build.sh
@@ -33,8 +33,8 @@ if [[ -z "${THIRDPARTY_INSTALLED}" ]]; then
exit 255
fi
-DIST_DIR="${SRC_HOME}/hadoop-dist/target/hadoop-3.3.6"
-LIBHDFS_DIST_DIR="${SRC_HOME}/hadoop-dist/target/hadoop-libhdfs-3.3.6"
+DIST_DIR="${SRC_HOME}/hadoop-dist/target/hadoop-3.4.2"
+LIBHDFS_DIST_DIR="${SRC_HOME}/hadoop-dist/target/hadoop-libhdfs-3.4.2"
rm -rf "${DIST_DIR}"
rm -rf "${LIBHDFS_DIST_DIR}"
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt
index a42ee2e2114..ebbc898ac13 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt
@@ -59,7 +59,9 @@ include(FetchContent)
# https://github.com/google/googletest/blob/e649993a402d96afe25fbf3413749adf0f2947f6/googletest/README.md#incorporating-into-an-existing-cmake-project
FetchContent_Declare(
googletest
- URL https://github.com/google/googletest/archive/703bd9caab50b139428cea1aaff9974ebee5742e.zip
+ #URL https://github.com/google/googletest/archive/703bd9caab50b139428cea1aaff9974ebee5742e.zip
+ # use 1.12.1 to avoid -Wdeprecated-copy
+ URL https://github.com/google/googletest/archive/refs/tags/release-1.12.1.zip
)
# The commit SHA 703bd9caab50b139428cea1aaff9974ebee5742e in the URL above corresponds to the
# tag release-1.10.0 in the googletest repository.
@@ -169,6 +171,9 @@ add_definitions(-DASIO_STANDALONE -DASIO_CPP11_DATE_TIME)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-function-type -Wno-unused-lambda-capture")
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-cast-function-type -Wno-unused-lambda-capture")
+
if(UNIX)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -g -fPIC -fno-strict-aliasing")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fPIC -fno-strict-aliasing")
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
index d5118089027..e2ea49f51d3 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
@@ -292,7 +292,8 @@ void FileHandleImpl::AsyncPreadSome(
if (status.ok()) {
reader->AsyncReadBlock(
client_name, *block, offset_within_block,
- boost::asio::buffer(buffer, size_within_block), read_handler);
+ // boost::asio::buffer(buffer, size_within_block), read_handler);
+ boost::asio::buffer(*buffer.begin(), size_within_block), read_handler);
} else {
handler(status, dn_id, 0);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org