Skip to content

Bug Report: Broken install headers after PR #1986 file reorganization #2219

@saustinp

Description

@saustinp

Title: t8_helper_functions/ not installed to include path after #1986

Labels: bug, install, build

Description
After installing t8code to a prefix (e.g., cmake --install .), the t8_helper_functions directory is absent from the install tree. Any #include <t8_helper_functions/...> (e.g., in t8_cmesh/t8_cmesh.cxx) fails at compile time for downstream users. This appears to have been introduced by the file reorganization in #1986. I discovered this bug while trying to build the example tutorials/features/t8_features_curved_meshes.cxx.

File: src/CMakeLists.txt, line 241–246

Problem: The t8_helper_functions directory is installed with DESTINATION PRIVATE_HEADER instead of DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}. PRIVATE_HEADER is a CMake keyword for framework private headers and does not install to the include/ directory. Every other subdirectory (e.g., t8_cmesh, t8_data, t8_eclass) correctly uses ${CMAKE_INSTALL_INCLUDEDIR}.

Suggested Fix:
In CMakeLists.txt:

Before (line 242):

install( DIRECTORY t8_helper_functions
DESTINATION PRIVATE_HEADER

After:

install( DIRECTORY t8_helper_functions
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}

Impact:
Makes it impossible to build projects 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=~/.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

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions