From b0cf1712640bcbf9ec1e411613946c987a438fd9 Mon Sep 17 00:00:00 2001 From: Louis AUTHIE <65625876+LouisAUTHIE@users.noreply.github.com> Date: Sat, 6 Jul 2024 23:13:59 +0200 Subject: [PATCH] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index fd38561..2929e7c 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,15 @@ Install the Tensor extension via [PECL](https://pecl.php.net/package/Tensor): ```sh $ pecl install tensor ``` +Compiling on MacOS : +To avoid some errors on Mac devices using homebrew, don't forget to add environment variables: +```sh +export LDFLAGS="-L$(brew --prefix openblas)/lib -L$(brew --prefix pcre2)/lib -L$(brew --prefix gcc)/lib/gcc/current" +export CPPFLAGS="-I$(brew --prefix openblas)/include -I$(brew --prefix pcre2)/include -I$(brew --prefix gcc)/include" +export PKG_CONFIG_PATH="$(brew --prefix openblas)/lib/pkgconfig:$(brew --prefix pcre2)/lib/pkgconfig:$(brew --prefix gcc)/lib/pkgconfig" +export PATH="$(brew --prefix gcc)/bin:$PATH" +export FC=$(brew --prefix gcc)/bin/gfortran +``` > **Note:** If both the library and extension are installed, the extension will take precedence.