lczech / genesis

A library for working with phylogenetic and population genetic data.
http://genesis-lib.org/
GNU General Public License v3.0
57 stars 12 forks source link

Apple M1 compile and related fixes #7

Closed pierrebarbera closed 2 years ago

pierrebarbera commented 2 years ago

Changes:

Known issues: In my environment (Appleclang 13.0.0 + homebrew libomp), the compile causes a segfault in clang. I narrowed it down to the use of #pragma omp critical in rf.cpp. It seems to be a known issue: https://github.com/llvm/llvm-project/issues/52714 I made sure to check that homebrew's libomp is compatible with ARM64, which appears to be the case:

==> Pouring libomp--13.0.0.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libomp/13.0.0: 9 files, 1.6MB

In fact it's the omp lib from llvm themselves, and the version suggests its the correct one for the clang version.

Everything compiles fine under GCC/G++