KlausVigo / phangorn

Phylogenetic analysis in R
http://klausvigo.github.io/phangorn/
204 stars 38 forks source link

libgfortran issues #178

Open mretier opened 3 weeks ago

mretier commented 3 weeks ago

Hi, I'd like to use phangorn but fail to get it to work on my system:

Environment yaml:

name: test
channels:
  - conda-forge
  - bioconda
dependencies:
  - conda-forge::r-ape
  - bioconda::r-phangorn
  - r::r-codetools

Installation works fine but when I open R and want to load the module using library(phangorn) I get the following error message:

> library(phangorn)
Lade nötiges Paket: ape
Fehler: package or namespace load failed for ‘phangorn’ in dyn.load(file, DLLpath = DLLpath, ...):
 kann shared object '/Users/user/miniforge3/envs/test/lib/R/library/phangorn/libs/phangorn.so' nicht laden:
  dlopen(/Users/user/miniforge3/envs/test/lib/R/library/phangorn/libs/phangorn.so, 0x0006): Library not loaded: @rpath/libgfortran.3.dylib
  Referenced from: <3DB1D09A-9FF9-358C-9565-CEEE4A163666> /Users/user/miniforge3/envs/test/lib/R/library/phangorn/libs/phangorn.so
  Reason: tried: '/Users/user/miniforge3/envs/test/lib/libgfortran.3.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/user/miniforge3/envs/test/lib/libgfortran.3.dylib' (no such file), '/Users/user/miniforge3/envs/test/lib/R/library/phangorn/libs/../../../../libgfortran.3.dylib' (no such file), '/Users/user/miniforge3/envs/test/lib/libgfortran.3.dylib' (no such file), '/System/Volumes/Preboot

When I check the mamba environment folder I find a file called libgfortran.4.dylib but not libgfortran.3.dylib. I can't seem to find a way to get the latter.

How could this be resolved?

Thanks for the input!

KlausVigo commented 3 weeks ago

Dear @mretier,

this seems to be a problem with mamba / conda and less with phangorn itself. I don't really know about mamba, so I can' t comment what's wrong with the yaml file. Maybe you give install.packages to install the package directly from CRAN or `install.packages('phangorn', repos = c('https://klausvigo.r-universe.dev', 'https://cloud.r-project.org')) to install a binary for the development version a try. This usually seem to work quite well.

Kind regards, Klaus