code-saturne / code-saturne/code_saturne

macOS requires setting of RPATH in executable solver

Ouverte
#142 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C++
Étoiles
307
Forks
102
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

On macOS, and I suppose other BSD systems, one has to specify the `RPATH` for any third-party library used during the building of the solver because these libraries may be installed in various non-standard locations e.g. when using the Spack package manager to build the third-party libraries for `code_saturne`. In order to make this work I modified file `python/code_saturne/base/cs_case_domain.py` so that after the building of the solver is completed the code calls the `install_name_tool `utility that macOS has to add the required RPATHs to the executable.

The modification is changing the code starting from line 1007 checking if the platform is macOS and then calling this utility for each library path needed (only unique values should be used).

The modified file is attached to this issue report and it works properly on my system.

[cs_case_domain.py.zip](https://github.com/user-attachments/files/18508964/cs_case_domain.py.zip)

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez dans python/code_saturne/base/cs_case_domain.py vers la ligne 1007, où la construction du solver s’achève. Examinez la modification jointe et l’utilitaire install_name_tool de macOS, notamment la façon dont les chemins des bibliothèques nécessaires sont collectés et dédupliqués. Le travail est terminé lorsque le solver construit possède les RPATHs requis pour les bibliothèques tierces installées dans des emplacements non standard sur macOS.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
macos, python
Domaine
build-system
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.