Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix(assembler): build FCL + collision shim as C++17 for Eigen aligned-new

Sidwebworksf4111f4ecb13
diff --git a/apps/assembler/Dockerfile b/apps/assembler/Dockerfile
index 3f24a028fd..5f36a0089a 100644
--- a/apps/assembler/Dockerfile
+++ b/apps/assembler/Dockerfile
@@ -53,6 +53,7 @@ RUN MARCH="${MARCH:-$( [ "$TARGETARCH" = arm64 ] && echo armv8.2-a || echo x86-6
-DCMAKE_INSTALL_PREFIX=/opt/fcl -DCMAKE_PREFIX_PATH=/opt/fcl \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=${MARCH}" \
+ -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON \
-DFCL_STATIC_LIBRARY=ON -DFCL_WITH_OCTOMAP=OFF -DFCL_BUILD_TESTS=OFF \
&& cmake --build /fcl/b --target install
diff --git a/crates/collision/build.rs b/crates/collision/build.rs
index a2be28f94e..0301d63fbf 100644
--- a/crates/collision/build.rs
+++ b/crates/collision/build.rs
@@ -39,7 +39,13 @@ fn main() {
let mut build = cxx_build::bridge("src/lib.rs");
build
.file("src/shim.cc")
- .std("c++14")
+ // C++17 is load-bearing on x86: with AVX (x86-64-v3 below) Eigen's
+ // fixed-size types are alignas(32), and pre-17 `new` ignores
+ // over-alignment — heap-allocated FCL structures then trip Eigen's
+ // "data is not aligned" assert (SIGABRT in prod Lambda). C++17
+ // aligned-new allocates them correctly; the FCL .a is built C++17 in
+ // the Dockerfile for the same reason.
+ .std("c++17")
.include(format!("{fcl}/include"))
.include(format!("{ccd}/include"))
.include(format!("{eigen}/include/eigen3"))