GithubHelp home page GithubHelp logo

Comments (4)

ianjonsen avatar ianjonsen commented on June 16, 2024

Hi,

The error msg implies that you don’t have the Arm64 version of the Gnu Fortran compiler installed, or it’s installed in a nonstandard location. You can download a Mac M1/M2 version from here https://github.com/fxcoudert/gfortran-for-macOS/releases - you'll need to download & install the version that matches your MacOS version, which on an M2 MBP, currently, should be 13.x (Ventura).

Ian

from animotum.

stabdelraheem avatar stabdelraheem commented on June 16, 2024

Hi,

Thank you for your response and solutions! I tried using the gcc version in the GitHub repo you linked above but encountered the same error. I also installed gcc using Homebrew brew install gcc and was alerted that it's already up to date and installed on my machine. The latest error I get when I try to library(aniMotum) is the following:

Error: package or namespace load failed for ‘aniMotum’ 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: <B51A8EC6-9771-364E-92F3-500E0B19F3DC> /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) In addition: Warning message: In checkMatrixPackageVersion() : Package version inconsistency detected. TMB was built with Matrix version 1.5.3 Current Matrix version is 1.5.1 Please re-install 'TMB' from source using install.packages('TMB', type = 'source') or ask CRAN for a binary version of 'TMB' matching CRAN's 'Matrix' package

I appreciate all of your time and suggestions. Thank you!

from animotum.

ianjonsen avatar ianjonsen commented on June 16, 2024

Ok then I think you may need to create a link to the libgomp.1.dylib file and put it in one of the locations R is expecting. You can do this from the terminal by first finding where libgomp.1.dylib is located on your Mac:

locate libgomp.1.dylib

If the gcc compiler was successfully installed then you'll get one or more paths listed. Try the first one and create a link using ln:

ln path_to_libgomp.1.dylib_on_your_mac /opt/R/arm64/gfortran/lib/libgomp.1.dylib

You can check that the link was created by typing ls /opt/R/arm64/gfortran/lib/libgomp.1.dylib

The second issue in your error msgs indicates that you've got a new version of the Matrix pkg but TMB needs the previous version. This is a royal pain (!) but can be fixed by deleting the TMB pkg and reinstalling from source so that it builds against the new Matrix pkg. As the error msg indicates, you can do this by typing: install.packages('TMB', type = 'source').

from animotum.

stabdelraheem avatar stabdelraheem commented on June 16, 2024

Thanks it was a long-winded solution but here's what we did to get aniMotum successfully installed and libraried. We had to create the gfortran/lib folders first in the path /opt/R/arm64 as that was not present prior to this issue for some reason? Then we did the following steps to get everything up and running:

  1. the locate libgom.1.dylib command did not work for me instead I used mdfind -name libgomp.1.dylib
  2. then we were able to create the link based on your previous suggestion using
    ln path_to_libgomp.1.dylib_on_your_mac /opt/R/arm64/gfortran/lib/libgomp.1.dylib
  3. installed a new version of gfortran for Mac from https://mac.r-project.org/tools/
  4. remove.packages("Matrix), remove.packages("TMB), remove.packages("aniMotum) to clear all previous installs of aniMotum and its dependencies
  5. re-installed Matrix and TMB with sources install.packages("Matrix", type = "source") and install.packages("TMB", type = "source")
  6. re-installed aniMotum from r-uinverse documentation you have online via the following command
    install.packages("aniMotum", repos = c("https://cloud.r-project.org", "https://ianjonsen.r-universe.dev"), dependencies = TRUE)
  7. library(aniMotum)
  8. tested it out by querying the help to confirm successful install and attachment ?fit_ssm

Thanks so much!

from animotum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.