LAPKB / Pmetrics

https://lapkb.github.io/Pmetrics/
21 stars 8 forks source link

problem installation MacOS #215

Open jbwoillard opened 7 months ago

jbwoillard commented 7 months ago

Hi Julian, I have trouble to install Pmetrics on my new MacBook Pro I installed gFortran and try to install Pmetrics, I have the following error `── R CMD build ─────────────────────────────────────────────────────────────────────────── ✔ checking for file ‘/private/var/folders/m5/9q7ccw491nl307gdl50xlrz40000gp/T/RtmpxLc8oG/remotes80df66127df2/LAPKB-Pmetrics-dc8f519/DESCRIPTION’ ... ─ preparing ‘Pmetrics’: (370ms) ✔ checking DESCRIPTION meta-information ... ─ cleaning src ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories Removed empty directory ‘Pmetrics/inst/Examples/Runs’ ─ building ‘Pmetrics_2.1.1.tar.gz’

Siel commented 7 months ago

Hi @jbwoillard

I actually had exactly the same issue a couple of days ago, it is not gfortran the one that tis failing but the C++ compiler. Apple's Clang seems to be broken since the last update.

What I did to fix it was to force R to use GCC instead of Clang.

To do this, create this file in your system ~/.R/Makevars

Then copy this into that file:

CC=gcc-13
CXX=g++-13

This changes the C and C++ compilers to the GNU ones (like Gfortran).

Hope it works!

Julian