From f7adbfa2b8ee041a0e6911522c1a040ae0760424 Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Wed, 11 Nov 2026 11:31:31 -0800 Subject: [PATCH] build(python): fix Linux bindings build The Python bindings have failed to build on Linux since the server bindings were added: - The server dependencies (zstd, Capstone, getopt) contain C sources, but only CXX was enabled. Enable C in python/CMakeLists.txt. - An empty CMAKE_INSTALL_BINDIR makes zstd's install() rules fail. Use "." so the client DLL still lands in the wheel root on Windows. - TracyServer is linked into a shared module, which needs position-independent code. Set CMAKE_POSITION_INDEPENDENT_CODE. All changes are inside python/ and only apply when TRACY_CLIENT_PYTHON is ON. Closes #1517 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01LPZxBTTREb1SnkZkapQibr --- python/CMakeLists.txt | 2 ++ python/pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index f9e019b5..48fe52f5 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,4 +1,6 @@ +enable_language(C) set(CMAKE_CXX_STANDARD 20) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) option(EXTERNAL_PYBIND11 "Whether to download pybind11" ON) diff --git a/python/pyproject.toml b/python/pyproject.toml index 0522ea48..855eef9c 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -27,7 +27,7 @@ wheel.packages = ["tracy_client"] [tool.scikit-build.cmake.define] TRACY_CLIENT_PYTHON = "ON" TRACY_STATIC = "OFF" -CMAKE_INSTALL_BINDIR = "" +CMAKE_INSTALL_BINDIR = "." [tool.scikit-build.metadata.version] provider = "scikit_build_core.metadata.regex"