Skip to content

cvcGL: don't use M_PI in lsystem_nodes.cpp (fixes Windows cvcgl package build) - #582

Merged
transfix merged 1 commit into
masterfrom
fix/cvcgl-lsystem-m-pi
Oct 8, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/cvcgl-lsystem-m-pi

Conversation

@transfix

@transfix transfix commented Oct 8, 2026

Copy link
Copy Markdown
Owner

The v3.5.0 publish-cvcpkg run failed to build the cvcgl package on Windows (run 37700967627, job build (release, 311, windows-2022, windows, x86_64)):

src\cvcGL\ariadne\lsystem_nodes.cpp(482,29): error C2065: 'M_PI': undeclared identifier

libcvc's top-level CMake adds _USE_MATH_DEFINES for MSVC, but the standalone cvcgl package build doesn't inherit it. sunDir() (added in #563) is the only use of M_PI in cvcGL library code. This switches it to a local constexpr double kPi, the same convention as src/cvcGL/LodGraphicsNode.cpp. The value is the same double, so output is unchanged.

src/cvc/lsys also uses M_PI, but it is built inside libcvc, which gets the define. libcvc's Windows package built and published fine in the same run.

clang-format (changed lines) is clean. After this merges, cvcgl for Windows needs a publish-cvcpkg dispatch to get onto cvcpkg.org.

The standalone cvcgl package build (cvcpkg recipe) doesn't inherit libcvc's
top-level MSVC _USE_MATH_DEFINES, so M_PI is undeclared there and the v3.5.0
publish-cvcpkg Windows cvcgl build failed (C2065 at sunDir). Use a local
constexpr kPi like LodGraphicsNode.cpp; same double value, same output.
@transfix
transfix merged commit 188489b into master Oct 8, 2026
14 checks passed
@transfix
transfix deleted the fix/cvcgl-lsystem-m-pi branch October 8, 2026 01:10
transfix added a commit that referenced this pull request Oct 9, 2026
Patch release carrying the fixes since 3.5.0: the cvcGL M_PI build fix
(#582), CameraController Map mode holding its pose (#584), the tag-release /
publish workflow fixes (#585, #586), macro-safe public headers after
<signal.h> / <sys/param.h> (#588), and the X11 `None` renames (#589:
ariadne::BorderShow::None -> Off, gl::Switch::None -> Off). Bumps
project(VERSION) 3.5.0 -> 3.5.1 and every cvcpkg recipe's upstream_version to
match (cvc_revision stays 1, per the recipe-version gate).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant