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 20ade4ae96 [chore](macOS) Disable JAVA UDF temporarily (#13563) 20ade4ae96 is described below commit 20ade4ae9622fa35f3ed2423e2137b9b6b8fc0b5 Author: Adonis Ling <adonis0...@gmail.com> AuthorDate: Sat Oct 22 01:05:45 2022 +0800 [chore](macOS) Disable JAVA UDF temporarily (#13563) Fail to start BE (ASAN) if it was built with JAVA UDF on macOS. --- be/CMakeLists.txt | 6 +++++- build.sh | 9 ++++++++- tools/find_libjvm.sh | 7 ++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index ccb1e74d2c..fac4468c96 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -616,7 +616,11 @@ if (BUILD_JAVA_UDF) add_library(jvm SHARED IMPORTED) set_target_properties(jvm PROPERTIES IMPORTED_LOCATION ${LIB_JVM}) include_directories($ENV{JAVA_HOME}/include) - include_directories($ENV{JAVA_HOME}/include/linux) + if (NOT OS_MACOSX) + include_directories($ENV{JAVA_HOME}/include/linux) + else() + include_directories($ENV{JAVA_HOME}/include/darwin) + endif() add_definitions("-DLIBJVM") endif() endif() diff --git a/build.sh b/build.sh index 21af6ec655..f79df81673 100755 --- a/build.sh +++ b/build.sh @@ -300,6 +300,10 @@ if [[ -z "${RECORD_COMPILER_SWITCHES}" ]]; then RECORD_COMPILER_SWITCHES='OFF' fi +if [[ "${BUILD_JAVA_UDF}" -eq 1 && "$(uname -s)" == 'Darwin' ]]; then + BUILD_JAVA_UDF=0 +fi + echo "Get params: BUILD_FE -- ${BUILD_FE} BUILD_BE -- ${BUILD_BE} @@ -447,7 +451,10 @@ if [[ "${FE_MODULES}" != '' ]]; then if [[ "${CLEAN}" -eq 1 ]]; then clean_fe fi - "${MVN_CMD}" package -pl ${FE_MODULES:+${FE_MODULES}} -DskipTests + if [[ "$(uname -sm)" == 'Darwin arm64' ]]; then + os_arch='-Dos.arch=x86_64' + fi + "${MVN_CMD}" package -pl ${FE_MODULES:+${FE_MODULES}} -DskipTests ${os_arch:+${os_arch}} cd "${DORIS_HOME}" fi diff --git a/tools/find_libjvm.sh b/tools/find_libjvm.sh index 2232ca7b1c..79235a2b44 100755 --- a/tools/find_libjvm.sh +++ b/tools/find_libjvm.sh @@ -53,4 +53,9 @@ elif [[ -d "${JAVA_HOME}/jre" ]]; then else export LIBJVM_PATH="${JAVA_HOME}/lib/${jvm_arch}" fi -echo "${LIBJVM_PATH}"/*/libjvm.so + +if [[ "$(uname -s)" != 'Darwin' ]]; then + echo "${LIBJVM_PATH}"/*/libjvm.so +else + echo "${LIBJVM_PATH}"/*/libjvm.dylib +fi --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org