code-saturne / code-saturne/code_saturne
macOS requires setting of RPATH in executable solver
- Ngôn ngữ chính
- C++
- Star
- 307
- Fork
- 102
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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)
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu trong python/code_saturne/base/cs_case_domain.py, quanh dòng 1007, nơi quá trình build solver hoàn tất. Xem xét thay đổi đính kèm và tiện ích install_name_tool của macOS, bao gồm cách các đường dẫn thư viện cần thiết được thu thập và loại bỏ trùng lặp. Công việc được xem là hoàn tất khi solver đã build có các RPATHs cần thiết cho các thư viện bên thứ ba được cài đặt tại những vị trí không chuẩn trên macOS.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- macos, python
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100