Skip to content

Treat ctlgeom-types.h and geom-ctl-io.c as checked-in, not BUILT_SOURCES#87

Closed
Luochenghuang wants to merge 2 commits into
NanoComp:masterfrom
Luochenghuang:fix-ctlgeom-types-not-built
Closed

Treat ctlgeom-types.h and geom-ctl-io.c as checked-in, not BUILT_SOURCES#87
Luochenghuang wants to merge 2 commits into
NanoComp:masterfrom
Luochenghuang:fix-ctlgeom-types-not-built

Conversation

@Luochenghuang
Copy link
Copy Markdown
Contributor

@Luochenghuang Luochenghuang commented May 30, 2026

Fixes the unknown type name 'mesh_bvh_node' build failure when CI (or any from-git build with Guile installed) clobbers the committed ctlgeom-types.h via the BUILT_SOURCES regen rule.

PR #74 hand-extended ctlgeom-types.h and geom-ctl-io.c with mesh internals that don't have Scheme analogs (mesh_bvh_node, face_normals, bvh, is_closed, ...), but Makefile.am still treats both files as generated. Any build with Guile detected runs the regen rule, rewrites the files from geom.scm, and loses the internals.

This commit formalizes what PR #74 actually intended, as both files are hand-maintained: dropped from BUILT_SOURCES, regen rules deleted, ctlgeom-types.h moved to include_HEADERS, both added to EXTRA_DIST, removed from clean-local. 5 meaningful lines of Makefile.am, zero C source changes.

Trade-off: future additions to public scheme classes in geom.scm now need manual mirroring in ctlgeom-types.h and geom-ctl-io.c.

The architecturally clean long-term fix is a PIMPL split, public mesh struct exposes scheme-visible fields plus an opaque void *internal, with mesh_bvh_node and the cache in a separate private header. See this branch.

Closes #86

Luochenghuang and others added 2 commits May 29, 2026 23:00
PR NanoComp#74 (mesh geometry import) hand-extended utils/ctlgeom-types.h with C-only mesh internals (mesh_bvh_node, face_normals, bvh, is_closed, etc.) that don't have Scheme analogs in geom.scm, and committed the matching deep-copy code in utils/geom-ctl-io.c. But Makefile.am still classified both files as BUILT_SOURCES with regen rules that run when configure detects Guile. The regen rewrites both files from geom.scm, which knows nothing about the rich mesh fields — result: compilation fails with 'unknown type name mesh_bvh_node'. Travis didn't catch this because its Guile detection was already broken on modern distros; the new GitHub Actions CI installs guile-3.0-dev and trips it immediately.

This commit formalizes PR NanoComp#74's actual intent: both files are hand-maintained, not generated. Removes them from BUILT_SOURCES, deletes their regen rules, moves ctlgeom-types.h to include_HEADERS, adds both to EXTRA_DIST, drops them from clean-local.

Trade-off: future additions to public scheme classes in geom.scm now need manual mirroring in ctlgeom-types.h and geom-ctl-io.c. Matches the de facto practice since PR NanoComp#74.

Verified locally: build clean, 'make check' passes with 0 failures in test-mesh (including test_cube_vs_block, test_cube_segments_vs_block, test_copy_destroy, and all closure-validation cases) and test-prism.
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.

compilation failre with new mesh feature

1 participant