Skip to content

[BUILD] Standardize plugin paths and inject $ORIGIN rpath#497

Merged
zhzhcookie merged 5 commits intomainfrom
fix-cmake-rpath-env
Apr 9, 2026
Merged

[BUILD] Standardize plugin paths and inject $ORIGIN rpath#497
zhzhcookie merged 5 commits intomainfrom
fix-cmake-rpath-env

Conversation

@Stardep-lmc
Copy link
Copy Markdown
Collaborator

The previous CMake configuration used hardcoded absolute paths (e.g., ${Python3_SITELIB}) which caused ModuleNotFoundError in diverse environments like Conda or native Ubuntu. Additionally, the RPATH was lost during the pip install process.

Changes

Path Agnostic: Replaced hardcoded paths with $ENV{HOME}/.flagtree/ for mthreads, iluvatar, and metax.

RPATH Injection: Added CMAKE_BUILD_RPATH "$ORIGIN" in sub-directories and passed it to PARENT_SCOPE. This ensures the shared library can find its dependencies regardless of the installation directory.

Decoupling: Centralized the RPATH logic in backend-specific CMake files to keep the root CMakeLists.txt clean.

@Stardep-lmc Stardep-lmc marked this pull request as ready for review April 9, 2026 07:28
@zhzhcookie zhzhcookie changed the title [BACKEND] Standardize plugin paths and inject $ORIGIN rpath [BUILD] Standardize plugin paths and inject $ORIGIN rpath Apr 9, 2026
@zhzhcookie zhzhcookie merged commit a13acab into main Apr 9, 2026
9 of 11 checks passed
@zhzhcookie zhzhcookie deleted the fix-cmake-rpath-env branch April 9, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants