-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instructions for compiler libraries #58
Comments
Install gfortran using:
as gfortran is now rolled into gcc Then:
|
Note:
|
I try to solve the problem on my Monterrey Mac but but I got problems with not finding the library for -lemutls_w |
Does it work without the flags |
Yes, it worked without the flags!! installed!! thanks a lot! |
I am trying to install rsofun on my MacBook with M1 processor and I am getting this error:
I tried first with the solution by @khufkens with the paths corrected by @stineb. Then I also tried the first solution provided by @stineb but I couldn't locate a directory called "Cellar" in /usr/local (I was showing all hidden files). |
@fgiardin verify the path of your brew install. Depending on your setup this might be either global or locally installed. Key is to find out where gfortran lives. |
Yes, I successfully installed it, and in my case the path for gfortran was
/opt/homebrew/bin/gfortran
… On 29 Sep 2022, at 20:18, Koen Hufkens ***@***.***> wrote:
@fgiardin <https://github.com/fgiardin> verify the path of your brew install. Depending on your setup this might be either global or locally installed. Key is to find out where gfortran lives.
—
Reply to this email directly, view it on GitHub <#58 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJC7MAONE6VMNGADYRTZNA3WAXMPHANCNFSM5OLTG5MQ>.
You are receiving this because you commented.
|
If I run "whic fortran" on my terminal I do get: But still no trace of the directory called "Cellar" in /usr/local, and I still get the error mentioned above while installing the package |
Have you already modified the Makeconf as suggested by @stineb with the following? FC = /opt/homebrew/bin/gfortran -mtune=native Though, make sure your version.. my case 12.2.0 but you should check |
After trying several things, what worked for my M1 Mac was to first completely unistall R, Homebrew and libraries. You probably want to back up your HD before doing so. To remove R run in terminal: You can then drag and drop R and RStudio from the applications folder to the trash. To make sure that R has been totally removed, you can manually delete the directory Re-install R and RStudio: https://posit.co/download/rstudio-desktop/ I then followed this guide to correctly install Xcode and gfrotran for Apple silicon Macs. Note that this installation doesn't recommend using Homebrew as it is "by definition incompatible with macOS native libraries and applications". You can now build the rsofun package. Note that some dependencies won't be automatically installed (e.g. BayesianTools). I had to install those directly from github: |
Thanks for the notes @fgiardin ! |
Another small note: I realised that ingestr wasn't running as it needs some external libraries that we normally install through Brew. So I ended up installing Brew (after everything I did in my previous post on this issue) and run on terminal:
Remember to always restart R after installing external libraries. Also: it's risky to install gfortran with Brew too, as you will have two installations at the same time. So I made sure I didn't run |
I got an error when trying to install rsofun on a new machine where I had just installed gfortran using homebrew. The problem was that gfortran libraries could not be located. Here is what I did to resolve the problem. Should we include such instructions in the README?
Should return a path indicating where gfortran is installed.
/usr/local/Cellar
, where you should find a subdirectorygcc
. From there, locate a file namedlib
:This should return the library path. In my case, this was
./11.2.0_3/lib
(full path/usr/local/Cellar/gcc/11.2.0_3/lib
).*.dylib
are located. I didIn my case, this returned
"/Library/Frameworks/R.framework/Resources/etc/Makeconf"
. Open that file and edit the line where the variableFLIBS
is specified, providing the information about the library locations determined under 2. and 3. The edited line now reads:The text was updated successfully, but these errors were encountered: