Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-13510

CMake error while installing wiredtiger Python package 11.2.0 on macOS

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.3.0, 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Storage Engines
    • StorEng - 2024-10-01

      The below CMake error was encountered in the building wiredtiger step while "pip install wiredtiger" version 11.2.0 Python package on macOS. 

      The issue was initially reported with the below environment:

      • Python version: 3.9.8
      • MacBook M3 (arm64)

      and then reproduced in another environment:

      • Python version: 3.12.2
      • MacBook M1 (arm64)
      $ pip install wiredtiger
      Collecting wiredtiger
        Using cached wiredtiger-11.2.0.tar.gz (9.6 MB)
        Installing build dependencies ... done
        Getting requirements to build wheel ... done
        Preparing metadata (pyproject.toml) ... done
      Collecting cmake (from wiredtiger)
        Using cached cmake-3.30.3-py3-none-macosx_11_0_universal2.macosx_11_0_arm64.macosx_10_10_x86_64.whl.metadata (6.4 kB)
      Collecting ninja (from wiredtiger)
        Using cached ninja-1.11.1.1-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl.metadata (5.3 kB)
      Downloading cmake-3.30.3-py3-none-macosx_11_0_universal2.macosx_11_0_arm64.macosx_10_10_x86_64.whl (47.9 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.9/47.9 MB 3.1 MB/s eta 0:00:00
      Using cached ninja-1.11.1.1-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (270 kB)
      Building wheels for collected packages: wiredtiger
        Building wheel for wiredtiger (pyproject.toml) ... error
        error: subprocess-exited-with-error
      
        × Building wheel for wiredtiger (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [91 lines of output]
            setup.py: snappy: missing
            setup.py: Note: a suitable version of snappy can be found at
                https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz
            It can be installed via: yum install snappy snappy-develor via: apt-get install libsnappy-dev
            setup.py: after installing it, set CMAKE_LIBRARY_PATH
            setup.py: zstd: missing
            setup.py: Need to install zstd
            It can be installed via: apt-get install libzstd-dev
            setup.py: after installing it, set CMAKE_LIBRARY_PATH
            running bdist_wheel
            running build
            running build_py
            creating build
            creating build/lib.macosx-14.0-arm64-cpython-312
            creating build/lib.macosx-14.0-arm64-cpython-312/wiredtiger
            copying ./fpacking.py -> build/lib.macosx-14.0-arm64-cpython-312/wiredtiger
            copying ./__init__.py -> build/lib.macosx-14.0-arm64-cpython-312/wiredtiger
            copying ./packutil.py -> build/lib.macosx-14.0-arm64-cpython-312/wiredtiger
            copying ./packing.py -> build/lib.macosx-14.0-arm64-cpython-312/wiredtiger
            copying ./intpacking.py -> build/lib.macosx-14.0-arm64-cpython-312/wiredtiger
            running egg_info
            writing wiredtiger.egg-info/PKG-INFO
            writing dependency_links to wiredtiger.egg-info/dependency_links.txt
            writing requirements to wiredtiger.egg-info/requires.txt
            writing top-level names to wiredtiger.egg-info/top_level.txt
            reading manifest file 'wiredtiger.egg-info/SOURCES.txt'
            adding license file 'LICENSE'
            writing manifest file 'wiredtiger.egg-info/SOURCES.txt'
            copying ./setup.py -> build/lib.macosx-14.0-arm64-cpython-312/wiredtiger
            running build_ext
            wiredtiger configure
            -- The C compiler identification is AppleClang 15.0.0.15000309
            -- The CXX compiler identification is AppleClang 15.0.0.15000309
            -- The ASM compiler identification is Clang with GNU-like command-line
            -- Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc
            -- Detecting C compiler ABI info
            -- Detecting C compiler ABI info - done
            -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
            -- Detecting C compile features
            -- Detecting C compile features - done
            -- Detecting CXX compiler ABI info
            -- Detecting CXX compiler ABI info - done
            -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
            -- Detecting CXX compile features
            -- Detecting CXX compile features - done
            -- Performing Test HAVE_BUILD_MODE_C_FLAGS
            -- Performing Test HAVE_BUILD_MODE_C_FLAGS - Success
            -- Performing Test HAVE_BUILD_MODE_CXX_FLAGS
            -- Performing Test HAVE_BUILD_MODE_CXX_FLAGS - Success
            -- Performing Test HAVE_BUILD_MODE_C_FLAGS
            -- Performing Test HAVE_BUILD_MODE_C_FLAGS - Success
            -- Performing Test HAVE_BUILD_MODE_CXX_FLAGS
            -- Performing Test HAVE_BUILD_MODE_CXX_FLAGS - Success
            -- Performing Test HAVE_BUILD_MODE_C_FLAGS
            -- Performing Test HAVE_BUILD_MODE_C_FLAGS - Failed
            -- Performing Test HAVE_BUILD_MODE_C_FLAGS
            -- Performing Test HAVE_BUILD_MODE_C_FLAGS - Success
            -- Performing Test HAVE_BUILD_MODE_CXX_FLAGS
            -- Performing Test HAVE_BUILD_MODE_CXX_FLAGS - Success
            -- Performing Test HAVE_BUILD_MODE_C_FLAGS
            -- Performing Test HAVE_BUILD_MODE_C_FLAGS - Success
            -- Performing Test HAVE_BUILD_MODE_CXX_FLAGS
            -- Performing Test HAVE_BUILD_MODE_CXX_FLAGS - Success
            -- Performing Test has_moutline_atomics
            -- Performing Test has_moutline_atomics - Failed
            -- Looking for arm_neon.h
            -- Looking for arm_neon.h - not found
            -- Looking for sys/types.h
            -- Looking for sys/types.h - not found
            -- Looking for stdint.h
            -- Looking for stdint.h - not found
            -- Looking for stddef.h
            -- Looking for stddef.h - not found
            -- Check size of size_t
            -- Check size of size_t - failed
            CMake Error at cmake/helpers.cmake:575 (if):
              if given arguments:
      
                "EQUAL" ""
      
              Unknown arguments specified
            Call Stack (most recent call first):
              cmake/configs/auto.cmake:6 (assert_type_size)
              CMakeLists.txt:48 (include)
      
      
            -- Configuring incomplete, errors occurred!
            See also "/private/var/folders/nv/pnv1b11d3yg5f_5xtmz5znc80000gp/T/pip-install-piisde21/wiredtiger_bbaaa3c9be9b4522a9603e1a2407f3e0/cmake_pip_build/CMakeFiles/CMakeOutput.log".
            See also "/private/var/folders/nv/pnv1b11d3yg5f_5xtmz5znc80000gp/T/pip-install-piisde21/wiredtiger_bbaaa3c9be9b4522a9603e1a2407f3e0/cmake_pip_build/CMakeFiles/CMakeError.log".
            setup.py: build command failed: "sh" "-c" "cmake -B cmake_pip_build -G Ninja -DENABLE_STATIC=1 -DENABLE_SHARED=0 -DWITH_PIC=1 -DCMAKE_C_FLAGS="${CFLAGS:-}" -DENABLE_PYTHON=1 -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 -DHAVE_BUILTIN_EXTENSION_ZLIB=1 -DHAVE_BUILTIN_EXTENSION_ZSTD=1"
            running: "sh" "-c" "cmake -B cmake_pip_build -G Ninja -DENABLE_STATIC=1 -DENABLE_SHARED=0 -DWITH_PIC=1 -DCMAKE_C_FLAGS="${CFLAGS:-}" -DENABLE_PYTHON=1 -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 -DHAVE_BUILTIN_EXTENSION_ZLIB=1 -DHAVE_BUILTIN_EXTENSION_ZSTD=1"
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for wiredtiger
      Failed to build wiredtiger
      ERROR: Could not build wheels for wiredtiger, which is required to install pyproject.toml-based projects
      
      [notice] A new release of pip is available: 24.0 -> 24.2
      [notice] To update, run: pip install --upgrade pip
      

      It's worth noting this issue was not seen on the Intel MacBook (x86).

            Assignee:
            luke.chen@mongodb.com Luke Chen
            Reporter:
            luke.chen@mongodb.com Luke Chen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: