-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Title: T8_CMESH_CAD_EDGE_ATTRIBUTE_KEY / T8_CMESH_CAD_FACE_ATTRIBUTE_KEY not exposed in any public header
Labels: bug, install, build
Description
After installing t8code to a prefix, it is impossible to use CAD geometries in downstream projects because required constants are trapped in an uninstalled internal header. This bug was encountered while building the tutorial t8_features_curved_meshes.cxx. This issue was likely introduced by the file reorganization in #1986.
File: src/t8_cmesh/t8_cmesh_internal/t8_cmesh_types.h, lines 63–65
Problem: The constants T8_CMESH_CAD_EDGE_ATTRIBUTE_KEY and T8_CMESH_CAD_FACE_ATTRIBUTE_KEY are defined only in t8_cmesh_internal/t8_cmesh_types.h, which is intentionally excluded from installation. However, these constants are part of the public API. They are needed by user code that queries which CAD geometries are linked to cmesh tree faces/edges.
The tutorial itself currently includes the internal header directly, which only works when building from within the source tree, not against the installed library.
Prerequisite Note: Fixing the other issue I posted regarding t8_geometry_cad.hxx including internal headers is arguably a prerequisite for this fix, as both require moving these constants to a public location.
Suggested Fix:
Move or copy the T8_CMESH_CAD_*_ATTRIBUTE_KEY defines into a public installed header. The natural home seems to be t8_cmesh/t8_cmesh_cad.hxx.
Impact:
Makes it impossible to build any project that uses the CAD geometry feature against an installed copy of t8code.
Environment:
OS: Ubuntu 24.04
Compiler: g++/gcc 14.3.0 (Ubuntu 14.3.0-12ubuntu1~24~ppa1)
MPI version: OpenMPI 5.0.8
t8code commit hash: f878a8e7d9f70097f74b7ec6d68953f81979ccbf
CMake options:
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_INSTALL_PREFIX=/home/sam/.local/t8code \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_C_STANDARD=17 \
-DCMAKE_CXX_EXTENSIONS=OFF \
-DT8CODE_ENABLE_VTK=ON \
-DT8CODE_BUILD_AS_SHARED_LIBRARY=ON \
-DMPI_HEADER_FOUND=TRUE \
-DT8CODE_ENABLE_OCC=ON
Estimated priority: High. Should be solved as soon as possible.
Additional context:
Reproduced while building tutorials/features/t8_features_curved_meshes.cxx against the installed headers.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status