diff --git a/.github/workflows/build_linux_arm64_wheels-gh.yml b/.github/workflows/build_linux_arm64_wheels-gh.yml index 5fd5c76fd83..c4505764551 100644 --- a/.github/workflows/build_linux_arm64_wheels-gh.yml +++ b/.github/workflows/build_linux_arm64_wheels-gh.yml @@ -25,6 +25,20 @@ jobs: name: Build Universal Wheel (Linux ARM64) runs-on: GH-Linux-ARM64 steps: + - name: Check CPU capabilities and requirements + run: | + echo "=== CPU Information ===" + cat /proc/cpuinfo + echo "" + echo "=== Checking CPU requirements ===" + + if grep -P "^(?=.*atomic)(?=.*ssbs)" /proc/cpuinfo > /dev/null; then + echo "CPU meets minimum requirements (atomic and ssbs flags found)" + else + echo "CPU does not meet minimum requirements" + echo "Missing required flags: atomic and/or ssbs" + echo "This may cause build failures. Consider using -DNO_ARMV81_OR_HIGHER=1" + fi - name: Install Python build dependencies run: | sudo apt-get update diff --git a/.github/workflows/build_macos_x86_wheels.yml b/.github/workflows/build_macos_x86_wheels.yml index 22d597a0f6e..d8036d1d350 100644 --- a/.github/workflows/build_macos_x86_wheels.yml +++ b/.github/workflows/build_macos_x86_wheels.yml @@ -146,7 +146,6 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - token: ${{ secrets.GH_TOKEN }} - name: Update submodules run: | git submodule update --init --recursive --jobs 4 diff --git a/chdb/build.sh b/chdb/build.sh index da078bff541..d639873a365 100755 --- a/chdb/build.sh +++ b/chdb/build.sh @@ -61,21 +61,21 @@ elif [ "$(uname)" == "Linux" ]; then if [ "$(uname -m)" == "x86_64" ]; then CPU_FEATURES="-DENABLE_AVX=1 -DENABLE_AVX2=0" LLVM="-DENABLE_EMBEDDED_COMPILER=1 -DENABLE_DWARF_PARSER=1" - RUST_FEATURES="-DENABLE_RUST=1 -DENABLE_DELTA_KERNEL_RS=1" - CORROSION_CMAKE_FILE="${PROJ_DIR}/contrib/corrosion-cmake/CMakeLists.txt" - if [ -f "${CORROSION_CMAKE_FILE}" ]; then - if ! grep -q 'OPENSSL_NO_DEPRECATED_3_0' "${CORROSION_CMAKE_FILE}"; then - echo "Modifying corrosion CMakeLists.txt for Linux x86_64..." - ${SED_INPLACE} 's/corrosion_set_env_vars(${target_name} "RUSTFLAGS=${RUSTFLAGS}")/corrosion_set_env_vars(${target_name} "RUSTFLAGS=${RUSTFLAGS} --cfg osslconf=\\\"OPENSSL_NO_DEPRECATED_3_0\\\"")/g' "${CORROSION_CMAKE_FILE}" - else - echo "corrosion CMakeLists.txt already modified, skipping..." - fi + else + CPU_FEATURES="-DENABLE_AVX=0 -DENABLE_AVX2=0" + LLVM="-DENABLE_EMBEDDED_COMPILER=0 -DENABLE_DWARF_PARSER=0" + fi + RUST_FEATURES="-DENABLE_RUST=1 -DENABLE_DELTA_KERNEL_RS=1" + CORROSION_CMAKE_FILE="${PROJ_DIR}/contrib/corrosion-cmake/CMakeLists.txt" + if [ -f "${CORROSION_CMAKE_FILE}" ]; then + if ! grep -q 'OPENSSL_NO_DEPRECATED_3_0' "${CORROSION_CMAKE_FILE}"; then + echo "Modifying corrosion CMakeLists.txt for Linux x86_64..." + ${SED_INPLACE} 's/corrosion_set_env_vars(${target_name} "RUSTFLAGS=${RUSTFLAGS}")/corrosion_set_env_vars(${target_name} "RUSTFLAGS=${RUSTFLAGS} --cfg osslconf=\\\"OPENSSL_NO_DEPRECATED_3_0\\\"")/g' "${CORROSION_CMAKE_FILE}" else - echo "Warning: corrosion CMakeLists.txt not found at ${CORROSION_CMAKE_FILE}" + echo "corrosion CMakeLists.txt already modified, skipping..." fi else - CPU_FEATURES="-DENABLE_AVX=0 -DENABLE_AVX2=0 -DNO_ARMV81_OR_HIGHER=1" - LLVM="-DENABLE_EMBEDDED_COMPILER=0 -DENABLE_DWARF_PARSER=0" + echo "Warning: corrosion CMakeLists.txt not found at ${CORROSION_CMAKE_FILE}" fi else echo "OS not supported" diff --git a/cmake/cpu_features.cmake b/cmake/cpu_features.cmake index 264157aa86c..6cbf530e0e5 100644 --- a/cmake/cpu_features.cmake +++ b/cmake/cpu_features.cmake @@ -103,12 +103,12 @@ elseif (ARCH_AARCH64) # legacy profile (full Graviton 3 /proc/cpuinfo is "fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm # jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs paca pacg dcpodp svei8mm svebf16 i8mm # bf16 dgh rng") - execute_process( - COMMAND grep -P "^(?=.*atomic)(?=.*ssbs)" /proc/cpuinfo - OUTPUT_VARIABLE FLAGS) - if (NOT FLAGS) - MESSAGE(FATAL_ERROR "The build machine does not satisfy the minimum CPU requirements, try to run cmake with -DNO_ARMV81_OR_HIGHER=1") - endif() + # execute_process( + # COMMAND grep -P "^(?=.*atomic)(?=.*ssbs)" /proc/cpuinfo + # OUTPUT_VARIABLE FLAGS) + # if (NOT FLAGS) + # MESSAGE(FATAL_ERROR "The build machine does not satisfy the minimum CPU requirements, try to run cmake with -DNO_ARMV81_OR_HIGHER=1") + # endif() endif() elseif (ARCH_PPC64LE) diff --git a/tests/test_delta_lake.py b/tests/test_delta_lake.py index c89d2787341..1776ea64407 100644 --- a/tests/test_delta_lake.py +++ b/tests/test_delta_lake.py @@ -3,10 +3,26 @@ import unittest import sys import platform +import subprocess import chdb from chdb import session -@unittest.skipUnless(sys.platform.startswith("linux") and platform.machine() in ["x86_64", "AMD64"], "Runs only in the Linux x86 environment") +def is_musl_linux(): + """Check if running on musl Linux""" + if platform.system() != "Linux": + return False + try: + result = subprocess.run(['ldd', '--version'], capture_output=True, text=True) + print(f"stdout: {result.stdout.lower()}") + print(f"stderr: {result.stderr.lower()}") + # Check both stdout and stderr for musl + output_text = (result.stdout + result.stderr).lower() + return 'musl' in output_text + except Exception as e: + print(f"Exception in is_musl_linux: {e}") + return False + +@unittest.skipUnless(sys.platform.startswith("linux") and not is_musl_linux(), "Runs only on Linux platforms") class TestDeltaLake(unittest.TestCase): def setUp(self) -> None: return super().setUp()