code-saturne / code_saturne

code_saturne public mirror
https://www.code-saturne.org
GNU General Public License v2.0
215 stars 80 forks source link

Invalid linker flags for darwin #123

Closed paspro closed 9 months ago

paspro commented 9 months ago

In macOS 14.0 (Sonora) and the system's linker (ld) has changed.

In file cs_link_library.py the code between lines 233 and 241 adds the linker flags:

-soname
-whole-archive
-no-whole-archive

which are invalid for the macOS/Darwin linker causing it to fail.

YvanFournier commented 9 months ago

Hello,

Could you test with the attached file ? (renamed to .txt as GitHub does not directly accept .py file uploads).

cs_link_library.py.txt

Actually, Darwin numbers seem different from Mac OS versions, the "14" may need to be replaced by a higher number, based on what plarform.release() indicates on your machine (under Python).

We can iterate based on this.

paspro commented 9 months ago

The plarform.release() on Python gives "23.0.0". macOS 14.0 is indeed running on Darwin 23.0.0. I modified the file you sent me with 23 and it works fine.

YvanFournier commented 9 months ago

Hoping my update is the same, we can close this issue.