Comments (4)
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.
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.
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.
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:
- the
locate libgom.1.dylib
command did not work for me instead I usedmdfind -name libgomp.1.dylib
- 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
- installed a new version of gfortran for Mac from https://mac.r-project.org/tools/
remove.packages("Matrix)
,remove.packages("TMB)
,remove.packages("aniMotum)
to clear all previous installs of aniMotum and its dependencies- re-installed Matrix and TMB with sources
install.packages("Matrix", type = "source")
andinstall.packages("TMB", type = "source")
- 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)
library(aniMotum)
- tested it out by querying the help to confirm successful install and attachment
?fit_ssm
Thanks so much!
from animotum.
Related Issues (20)
- pDHess in fit object sometimes returns as named list
- plot returns error without advice HOT 1
- optimiser crashes occasionally when `time.step = NA` and `model = "crw"`
- Error ellipses around mapped estimated locations HOT 2
- generic plotting/mapping functions for fit_mpm objects HOT 1
- fmap() not working on a single individual. HOT 2
- Allow non POSIX date sequences HOT 1
- Error when running fit_ssm HOT 1
- Can't load foieGras after R update to 4.1.0 HOT 3
- Failing to fit jmpm model HOT 11
- Coastline Not Mapping in fmap HOT 1
- unknown error code when fitting SSM HOT 5
- Error in FUN(X[[i]], ...) : !anyNA(x) is not TRUE HOT 2
- Addressing data gaps HOT 1
- Error loading `foieGras` for M1/M2 chip macs HOT 2
- min.dt likely not working as intended HOT 13
- map fit_ssm HOT 1
- when none of the input locations from any of the tracks are on land, route_path fails HOT 1
- Package `foieGras` archived on CRAN and will be removed from the Tracking CTV HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from animotum.