Skip to content

Commit

Permalink
Update README.md with hints for macOS (#1102)
Browse files Browse the repository at this point in the history
* update README with hints for macOS

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

* extend warning for macOS

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>

---------

Signed-off-by: Marcel Müller <marcel.mueller@thch.uni-bonn.de>
  • Loading branch information
marcelmbn authored Sep 18, 2024
1 parent 1779d8a commit a492d7a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,27 @@ meson setup build --buildtype release --optimization 2 -Dfortran_link_args="-qop
ninja -C build test
```

> [!IMPORTANT]
> Compilation with `meson` on macOS differs slightly from the protocol for Linux-based systems. Different BLAS libraries can lead to deviating results in rare cases – please stick to the following instructions.
<details>
<summary><b>Setting up meson on macOS</b></summary>

#### Compiling with meson on macOS

1. **Use Homebrew for Package Management**: Install dependencies like `gcc`, `gfortran`, and `openblas` using Homebrew.
[Further information](https://brew.sh/) on how to setup `brew`.
Example:
```bash
brew install gcc gfortran openblas
```
2. **meson setup call with appropriate environment variables**: Use the following adapted `meson setup` call to compile `xtb` on macOS. Obviously, the paths to the libraries might differ on your system.
```bash
LDFLAGS="-L/opt/homebrew/opt/openblas/lib" CPPFLAGS="-I/opt/homebrew/opt/openblas/include" FC=gfortran-14 CC=gcc-14 meson setup _build --buildtype release -Dlapack=openblas
```
</details>
<br>

Make sure the testsuite is running without errors.

To install the `xtb` binaries to `/usr/local` use (might require `sudo`)
Expand Down

0 comments on commit a492d7a

Please sign in to comment.