Skip to content

Python 3.15, MacOS build error #647

Open

Description

@slott56

This is an install on an Apple M4 chip (ARM), macOS 26.5.1 (25F80).

Using Python 3.15.0a6 environment at: .tox/py315
Resolved 90 packages in 2.15s
  × Failed to build `google-re2==1.1.20251105`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)

      [stdout]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.macosx-11.0-arm64-cpython-315/re2
      copying re2/__init__.py -> build/lib.macosx-11.0-arm64-cpython-315/re2
      running build_ext
      building '_re2' extension
      creating build/temp.macosx-11.0-arm64-cpython-315
      c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -O3 -arch arm64 -mmacosx-version-min=11.0 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -fPIC
      -I/Users/slott/.cache/uv/builds-v0/.tmpxrcAhw/include -I/Users/slott/.local/share/uv/python/cpython-3.15.0a6-macos-aarch64-none/include/python3.15 -c _re2.cc -o build/temp.macosx-11.0-arm64-cpython-315/_re2.o -fvisibility=hidden

      [stderr]
      /Users/slott/.cache/uv/builds-v0/.tmpxrcAhw/lib/python3.15/site-packages/setuptools/dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: BSD License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        self._finalize_license_expression()
      _re2.cc:15:10: fatal error: 'absl/strings/string_view.h' file not found
         15 | #include "absl/strings/string_view.h"
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/c++' failed with exit code 1

      hint: This usually indicates a problem with the package or the build environment.

The needed includes are in /opt/local/include/

ls -l /opt/local/include/absl/strings/string_view.h 
-rw-r--r--@ 1 root  admin  29629 Aug  1  2024 /opt/local/include/absl/strings/string_view.h

Activity

  1. MajorTanya commented on Jul 3, 2026

    @MajorTanya

    Did you check the Readme's build instructions?

    Building RE2 requires a C++17 compiler and the Abseil library.
    Building the tests and benchmarks requires
    GoogleTest
    and Benchmark.
    To obtain those:

    • Linux: apt install libabsl-dev libgtest-dev libbenchmark-dev
    • macOS: brew install abseil googletest google-benchmark pkg-config-wrapper
    • Windows: vcpkg install abseil gtest benchmark
      or vcpkg add port abseil gtest benchmark

    I have no idea about C++ or building re2, but the error looks like you don't have abseil available to me?

  2. slott56 commented on Jul 6, 2026

    @slott56
    Author

    I wasn't expecting to have to build it, since it's published to the Python Package Index.

    Your summary is wonderfully helpful! I think I can justify adding these instructions to the project I support so we can test with Python 3.15 until the package on PyPI is more complete.

  3. MajorTanya commented on Jul 7, 2026

    @MajorTanya

    I wasn't expecting to have to build it, since it's published to the Python Package Index.

    Your summary is wonderfully helpful! I think I can justify adding these instructions to the project I support so we can test with Python 3.15 until the package on PyPI is more complete.

    it's probably because the maintainers hasn't published built wheels for the 3.15 betas yet

  4. MajorTanya commented on Sep 26, 2026

    @MajorTanya

    Considering the plan is to release 3.15 on the first of October (in ~5ish days), could @rsc take another look at building wheels & pushing a new release to PyPI for this project?

  5. MajorTanya commented on Oct 9, 2026

    @MajorTanya

    5. Considering the plan is to release 3.15 on the first of October (in ~5ish days), could @rsc take another look at building wheels & pushing a new release to PyPI for this project?

    3.15.0 final was just released, so it's now definitely available.

  6. amotl commented on Oct 17, 2026

    @amotl

    Hi there. We are observing the same problem on our CI. Please provide support for Python 3.15 by publishing corresponding wheel packages to PyPI. Thank you!

  7. rsc commented on Oct 17, 2026

    @rsc
    Contributor

    I've left Google and their bot finally noticed and kicked me out of the GitHub repo. I will ask someone to put me back in, and then I will look into publishing the wheels.

  8. rsc commented on Oct 17, 2026

    @rsc
    Contributor
  9. adonovan commented on Oct 17, 2026

    @adonovan
    Collaborator

    I've added you to the "maintainer" role.

  10. amotl commented on Nov 5, 2026

    @amotl

    Gentle ping. ;]

  11. romanek-adam-b2c2 commented on Nov 19, 2026

    @romanek-adam-b2c2

    Is there any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions