Skip to content

Commit 68650e6

Browse files
committed
Fix GCC 14 / pybind11 build failure on manylinux_2_28
CMake 3.28+ with GCC 14 enables C++20 module TS scanning (-fmodules-ts), which breaks pybind11 v2.13.1 typing.h: std::copy_n is not found under strict module isolation. Two fixes: - CMAKE_CXX_SCAN_FOR_MODULES OFF to suppress the -fmodules-ts flag - pybind11 v2.13.1 → v2.13.6 which adds the missing #include <algorithm> This unblocks the linux wheel build after the cibuildwheel v3.4.1 upgrade.
1 parent a45c187 commit 68650e6

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ project(midigpt VERSION 0.1.0 LANGUAGES CXX)
33
set(CMAKE_CXX_STANDARD 20)
44
set(CMAKE_CXX_STANDARD_REQUIRED ON)
55
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
6+
# Disable C++20 module scanning — prevents GCC 14 from adding -fmodules-ts,
7+
# which breaks pybind11 typing.h (std::copy_n not found under strict module TS).
8+
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
69

710
include(cmake/dependencies.cmake)
811

cmake/dependencies.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include(FetchContent)
22

33
FetchContent_Declare(pybind11
44
GIT_REPOSITORY https://github.com/pybind/pybind11.git
5-
GIT_TAG v2.13.1)
5+
GIT_TAG v2.13.6)
66
FetchContent_MakeAvailable(pybind11)
77

88
FetchContent_Declare(symusic

0 commit comments

Comments
 (0)