ahmohamed / lipidr

Data Mining and Analysis of Lipidomics datasets in R
https://www.lipidr.org/
Other
27 stars 13 forks source link

Problem when loading the lipidr library #50

Closed biga94 closed 1 year ago

biga94 commented 1 year ago

Hey there,

Everytime I try to load the psckage, dependencies seems to be loaded correctly, but then this happens:

Error: package or namespace load failed for ‘lipidr’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/gmm/libs/gmm.so': dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/gmm/libs/gmm.so, 0x0006): Library not loaded: /opt/R/arm64/gfortran/lib/libgomp.1.dylib Referenced from: <47242657-5A5D-3982-936B-398527D642B4> /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/gmm/libs/gmm.so Reason: tried: '/opt/R/arm64/gfortran/lib/libgomp.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/R/arm64/gfortran/lib/libgomp.1.dylib' (no such file), '/opt/R/arm64/gfortran/lib/libgomp.1.dylib' (no such file), '/usr/local/lib/libgomp.1.dylib' (no such file), '/usr/lib/libgomp.1.dylib' (no such file, not in dyld cache)

Do you have any suggestion to overcome this problem? I'm using a MacBook Pro 16" M1 Max running macOS 13.3 with R 4.2.3

Best regards, Davide

ahmohamed commented 1 year ago

You need to install fortran. Please refer #29 for details.

biga94 commented 1 year ago

Thank you, that was the problem!

As far as I'm concerned, it hasn't been so easy, so I'll report the steps that worked in my case:

  1. I've downloaded the universal binaries from this link
  2. I've unzipped the .tar.xz and moved the gfortran folder (which is a subdirectory of opt extracted) to /opt/R/arm64/
  3. Moved the content of /opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0 (which is the specific compiler for ARM) up to /opt/R/arm64/gfortran/lib/
  4. Restarted R session

And worked like charm, without any other error.

Thanks again, @ahmohamed

Best, Davide