diff --git a/.github/workflows/be-ut-mac.yml b/.github/workflows/be-ut-mac.yml index 3307ec11b8adef..5641cab7f8c126 100644 --- a/.github/workflows/be-ut-mac.yml +++ b/.github/workflows/be-ut-mac.yml @@ -67,7 +67,7 @@ jobs: 'texinfo' 'coreutils' 'gnu-getopt' - 'python' + 'python@3' 'cmake' 'ninja' 'ccache' @@ -79,6 +79,7 @@ jobs: 'openjdk@11' 'maven' 'node' + 'llvm@15' ) brew install "${cellars[@]}" diff --git a/.github/workflows/build-thirdparty.yml b/.github/workflows/build-thirdparty.yml index 3f6e19dd13dbc8..5c4b8848e4b6c5 100644 --- a/.github/workflows/build-thirdparty.yml +++ b/.github/workflows/build-thirdparty.yml @@ -134,7 +134,7 @@ jobs: 'texinfo' 'coreutils' 'gnu-getopt' - 'python' + 'python@3' 'cmake' 'ninja' 'ccache' @@ -146,6 +146,7 @@ jobs: 'openjdk@11' 'maven' 'node' + 'llvm@15' ) brew install "${packages[@]}" diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index b3ad8869104925..7e77a46a99323a 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -885,6 +885,9 @@ if (${MAKE_TEST} STREQUAL "ON") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov") endif() add_definitions(-DBE_TEST) + if (ARCH_ARM) + add_compile_options(-ffp-contract=off) + endif() endif () add_subdirectory(${SRC_DIR}/agent) diff --git a/be/test/util/threadpool_test.cpp b/be/test/util/threadpool_test.cpp index 7ce870a6347b2b..f6ecaf3dc3e698 100644 --- a/be/test/util/threadpool_test.cpp +++ b/be/test/util/threadpool_test.cpp @@ -331,7 +331,9 @@ TEST_F(ThreadPoolTest, TestDeadlocks) { #ifdef __APPLE__ const char* death_msg = "_ZNSt3__1L8__invokeIRNS_6__bindIMN5doris10ThreadPoolEFvvEJPS3_EEEJEEEDTclscT_fp_" - "spscT0_fp0_EEOS9_DpOSA_"; + "spscT0_fp0_EEOS9_DpOSA_|_ZNSt3__18__invokeB6v15007IRNS_6__" + "bindIMN5doris10ThreadPoolEFvvEJPS3_EEEJEEEDTclclsr3stdE7declvalIT_" + "EEspclsr3stdE7declvalIT0_EEEEOS9_DpOSA_"; #else const char* death_msg = "_ZNSt5_BindIFMN5doris10ThreadPoolEFvvEPS1_EE6__callIvJEJLm0EEEET_OSt5tupleIJDpT0_" diff --git a/bin/start_be.sh b/bin/start_be.sh index 231986940ea03a..dcacbb7af36980 100755 --- a/bin/start_be.sh +++ b/bin/start_be.sh @@ -208,7 +208,7 @@ if [[ "${RUN_IN_AWS}" -eq 0 ]]; then fi ## set asan and ubsan env to generate core file -export ASAN_OPTIONS=symbolize=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1 +export ASAN_OPTIONS=symbolize=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1:detect_container_overflow=0 export UBSAN_OPTIONS=print_stacktrace=1 ## set TCMALLOC_HEAP_LIMIT_MB to limit memory used by tcmalloc diff --git a/docs/en/docs/install/source-install/compilation-mac.md b/docs/en/docs/install/source-install/compilation-mac.md index 810d869e19e68f..88394c38d0496d 100644 --- a/docs/en/docs/install/source-install/compilation-mac.md +++ b/docs/en/docs/install/source-install/compilation-mac.md @@ -30,16 +30,15 @@ This post introduces how to compile from source on macOS (both x86_64 and arm64) ## Prerequisites -1. macOS 12 (Monterey) or newer(_**both Intel chip and Apple Silicon chip are supported**_) -2. Apple Clang 13 or newer(the latest version is recommended) -3. [Homebrew](https://brew.sh/) +1. macOS 12 (Monterey) or newer(_**both Intel chip and Apple Silicon chips are supported**_) +2. [Homebrew](https://brew.sh/) ## Steps 1. Use [Homebrew](https://brew.sh/) to install tools ```shell brew install automake autoconf libtool pkg-config texinfo coreutils gnu-getopt \ - python cmake ninja ccache bison byacc gettext wget pcre maven openjdk@11 npm + python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@15 openjdk@11 npm ``` 2. Compile from source diff --git a/docs/zh-CN/docs/install/source-install/compilation-mac.md b/docs/zh-CN/docs/install/source-install/compilation-mac.md index 3e679d355ab75c..a6393691ffe48f 100644 --- a/docs/zh-CN/docs/install/source-install/compilation-mac.md +++ b/docs/zh-CN/docs/install/source-install/compilation-mac.md @@ -31,15 +31,14 @@ under the License. ## 环境要求 1. macOS 12 (Monterey) 及以上(_**Intel和Apple Silicon均支持**_) -2. Apple Clang 13及以上(最好使用最新版本) -3. [Homebrew](https://brew.sh/) +2. [Homebrew](https://brew.sh/) ## 编译步骤 1. 使用[Homebrew](https://brew.sh/)安装依赖 ```shell brew install automake autoconf libtool pkg-config texinfo coreutils gnu-getopt \ - python cmake ninja ccache bison byacc gettext wget pcre maven openjdk@11 npm + python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@15 openjdk@11 npm ``` 2. 编译源码 diff --git a/env.sh b/env.sh index 171a868468388e..4d5f063f15d4fc 100755 --- a/env.sh +++ b/env.sh @@ -51,7 +51,7 @@ CELLARS=( texinfo coreutils gnu-getopt - python + python@3 cmake ninja ccache @@ -61,6 +61,7 @@ CELLARS=( wget pcre maven + llvm@15 ) for cellar in "\${CELLARS[@]}"; do EXPORT_CELLARS="\${HOMEBREW_REPO_PREFIX}/opt/\${cellar}/bin:\${EXPORT_CELLARS}" diff --git a/run-be-ut.sh b/run-be-ut.sh index 91cf61148a0e9b..18e9d078b75d98 100755 --- a/run-be-ut.sh +++ b/run-be-ut.sh @@ -274,7 +274,7 @@ mkdir "${UT_TMP_DIR}" touch "${UT_TMP_DIR}/tmp_file" # set asan and ubsan env to generate core file -export ASAN_OPTIONS=symbolize=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1 +export ASAN_OPTIONS=symbolize=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1:detect_container_overflow=0 export UBSAN_OPTIONS=print_stacktrace=1 # find all executable test files