Title: [Bug]: Can't find pybind11 headers when building from source · Issue #29741 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Can't find pybind11 headers when building from source · Issue #29741 · matplotlib/matplotlib
X Title: [Bug]: Can't find pybind11 headers when building from source · Issue #29741 · matplotlib/matplotlib
Description: Bug summary On macOS I am failing to build Matplotlib from source, because the c++ compiler cannot find Pybind11 headers. I've followed instructions at https://matplotlib.org/devdocs/devel/development_setup.html, and I get the same issue...
Open Graph Description: Bug summary On macOS I am failing to build Matplotlib from source, because the c++ compiler cannot find Pybind11 headers. I've followed instructions at https://matplotlib.org/devdocs/devel/developm...
X Description: Bug summary On macOS I am failing to build Matplotlib from source, because the c++ compiler cannot find Pybind11 headers. I've followed instructions at https://matplotlib.org/devdocs/devel/deve...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/29741
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Can't find pybind11 headers when building from source","articleBody":"### Bug summary\n\nOn macOS I am failing to build Matplotlib from source, because the c++ compiler cannot find Pybind11 headers. I've followed instructions at https://matplotlib.org/devdocs/devel/development_setup.html, and I get the same issue in a virtual environment, a virtual environment managed with `uv`, and a `conda` environment.\n\nI have pybind11 installed globally (using `brew`), and in the Python virtual environment:\n```\n% python -c \"import pybind11; print(pybind11.__version__)\"\n2.13.6\n```\n\n### Code for reproduction\n\n```Python\npython -m pip install --verbose --no-build-isolation --editable \".[dev]\"\n```\n\n### Actual outcome\n\n```\n% uv pip install --verbose --no-build-isolation --editable \".[dev]\"\n\nDEBUG uv 0.6.5 (Homebrew 2025-03-06)\nDEBUG Searching for default Python interpreter in virtual environments\nDEBUG Found `cpython-3.12.8-macos-aarch64-none` at `/Users/dstansby/software/matplotlib/.venv/bin/python3` (active virtual environment)\nDEBUG Using Python 3.12.8 environment at: .venv\nDEBUG Acquired lock for `.venv`\nDEBUG At least one requirement is not satisfied: file:///Users/dstansby/software/matplotlib\nDEBUG Using request timeout of 30s\nDEBUG Found PEP 621 metadata for /Users/dstansby/software/matplotlib in `pyproject.toml` (matplotlib)\nDEBUG No static `pyproject.toml` available for: matplotlib @ file:///Users/dstansby/software/matplotlib (DynamicField(\"version\"))\nDEBUG Acquired lock for `/Users/dstansby/.cache/uv/sdists-v8/editable/a93b495625504936`\nDEBUG Preparing metadata for: matplotlib @ file:///Users/dstansby/software/matplotlib\nDEBUG No workspace root found, using project root\nDEBUG Proceeding without build isolation\nDEBUG Calling `mesonpy.prepare_metadata_for_build_editable()`\n Building matplotlib @ file:///Users/dstansby/software/matplotlib\nDEBUG Building: matplotlib @ file:///Users/dstansby/software/matplotlib\nDEBUG No workspace root found, using project root\nDEBUG Proceeding without build isolation\nDEBUG Calling `mesonpy.build_editable(\"/Users/dstansby/.cache/uv/builds-v0/.tmppFdYgl\", {}, None)`\nDEBUG + meson setup --reconfigure /Users/dstansby/software/matplotlib /Users/dstansby/software/matplotlib/build/cp312 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/Users/dstansby/software/matplotlib/build/cp312/meson-python-native-file.ini\nDEBUG Cleaning... 0 files.\nDEBUG The Meson build system\nDEBUG Version: 1.7.0\nDEBUG Source dir: /Users/dstansby/software/matplotlib\nDEBUG Build dir: /Users/dstansby/software/matplotlib/build/cp312\nDEBUG Build type: native build\nDEBUG Program python3 found: YES (/Users/dstansby/software/matplotlib/.venv/bin/python3)\nDEBUG Project name: matplotlib\nDEBUG Project version: 3.11.0.dev547+gb0153b17b6\nDEBUG C compiler for the host machine: cc (clang 16.0.0 \"Apple clang version 16.0.0 (clang-1600.0.26.6)\")\nDEBUG C linker for the host machine: cc ld64 1115.7.3\nDEBUG C++ compiler for the host machine: c++ (clang 16.0.0 \"Apple clang version 16.0.0 (clang-1600.0.26.6)\")\nDEBUG C++ linker for the host machine: c++ ld64 1115.7.3\nDEBUG Host machine cpu family: aarch64\nDEBUG Host machine cpu: aarch64\nDEBUG Program python found: YES (/Users/dstansby/software/matplotlib/.venv/bin/python3)\nDEBUG Dependency pybind11 found: YES 2.13.6 (cached)\nDEBUG \nDEBUG Executing subproject freetype-2.6.1 \nDEBUG \nDEBUG freetype-2.6.1| Project name: freetype2\nDEBUG freetype-2.6.1| Project version: 2.6.1\nDEBUG freetype-2.6.1| C compiler for the host machine: cc (clang 16.0.0 \"Apple clang version 16.0.0 (clang-1600.0.26.6)\")\nDEBUG freetype-2.6.1| C linker for the host machine: cc ld64 1115.7.3\nDEBUG freetype-2.6.1| Has header \"unistd.h\" : YES (cached)\nDEBUG freetype-2.6.1| Has header \"fcntl.h\" : YES (cached)\nDEBUG freetype-2.6.1| Has header \"stdint.h\" : YES (cached)\nDEBUG freetype-2.6.1| Configuring ftconfig.h using configuration\nDEBUG freetype-2.6.1| Configuring ftoption.h using configuration\nDEBUG freetype-2.6.1| Build targets in project: 2\nDEBUG freetype-2.6.1| Subproject freetype-2.6.1 finished.\nDEBUG \nDEBUG \nDEBUG Executing subproject qhull \nDEBUG \nDEBUG qhull| Project name: qhull\nDEBUG qhull| Project version: 8.0.2\nDEBUG qhull| C compiler for the host machine: cc (clang 16.0.0 \"Apple clang version 16.0.0 (clang-1600.0.26.6)\")\nDEBUG qhull| C linker for the host machine: cc ld64 1115.7.3\nDEBUG qhull| Build targets in project: 3\nDEBUG qhull| Subproject qhull finished.\nDEBUG \nDEBUG Dependency dl found: YES unknown (cached)\nDEBUG Objective-C compiler for the host machine: clang (clang 16.0.0)\nDEBUG Objective-C linker for the host machine: clang ld64 1115.7.3\nDEBUG Dependency appleframeworks (modules: Cocoa) found: YES unknown (cached)\nDEBUG Configuring _version.py using configuration\nDEBUG Program /Users/dstansby/software/matplotlib/tools/generate_matplotlibrc.py found: YES (/Users/dstansby/software/matplotlib/tools/generate_matplotlibrc.py)\nDEBUG Build targets in project: 13\nDEBUG \nDEBUG matplotlib 3.11.0.dev547+gb0153b17b6\nDEBUG \nDEBUG Subprojects\nDEBUG freetype-2.6.1: YES\nDEBUG qhull : YES\nDEBUG \nDEBUG User defined options\nDEBUG Native files : /Users/dstansby/software/matplotlib/build/cp312/meson-python-native-file.ini\nDEBUG b_ndebug : if-release\nDEBUG b_vscrt : md\nDEBUG buildtype : release\nDEBUG \nDEBUG Found ninja-1.11.1.git.kitware.jobserver-1 at /Users/dstansby/software/matplotlib/.venv/bin/ninja\nDEBUG + /Users/dstansby/software/matplotlib/.venv/bin/ninja\nDEBUG [1/23] Compiling C++ object src/_image.cpython-312-darwin.so.p/py_converters.cpp.o\nDEBUG FAILED: src/_image.cpython-312-darwin.so.p/py_converters.cpp.o \nDEBUG c++ -Isrc/_image.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12 -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_image.cpython-312-darwin.so.p/py_converters.cpp.o -MF src/_image.cpython-312-darwin.so.p/py_converters.cpp.o.d -o src/_image.cpython-312-darwin.so.p/py_converters.cpp.o -c ../../src/py_converters.cpp\nDEBUG In file included from ../../src/py_converters.cpp:1:\nDEBUG ../../src/py_converters.h:12:10: fatal error: 'pybind11/pybind11.h' file not found\nDEBUG 12 | #include \u003cpybind11/pybind11.h\u003e\nDEBUG | ^~~~~~~~~~~~~~~~~~~~~\nDEBUG 1 error generated.\nDEBUG [2/23] Compiling C++ object src/_c_internal_utils.cpython-312-darwin.so.p/_c_internal_utils.cpp.o\nDEBUG FAILED: src/_c_internal_utils.cpython-312-darwin.so.p/_c_internal_utils.cpp.o \nDEBUG c++ -Isrc/_c_internal_utils.cpython-312-darwin.so.p -Isrc -I../../src -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12 -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_c_internal_utils.cpython-312-darwin.so.p/_c_internal_utils.cpp.o -MF src/_c_internal_utils.cpython-312-darwin.so.p/_c_internal_utils.cpp.o.d -o src/_c_internal_utils.cpython-312-darwin.so.p/_c_internal_utils.cpp.o -c ../../src/_c_internal_utils.cpp\nDEBUG ../../src/_c_internal_utils.cpp:19:10: fatal error: 'pybind11/pybind11.h' file not found\nDEBUG 19 | #include \u003cpybind11/pybind11.h\u003e\nDEBUG | ^~~~~~~~~~~~~~~~~~~~~\nDEBUG 1 error generated.\nDEBUG [3/23] Compiling C++ object src/_image.cpython-312-darwin.so.p/_image_wrapper.cpp.o\nDEBUG FAILED: src/_image.cpython-312-darwin.so.p/_image_wrapper.cpp.o \nDEBUG c++ -Isrc/_image.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12 -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_image.cpython-312-darwin.so.p/_image_wrapper.cpp.o -MF src/_image.cpython-312-darwin.so.p/_image_wrapper.cpp.o.d -o src/_image.cpython-312-darwin.so.p/_image_wrapper.cpp.o -c ../../src/_image_wrapper.cpp\nDEBUG ../../src/_image_wrapper.cpp:1:10: fatal error: 'pybind11/pybind11.h' file not found\nDEBUG 1 | #include \u003cpybind11/pybind11.h\u003e\nDEBUG | ^~~~~~~~~~~~~~~~~~~~~\nDEBUG 1 error generated.\nDEBUG [4/23] Compiling C++ object src/_tkagg.cpython-312-darwin.so.p/_tkagg.cpp.o\nDEBUG FAILED: src/_tkagg.cpython-312-darwin.so.p/_tkagg.cpp.o \nDEBUG c++ -Isrc/_tkagg.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12 -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_tkagg.cpython-312-darwin.so.p/_tkagg.cpp.o -MF src/_tkagg.cpython-312-darwin.so.p/_tkagg.cpp.o.d -o src/_tkagg.cpython-312-darwin.so.p/_tkagg.cpp.o -c ../../src/_tkagg.cpp\nDEBUG ../../src/_tkagg.cpp:32:10: fatal error: 'pybind11/pybind11.h' file not found\nDEBUG 32 | #include \u003cpybind11/pybind11.h\u003e\nDEBUG | ^~~~~~~~~~~~~~~~~~~~~\nDEBUG 1 error generated.\nDEBUG [5/23] Compiling C++ object src/_qhull.cpython-312-darwin.so.p/_qhull_wrapper.cpp.o\nDEBUG FAILED: src/_qhull.cpython-312-darwin.so.p/_qhull_wrapper.cpp.o \nDEBUG c++ -Isrc/_qhull.cpython-312-darwin.so.p -Isrc -I../../src -I../../subprojects/qhull-8.0.2/src -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12 -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -DMPL_DEVNULL=/dev/null -MD -MQ src/_qhull.cpython-312-darwin.so.p/_qhull_wrapper.cpp.o -MF src/_qhull.cpython-312-darwin.so.p/_qhull_wrapper.cpp.o.d -o src/_qhull.cpython-312-darwin.so.p/_qhull_wrapper.cpp.o -c ../../src/_qhull_wrapper.cpp\nDEBUG ../../src/_qhull_wrapper.cpp:8:10: fatal error: 'pybind11/pybind11.h' file not found\nDEBUG 8 | #include \u003cpybind11/pybind11.h\u003e\nDEBUG | ^~~~~~~~~~~~~~~~~~~~~\nDEBUG 1 error generated.\nDEBUG [6/23] Compiling C++ object src/ft2font.cpython-312-darwin.so.p/ft2font_wrapper.cpp.o\nDEBUG FAILED: src/ft2font.cpython-312-darwin.so.p/ft2font_wrapper.cpp.o \nDEBUG c++ -Isrc/ft2font.cpython-312-darwin.so.p -Isrc -I../../src -I../../subprojects/freetype-2.6.1/include -I../../extern/agg24-svn/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12 -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 '-DFREETYPE_BUILD_TYPE=\"local\"' -MD -MQ src/ft2font.cpython-312-darwin.so.p/ft2font_wrapper.cpp.o -MF src/ft2font.cpython-312-darwin.so.p/ft2font_wrapper.cpp.o.d -o src/ft2font.cpython-312-darwin.so.p/ft2font_wrapper.cpp.o -c ../../src/ft2font_wrapper.cpp\nDEBUG ../../src/ft2font_wrapper.cpp:2:10: fatal error: 'pybind11/pybind11.h' file not found\nDEBUG 2 | #include \u003cpybind11/pybind11.h\u003e\nDEBUG | ^~~~~~~~~~~~~~~~~~~~~\nDEBUG 1 error generated.\nDEBUG [7/23] Compiling C++ object src/_path.cpython-312-darwin.so.p/_path_wrapper.cpp.o\nDEBUG FAILED: src/_path.cpython-312-darwin.so.p/_path_wrapper.cpp.o \nDEBUG c++ -Isrc/_path.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12 -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_path.cpython-312-darwin.so.p/_path_wrapper.cpp.o -MF src/_path.cpython-312-darwin.so.p/_path_wrapper.cpp.o.d -o src/_path.cpython-312-darwin.so.p/_path_wrapper.cpp.o -c ../../src/_path_wrapper.cpp\nDEBUG ../../src/_path_wrapper.cpp:1:10: fatal error: 'pybind11/pybind11.h' file not found\nDEBUG 1 | #include \u003cpybind11/pybind11.h\u003e\nDEBUG | ^~~~~~~~~~~~~~~~~~~~~\nDEBUG 1 error generated.\nDEBUG [8/23] Compiling C++ object src/_backend_agg.cpython-312-darwin.so.p/_backend_agg_wrapper.cpp.o\nDEBUG FAILED: src/_backend_agg.cpython-312-darwin.so.p/_backend_agg_wrapper.cpp.o \nDEBUG c++ -Isrc/_backend_agg.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include -I../../subprojects/freetype-2.6.1/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12 -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_backend_agg.cpython-312-darwin.so.p/_backend_agg_wrapper.cpp.o -MF src/_backend_agg.cpython-312-darwin.so.p/_backend_agg_wrapper.cpp.o.d -o src/_backend_agg.cpython-312-darwin.so.p/_backend_agg_wrapper.cpp.o -c ../../src/_backend_agg_wrapper.cpp\nDEBUG ../../src/_backend_agg_wrapper.cpp:1:10: fatal error: 'pybind11/pybind11.h' file not found\nDEBUG 1 | #include \u003cpybind11/pybind11.h\u003e\nDEBUG | ^~~~~~~~~~~~~~~~~~~~~\nDEBUG 1 error generated.\nDEBUG [9/23] Compiling C++ object src/_backend_agg.cpython-312-darwin.so.p/_backend_agg.cpp.o\nDEBUG FAILED: src/_backend_agg.cpython-312-darwin.so.p/_backend_agg.cpp.o \nDEBUG c++ -Isrc/_backend_agg.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include -I../../subprojects/freetype-2.6.1/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12 -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_backend_agg.cpython-312-darwin.so.p/_backend_agg.cpp.o -MF src/_backend_agg.cpython-312-darwin.so.p/_backend_agg.cpp.o.d -o src/_backend_agg.cpython-312-darwin.so.p/_backend_agg.cpp.o -c ../../src/_backend_agg.cpp\nDEBUG In file included from ../../src/_backend_agg.cpp:6:\nDEBUG ../../src/_backend_agg.h:9:10: fatal error: 'pybind11/pybind11.h' file not found\nDEBUG 9 | #include \u003cpybind11/pybind11.h\u003e\nDEBUG | ^~~~~~~~~~~~~~~~~~~~~\nDEBUG 1 error generated.\nDEBUG [10/23] Compiling C++ object src/ft2font.cpython-312-darwin.so.p/ft2font.cpp.o\nDEBUG FAILED: src/ft2font.cpython-312-darwin.so.p/ft2font.cpp.o \nDEBUG c++ -Isrc/ft2font.cpython-312-darwin.so.p -Isrc -I../../src -I../../subprojects/freetype-2.6.1/include -I../../extern/agg24-svn/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12 -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 '-DFREETYPE_BUILD_TYPE=\"local\"' -MD -MQ src/ft2font.cpython-312-darwin.so.p/ft2font.cpp.o -MF src/ft2font.cpython-312-darwin.so.p/ft2font.cpp.o.d -o src/ft2font.cpython-312-darwin.so.p/ft2font.cpp.o -c ../../src/ft2font.cpp\nDEBUG In file included from ../../src/ft2font.cpp:13:\nDEBUG ../../src/mplutils.h:54:10: fatal error: 'pybind11/pybind11.h' file not found\nDEBUG 54 | #include \u003cpybind11/pybind11.h\u003e\nDEBUG | ^~~~~~~~~~~~~~~~~~~~~\nDEBUG 1 error generated.\nDEBUG ninja: build stopped: subcommand failed.\nDEBUG Released lock at `/Users/dstansby/.cache/uv/sdists-v8/editable/a93b495625504936/.lock`\n × Failed to build `matplotlib @ file:///Users/dstansby/software/matplotlib`\n ├─▶ The build backend returned an error\n ╰─▶ Call to `mesonpy.build_editable` failed (exit status: 1)\n\n [stdout]\n + meson setup --reconfigure /Users/dstansby/software/matplotlib /Users/dstansby/software/matplotlib/build/cp312 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md\n --native-file=/Users/dstansby/software/matplotlib/build/cp312/meson-python-native-file.ini\n Cleaning... 0 files.\n The Meson build system\n Version: 1.7.0\n Source dir: /Users/dstansby/software/matplotlib\n Build dir: /Users/dstansby/software/matplotlib/build/cp312\n Build type: native build\n Program python3 found: YES (/Users/dstansby/software/matplotlib/.venv/bin/python3)\n Project name: matplotlib\n Project version: 3.11.0.dev547+gb0153b17b6\n C compiler for the host machine: cc (clang 16.0.0 \"Apple clang version 16.0.0 (clang-1600.0.26.6)\")\n C linker for the host machine: cc ld64 1115.7.3\n C++ compiler for the host machine: c++ (clang 16.0.0 \"Apple clang version 16.0.0 (clang-1600.0.26.6)\")\n C++ linker for the host machine: c++ ld64 1115.7.3\n Host machine cpu family: aarch64\n Host machine cpu: aarch64\n Program python found: YES (/Users/dstansby/software/matplotlib/.venv/bin/python3)\n Dependency pybind11 found: YES 2.13.6 (cached)\n\n Executing subproject freetype-2.6.1\n\n freetype-2.6.1| Project name: freetype2\n freetype-2.6.1| Project version: 2.6.1\n freetype-2.6.1| C compiler for the host machine: cc (clang 16.0.0 \"Apple clang version 16.0.0 (clang-1600.0.26.6)\")\n freetype-2.6.1| C linker for the host machine: cc ld64 1115.7.3\n freetype-2.6.1| Has header \"unistd.h\" : YES (cached)\n freetype-2.6.1| Has header \"fcntl.h\" : YES (cached)\n freetype-2.6.1| Has header \"stdint.h\" : YES (cached)\n freetype-2.6.1| Configuring ftconfig.h using configuration\n freetype-2.6.1| Configuring ftoption.h using configuration\n freetype-2.6.1| Build targets in project: 2\n freetype-2.6.1| Subproject freetype-2.6.1 finished.\n\n\n Executing subproject qhull\n\n qhull| Project name: qhull\n qhull| Project version: 8.0.2\n qhull| C compiler for the host machine: cc (clang 16.0.0 \"Apple clang version 16.0.0 (clang-1600.0.26.6)\")\n qhull| C linker for the host machine: cc ld64 1115.7.3\n qhull| Build targets in project: 3\n qhull| Subproject qhull finished.\n\n Dependency dl found: YES unknown (cached)\n Objective-C compiler for the host machine: clang (clang 16.0.0)\n Objective-C linker for the host machine: clang ld64 1115.7.3\n Dependency appleframeworks (modules: Cocoa) found: YES unknown (cached)\n Configuring _version.py using configuration\n Program /Users/dstansby/software/matplotlib/tools/generate_matplotlibrc.py found: YES (/Users/dstansby/software/matplotlib/tools/generate_matplotlibrc.py)\n Build targets in project: 13\n\n matplotlib 3.11.0.dev547+gb0153b17b6\n\n Subprojects\n freetype-2.6.1: YES\n qhull : YES\n\n User defined options\n Native files : /Users/dstansby/software/matplotlib/build/cp312/meson-python-native-file.ini\n b_ndebug : if-release\n b_vscrt : md\n buildtype : release\n\n Found ninja-1.11.1.git.kitware.jobserver-1 at /Users/dstansby/software/matplotlib/.venv/bin/ninja\n + /Users/dstansby/software/matplotlib/.venv/bin/ninja\n [1/23] Compiling C++ object src/_image.cpython-312-darwin.so.p/py_converters.cpp.o\n FAILED: src/_image.cpython-312-darwin.so.p/py_converters.cpp.o\n c++ -Isrc/_image.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include\n -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12\n -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden\n -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_image.cpython-312-darwin.so.p/py_converters.cpp.o -MF\n src/_image.cpython-312-darwin.so.p/py_converters.cpp.o.d -o src/_image.cpython-312-darwin.so.p/py_converters.cpp.o -c ../../src/py_converters.cpp\n In file included from ../../src/py_converters.cpp:1:\n ../../src/py_converters.h:12:10: fatal error: 'pybind11/pybind11.h' file not found\n 12 | #include \u003cpybind11/pybind11.h\u003e\n | ^~~~~~~~~~~~~~~~~~~~~\n 1 error generated.\n [2/23] Compiling C++ object src/_c_internal_utils.cpython-312-darwin.so.p/_c_internal_utils.cpp.o\n FAILED: src/_c_internal_utils.cpython-312-darwin.so.p/_c_internal_utils.cpp.o\n c++ -Isrc/_c_internal_utils.cpython-312-darwin.so.p -Isrc -I../../src -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12\n -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden\n -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_c_internal_utils.cpython-312-darwin.so.p/_c_internal_utils.cpp.o\n -MF src/_c_internal_utils.cpython-312-darwin.so.p/_c_internal_utils.cpp.o.d -o src/_c_internal_utils.cpython-312-darwin.so.p/_c_internal_utils.cpp.o -c\n ../../src/_c_internal_utils.cpp\n ../../src/_c_internal_utils.cpp:19:10: fatal error: 'pybind11/pybind11.h' file not found\n 19 | #include \u003cpybind11/pybind11.h\u003e\n | ^~~~~~~~~~~~~~~~~~~~~\n 1 error generated.\n [3/23] Compiling C++ object src/_image.cpython-312-darwin.so.p/_image_wrapper.cpp.o\n FAILED: src/_image.cpython-312-darwin.so.p/_image_wrapper.cpp.o\n c++ -Isrc/_image.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include\n -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12\n -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden\n -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_image.cpython-312-darwin.so.p/_image_wrapper.cpp.o -MF\n src/_image.cpython-312-darwin.so.p/_image_wrapper.cpp.o.d -o src/_image.cpython-312-darwin.so.p/_image_wrapper.cpp.o -c ../../src/_image_wrapper.cpp\n ../../src/_image_wrapper.cpp:1:10: fatal error: 'pybind11/pybind11.h' file not found\n 1 | #include \u003cpybind11/pybind11.h\u003e\n | ^~~~~~~~~~~~~~~~~~~~~\n 1 error generated.\n [4/23] Compiling C++ object src/_tkagg.cpython-312-darwin.so.p/_tkagg.cpp.o\n FAILED: src/_tkagg.cpython-312-darwin.so.p/_tkagg.cpp.o\n c++ -Isrc/_tkagg.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include\n -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12\n -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden\n -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_tkagg.cpython-312-darwin.so.p/_tkagg.cpp.o -MF\n src/_tkagg.cpython-312-darwin.so.p/_tkagg.cpp.o.d -o src/_tkagg.cpython-312-darwin.so.p/_tkagg.cpp.o -c ../../src/_tkagg.cpp\n ../../src/_tkagg.cpp:32:10: fatal error: 'pybind11/pybind11.h' file not found\n 32 | #include \u003cpybind11/pybind11.h\u003e\n | ^~~~~~~~~~~~~~~~~~~~~\n 1 error generated.\n [5/23] Compiling C++ object src/_qhull.cpython-312-darwin.so.p/_qhull_wrapper.cpp.o\n FAILED: src/_qhull.cpython-312-darwin.so.p/_qhull_wrapper.cpp.o\n c++ -Isrc/_qhull.cpython-312-darwin.so.p -Isrc -I../../src -I../../subprojects/qhull-8.0.2/src\n -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12\n -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden\n -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -DMPL_DEVNULL=/dev/null -MD -MQ src/_qhull.cpython-312-darwin.so.p/_qhull_wrapper.cpp.o -MF\n src/_qhull.cpython-312-darwin.so.p/_qhull_wrapper.cpp.o.d -o src/_qhull.cpython-312-darwin.so.p/_qhull_wrapper.cpp.o -c ../../src/_qhull_wrapper.cpp\n ../../src/_qhull_wrapper.cpp:8:10: fatal error: 'pybind11/pybind11.h' file not found\n 8 | #include \u003cpybind11/pybind11.h\u003e\n | ^~~~~~~~~~~~~~~~~~~~~\n 1 error generated.\n [6/23] Compiling C++ object src/ft2font.cpython-312-darwin.so.p/ft2font_wrapper.cpp.o\n FAILED: src/ft2font.cpython-312-darwin.so.p/ft2font_wrapper.cpp.o\n c++ -Isrc/ft2font.cpython-312-darwin.so.p -Isrc -I../../src -I../../subprojects/freetype-2.6.1/include\n -I../../extern/agg24-svn/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12\n -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden\n -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 '-DFREETYPE_BUILD_TYPE=\"local\"' -MD -MQ src/ft2font.cpython-312-darwin.so.p/ft2font_wrapper.cpp.o\n -MF src/ft2font.cpython-312-darwin.so.p/ft2font_wrapper.cpp.o.d -o src/ft2font.cpython-312-darwin.so.p/ft2font_wrapper.cpp.o -c ../../src/ft2font_wrapper.cpp\n ../../src/ft2font_wrapper.cpp:2:10: fatal error: 'pybind11/pybind11.h' file not found\n 2 | #include \u003cpybind11/pybind11.h\u003e\n | ^~~~~~~~~~~~~~~~~~~~~\n 1 error generated.\n [7/23] Compiling C++ object src/_path.cpython-312-darwin.so.p/_path_wrapper.cpp.o\n FAILED: src/_path.cpython-312-darwin.so.p/_path_wrapper.cpp.o\n c++ -Isrc/_path.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include\n -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12\n -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden\n -fvisibility-inlines-hidden -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_path.cpython-312-darwin.so.p/_path_wrapper.cpp.o -MF\n src/_path.cpython-312-darwin.so.p/_path_wrapper.cpp.o.d -o src/_path.cpython-312-darwin.so.p/_path_wrapper.cpp.o -c ../../src/_path_wrapper.cpp\n ../../src/_path_wrapper.cpp:1:10: fatal error: 'pybind11/pybind11.h' file not found\n 1 | #include \u003cpybind11/pybind11.h\u003e\n | ^~~~~~~~~~~~~~~~~~~~~\n 1 error generated.\n [8/23] Compiling C++ object src/_backend_agg.cpython-312-darwin.so.p/_backend_agg_wrapper.cpp.o\n FAILED: src/_backend_agg.cpython-312-darwin.so.p/_backend_agg_wrapper.cpp.o\n c++ -Isrc/_backend_agg.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include\n -I../../subprojects/freetype-2.6.1/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12\n -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden\n -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_backend_agg.cpython-312-darwin.so.p/_backend_agg_wrapper.cpp.o\n -MF src/_backend_agg.cpython-312-darwin.so.p/_backend_agg_wrapper.cpp.o.d -o src/_backend_agg.cpython-312-darwin.so.p/_backend_agg_wrapper.cpp.o -c\n ../../src/_backend_agg_wrapper.cpp\n ../../src/_backend_agg_wrapper.cpp:1:10: fatal error: 'pybind11/pybind11.h' file not found\n 1 | #include \u003cpybind11/pybind11.h\u003e\n | ^~~~~~~~~~~~~~~~~~~~~\n 1 error generated.\n [9/23] Compiling C++ object src/_backend_agg.cpython-312-darwin.so.p/_backend_agg.cpp.o\n FAILED: src/_backend_agg.cpython-312-darwin.so.p/_backend_agg.cpp.o\n c++ -Isrc/_backend_agg.cpython-312-darwin.so.p -Isrc -I../../src -I../../extern/agg24-svn/include\n -I../../subprojects/freetype-2.6.1/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12\n -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden\n -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -MD -MQ src/_backend_agg.cpython-312-darwin.so.p/_backend_agg.cpp.o -MF\n src/_backend_agg.cpython-312-darwin.so.p/_backend_agg.cpp.o.d -o src/_backend_agg.cpython-312-darwin.so.p/_backend_agg.cpp.o -c ../../src/_backend_agg.cpp\n In file included from ../../src/_backend_agg.cpp:6:\n ../../src/_backend_agg.h:9:10: fatal error: 'pybind11/pybind11.h' file not found\n 9 | #include \u003cpybind11/pybind11.h\u003e\n | ^~~~~~~~~~~~~~~~~~~~~\n 1 error generated.\n [10/23] Compiling C++ object src/ft2font.cpython-312-darwin.so.p/ft2font.cpp.o\n FAILED: src/ft2font.cpython-312-darwin.so.p/ft2font.cpp.o\n c++ -Isrc/ft2font.cpython-312-darwin.so.p -Isrc -I../../src -I../../subprojects/freetype-2.6.1/include\n -I../../extern/agg24-svn/include -I/Users/dstansby/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/include/python3.12\n -I/Users/dstansby/.cache/uv/builds-v0/.tmp4X2jQO/lib/python3.12/site-packages/pybind11/include -I/install/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden\n -flto -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 '-DFREETYPE_BUILD_TYPE=\"local\"' -MD -MQ src/ft2font.cpython-312-darwin.so.p/ft2font.cpp.o -MF\n src/ft2font.cpython-312-darwin.so.p/ft2font.cpp.o.d -o src/ft2font.cpython-312-darwin.so.p/ft2font.cpp.o -c ../../src/ft2font.cpp\n In file included from ../../src/ft2font.cpp:13:\n ../../src/mplutils.h:54:10: fatal error: 'pybind11/pybind11.h' file not found\n 54 | #include \u003cpybind11/pybind11.h\u003e\n | ^~~~~~~~~~~~~~~~~~~~~\n 1 error generated.\n ninja: build stopped: subcommand failed.\n\n hint: This usually indicates a problem with the package or the build environment.\nDEBUG Released lock at `/Users/dstansby/software/matplotlib/.venv/.lock`\n```\n\n### Expected outcome\n\nA working install\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nmacOS\n\n### Matplotlib Version\n\nLatest `main` branch\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\nPython 3.12.8\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\ngit checkout","author":{"url":"https://github.com/dstansby","@type":"Person","name":"dstansby"},"datePublished":"2025-03-12T13:23:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/29741/matplotlib/issues/29741"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:156f67d2-bb02-00fd-6fd5-ba5d96804a78 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AAC6:32A102:F0912F:1413210:6A52D189 |
| html-safe-nonce | acdaaa9f8a4e5bd32c3689915a5fad19f90152614d4eb59c31679b23451199f1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQUM2OjMyQTEwMjpGMDkxMkY6MTQxMzIxMDo2QTUyRDE4OSIsInZpc2l0b3JfaWQiOiIzOTM0NDg2ODYxNTE5NzA0NDU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 43a0bbb4a3470fd15a2a7b7fd97828af411ef8aa96b806260a74fd8e5404d82c |
| hovercard-subject-tag | issue:2913960526 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/29741/issue_layout |
| twitter:image | https://opengraph.githubassets.com/867a162cedc474b98012e3b40be29fcb1745d7353f5296d28462eafbf6de81b1/matplotlib/matplotlib/issues/29741 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/867a162cedc474b98012e3b40be29fcb1745d7353f5296d28462eafbf6de81b1/matplotlib/matplotlib/issues/29741 |
| og:image:alt | Bug summary On macOS I am failing to build Matplotlib from source, because the c++ compiler cannot find Pybind11 headers. I've followed instructions at https://matplotlib.org/devdocs/devel/developm... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dstansby |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width