From 6c31016acfbc54d3714b8efa349c74472b5160b0 Mon Sep 17 00:00:00 2001 From: Bingchen Gong <6704443+Wenri@users.noreply.github.com> Date: Tue, 23 Jun 2026 14:57:27 +0200 Subject: [PATCH 1/3] Fix manifold target_compile_options passing CMAKE_CXX_FLAGS as one arg target_compile_options() treats each argument as a single compiler option, so "${CMAKE_CXX_FLAGS} -DWITH_OMP" is handed to the compiler as one bogus argument. When CMAKE_CXX_FLAGS is non-empty (e.g. conda's compilers export CXXFLAGS="-fvisibility-inlines-hidden -march=nocona ...") the manifold build fails with: g++: error: unrecognized command-line option '-fvisibility-inlines-hidden -fmessage-length=0 ... -DWITH_OMP ' CMAKE_CXX_FLAGS is already applied to every target by CMake, so re-injecting it via target_compile_options is both redundant and broken. Pass the manifold-specific flags unquoted as separate options instead. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 729384b..8817b45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,9 +83,9 @@ set_target_properties(manifold PROPERTIES LINKER_LANGUAGE CXX) target_include_directories(manifold PUBLIC ${MANIFOLD_SRC_DIR}) target_include_directories(manifold PRIVATE ${EXTERNAL_DEP_DIR}/manifold/3rd) if (CMAKE_BUILD_TYPE STREQUAL "Debug") - target_compile_options(manifold PRIVATE "${CMAKE_CXX_FLAGS} -Wall -pthread -DWITH_OMP -Wno-int-in-bool-context -Wsign-compare -fsanitize=address") + target_compile_options(manifold PRIVATE -Wall -pthread -DWITH_OMP -Wno-int-in-bool-context -Wsign-compare -fsanitize=address) else() - target_compile_options(manifold PRIVATE "${CMAKE_CXX_FLAGS} -DWITH_OMP ") + target_compile_options(manifold PRIVATE -DWITH_OMP) endif() From 9c961957bcc82f4e825de55da8519587bb884f15 Mon Sep 17 00:00:00 2001 From: Bingchen Gong <6704443+Wenri@users.noreply.github.com> Date: Tue, 23 Jun 2026 15:01:00 +0200 Subject: [PATCH 2/3] Pin build-time CMake < 4 The numpyeigen dependency fetched at configure time declares cmake_minimum_required below 3.5, support for which CMake 4 removed (hard error). Constrain the build-system requirement so an isolated build resolves a 3.x CMake that still accepts those projects. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index caa7584..a1a499a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools>=42", "wheel", "scipy", "numpy", "cmake>=3.2"] +requires = ["setuptools>=42", "wheel", "scipy", "numpy", "cmake>=3.2,<4"] build-backend = "setuptools.build_meta" From a4242b226491a35b81fee96a82fb80126442c060 Mon Sep 17 00:00:00 2001 From: Bingchen Gong <6704443+Wenri@users.noreply.github.com> Date: Tue, 23 Jun 2026 15:12:04 +0200 Subject: [PATCH 3/3] Use pybind11 dtype::itemsize() instead of removed elsize() pybind11::dtype::elsize() is not present in current pybind11 (required for Python 3.14 / NumPy 2 support); the equivalent accessor is itemsize(). Fixes the meshio build: ply_loader.h:77: error: 'class pybind11::dtype' has no member named 'elsize'; did you mean 'itemsize'? --- src/common/ply_loader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ply_loader.h b/src/common/ply_loader.h index 765f806..dafacd3 100644 --- a/src/common/ply_loader.h +++ b/src/common/ply_loader.h @@ -74,7 +74,7 @@ pybind11::array ply_data_to_array(std::shared_ptr attrib) { if (attrib->count == 0) { return pybind11::array(attrib_dtype, std::vector({0, 0})); } - size_t bytes_per_scalar = attrib_dtype.elsize(); + size_t bytes_per_scalar = attrib_dtype.itemsize(); if (bytes_per_scalar <= 0) { throw std::runtime_error("Internal PLY loading error. Type has no defined byte size."); }