After several days of struggling to install hyprcoloc on my Macbook, I finally find out why it cannot be installed normally. It turns out that MacOS does not include default libraries for r-package compilation. You need to manually install X-code for it, and for more complex packages (like this one), the GNU Fortran compiler (https://mac.r-project.org/tools/) is also required!
Here is the warpped up solution for installing hyprcoloc.
Note that your gcc version could be different from my case, so make sure to change it correctly.
Step 3: Then, install the RcppEigen (version 0.3.3.9.3) manually or as instructed by the main page. In my case, I installed it manually.
RcppEigen_0.3.3.9.3.tar.gz
install.packages("~/Documents/tmp/RcppEigen_0.3.3.9.3.tar.gz", repos = NULL, type = "source")
# Then finally is successfully installed it! Congrats!
install_github("cnfoley/hyprcoloc", build_opts = c("--resave-data", "--no-manual"), build_vignettes = TRUE)
After several days of struggling to install hyprcoloc on my Macbook, I finally find out why it cannot be installed normally. It turns out that MacOS does not include default libraries for r-package compilation. You need to manually install X-code for it, and for more complex packages (like this one), the GNU Fortran compiler (https://mac.r-project.org/tools/) is also required!
Here is the warpped up solution for installing hyprcoloc.
Step 1: (Ref: https://zhuanlan.zhihu.com/p/111748325)
if necessary, create a directory for R to know where the
gfortran
are at. In my case,Step 2: add gfortran also to your
Makevars
file. (Ref: https://github.com/xzhoulab/SPARK/issues/12)Then add this to it
Note that your gcc version could be different from my case, so make sure to change it correctly.
Step 3: Then, install the RcppEigen (version 0.3.3.9.3) manually or as instructed by the main page. In my case, I installed it manually. RcppEigen_0.3.3.9.3.tar.gz