You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ad...@apache.org on 2023/01/05 17:23:47 UTC
[doris] branch master updated: [fix](macOS) Failed to run BE UT due to syscall to map cache into shared region failed (#15641)
This is an automated email from the ASF dual-hosted git repository.
adonisling pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 95f2f43c02 [fix](macOS) Failed to run BE UT due to syscall to map cache into shared region failed (#15641)
95f2f43c02 is described below
commit 95f2f43c02197a724b6a421322df4505c02df45e
Author: Adonis Ling <ad...@gmail.com>
AuthorDate: Fri Jan 6 01:23:37 2023 +0800
[fix](macOS) Failed to run BE UT due to syscall to map cache into shared region failed (#15641)
According to the post https://developer.apple.com/forums/thread/676684, the executable whose size is bigger than 2G may fail to start. The size of the executable `doris_be_test` generated by run-be-ut.sh is 2.1G (> 2G) now and we can't run it on macOS (arm64).
We can separate the debug info from the executable `doris_be_test` to reduce the size. After that, we can run `doris_be_test` successfully.
---
be/CMakeLists.txt | 2 --
be/test/CMakeLists.txt | 11 ++++++++++-
build.sh | 7 ++++++-
run-be-ut.sh | 5 ++++-
4 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index dfa097223e..c85f87e8a4 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -510,8 +510,6 @@ if ("${CMAKE_BUILD_TARGET_ARCH}" STREQUAL "x86" OR "${CMAKE_BUILD_TARGET_ARCH}"
if (USE_AVX2)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -mavx2")
endif()
- # set -mlzcnt for leading zero count used by simdjson
- set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -msse4.2")
endif()
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-attributes -DS2_USE_GFLAGS -DS2_USE_GLOG")
diff --git a/be/test/CMakeLists.txt b/be/test/CMakeLists.txt
index b013b1c6b1..32ce808020 100644
--- a/be/test/CMakeLists.txt
+++ b/be/test/CMakeLists.txt
@@ -328,7 +328,16 @@ add_executable(doris_be_test
)
target_link_libraries(doris_be_test ${TEST_LINK_LIBS})
-set_target_properties(doris_be_test PROPERTIES COMPILE_FLAGS "-fno-access-control" ENABLE_EXPORTS 1)
+set_target_properties(doris_be_test PROPERTIES COMPILE_FLAGS "-fno-access-control")
+
+if (OS_MACOSX AND ARCH_ARM)
+ find_program(DSYMUTIL NAMES dsymutil)
+ message(STATUS "dsymutil found: ${DSYMUTIL}")
+ add_custom_command(TARGET doris_be_test POST_BUILD
+ COMMAND ${DSYMUTIL} $<TARGET_FILE:doris_be_test>
+ COMMAND ${CMAKE_STRIP} -S $<TARGET_FILE:doris_be_test>
+ )
+endif()
if (BUILD_BENCHMARK_TOOL AND BUILD_BENCHMARK_TOOL STREQUAL "ON")
add_executable(benchmark_tool
diff --git a/build.sh b/build.sh
index 6ed3c5ac6f..84f15f96f0 100755
--- a/build.sh
+++ b/build.sh
@@ -228,7 +228,12 @@ if [[ ! -f "${DORIS_THIRDPARTY}/installed/lib/libbacktrace.a" ]]; then
echo "Thirdparty libraries need to be build ..."
# need remove all installed pkgs because some lib like lz4 will throw error if its lib alreay exists
rm -rf "${DORIS_THIRDPARTY}/installed"
- "${DORIS_THIRDPARTY}/build-thirdparty.sh" -j "${PARALLEL}"
+
+ if [[ "${CLEAN}" -eq 0 ]]; then
+ "${DORIS_THIRDPARTY}/build-thirdparty.sh" -j "${PARALLEL}"
+ else
+ "${DORIS_THIRDPARTY}/build-thirdparty.sh" -j "${PARALLEL}" --clean
+ fi
fi
if [[ "${CLEAN}" -eq 1 && "${BUILD_BE}" -eq 0 && "${BUILD_FE}" -eq 0 && "${BUILD_SPARK_DPP}" -eq 0 ]]; then
diff --git a/run-be-ut.sh b/run-be-ut.sh
index c3e76a0d6a..eb695545dc 100755
--- a/run-be-ut.sh
+++ b/run-be-ut.sh
@@ -107,7 +107,6 @@ if [[ "$#" != 1 ]]; then
;;
*)
usage
- exit 0
;;
esac
done
@@ -128,6 +127,10 @@ echo "Build Backend UT"
CMAKE_BUILD_DIR="${DORIS_HOME}/be/ut_build_${CMAKE_BUILD_TYPE}"
if [[ "${CLEAN}" -eq 1 ]]; then
+ pushd "${DORIS_HOME}/gensrc"
+ make clean
+ popd
+
rm -rf "${CMAKE_BUILD_DIR}"
rm -rf "${DORIS_HOME}/be/output"
fi
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org