Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 31, 2025

When installing from source on macOS, pip install -r requirements.txt fails with CMake compatibility errors because python-olm bundles an outdated libolm (requires CMake < 3.5, incompatible with modern CMake). Additionally, the CI/CD workflow itself was failing on both Windows and macOS builds.

Changes

  • INSTALL.md: Added macOS prerequisites section requiring brew install libolm pkg-config cmake before Python dependency installation
  • INSTALL.md: Added troubleshooting section for CMake build failures with recovery instructions
  • .github/workflows/build.yml (Windows): Fixed incorrect check for olm_static.lib - CMake actually creates olm.lib, not olm_static.lib
  • .github/workflows/build.yml (macOS): Added CMAKE_ARGS=-DCMAKE_POLICY_VERSION_MINIMUM=3.5 to prevent python-olm from building bundled libolm source
  • CHANGELOG.md: Documented all fixes

Context

The CI/CD workflow was failing on both Windows and macOS builds:

Windows: The workflow expected olm_static.lib but CMake creates olm.lib when BUILD_SHARED_LIBS=OFF

macOS: Despite installing libolm via Homebrew and setting PKG_CONFIG_PATH, python-olm was still attempting to build its bundled source, causing:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

Installing libolm systemwide and setting appropriate environment variables forces python-olm to link against the system library instead of building its bundled source. This fix applies to both user installations and CI/CD builds.

Original prompt

Mac OS build failing:

Downloading python-olm-3.2.16.tar.gz (2.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 94.9 MB/s 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [53 lines of output]
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.

    Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
    to tell CMake that the project requires at least <min> but has been updated
    to work with policies introduced by <max> or earlier.
  
    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
  
  
  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
      main()
    File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
      self.run_setup()
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
      exec(code, locals())
    File "<string>", line 4, in <module>
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 115, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 148, in setup
      _setup_distribution = dist = klass(attrs)
                                   ^^^^^^^^^^^^
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 321, in __init__
      _Distribution.__init__(self, dist_attrs)
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 309, in __init__
      self.finalize_options()
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 784, in finalize_options
      ep(self)
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 804, in _finalize_setup_keywords
      ep.load()(self, ep.name, value)
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/cffi/setuptools_ext.py", line 229, in cffi_modules
      add_cffi_module(dist, cffi_module)
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/cffi/setuptools_ext.py", line 50, in add_cffi_module
      execfile(build_file_name, mod_vars)
    File "/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/pip-build-env-o4veaa9b/overlay/lib/python3.12/site-packages/cffi/setuptools_ext.py", line 26, in execfile
      exec(code, glob, glob)
    File "olm_build.py", line 35, in <module>
      subprocess.run(
    File "/Library/Frameworks/Python.fram

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 31, 2025 16:25
…-olm build failures

Co-authored-by: CJFWeatherhead <6923098+CJFWeatherhead@users.noreply.github.com>
…nsistency

Co-authored-by: CJFWeatherhead <6923098+CJFWeatherhead@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Mac OS build failing due to CMake version docs: Fix macOS python-olm build failure in installation guide Oct 31, 2025
Copilot AI requested a review from CJFWeatherhead October 31, 2025 16:31
@CJFWeatherhead
Copy link
Owner

@copilot This is an error in the current build and release workflow, please check that output

Copy link
Contributor Author

Copilot AI commented Oct 31, 2025

@copilot This is an error in the current build and release workflow, please check that output

You're correct - the build workflow is still failing. I investigated the most recent workflow run (#17) and found:

macOS Build (job 54204186587): Still failing with the same CMake error when installing python-olm. Despite installing libolm via Homebrew, pip install is still trying to build from source.

Windows Build (job 54204186529): Failing because the workflow expects olm_static.lib but CMake only creates olm.lib.

My PR only updated the installation documentation for end users - it didn't fix the actual workflow build issues. I'll investigate and fix both build failures now.

Windows: Fix incorrect check for olm_static.lib - CMake creates olm.lib
macOS: Add CMAKE_ARGS to prevent python-olm from building bundled source

Co-authored-by: CJFWeatherhead <6923098+CJFWeatherhead@users.noreply.github.com>
Copilot AI changed the title docs: Fix macOS python-olm build failure in installation guide fix: Resolve macOS and Windows build failures in workflow and installation guide Oct 31, 2025
@CJFWeatherhead CJFWeatherhead deleted the copilot/fix-mac-os-build-error branch November 8, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants