SCM

Forum: gecon

Monitor Forum | Start New Thread Start New Thread
RE: How to: install gEcon on Mac OS X [ Reply ]
By: Ruth Fortmann on 2022-07-18 14:39
[forum:49492]

Screenshot 2022-07-11 at 10.17.51.png (5) downloads
Hi there,

Thanks for the detailed instructions. Has anyone managed to install gEcon in the meantime?

I managed to fix the problem Monika and Eduardo mention: I had to explicitly install gcc 9 via homebrew ("brew install gcc@9; default gcc version is now 13) and then use the cat command in the original post. FYI I tried using gcc 13 and gcc 11 with amended cat commands but no luck.

Now I am running into a different compilation error, please see screenshot. Any help would be hugely appreciated!

RE: How to: install gEcon on Mac OS X [ Reply ]
By: Matt Dabrowski on 2021-05-03 14:37
[forum:49480]
I had a similar issue to Eduardo using my Mac. FWIW, here's what one amateur did.

First, note this error:
---
/bin/sh: g++-9: command not found
---
For those who are unfamiliar, this means that the installation is looking for a specific version of gcc, here version 9 ("g++-9").

Fixing this error leads to two changes to the original poster's instructions.

In his instructions' #5, there's a cat command. Without repeating the whole line, consider these two elements in the string:
---
cat ('CXX1X = g++-9\nOBJCXX....
---
-L/Library/Frameworks/R.framework/Versions/3.6/Resources/library
---

In the first, you can see "g++-9", and this version is repeated several times in the full cat string. You can update this to another version of gcc by changing all references (to e.g. "g++-10"), or you can continue using g++-9.

In the second, you need to update that directory for whatever version of R you're running. I'm running 4.0 on the Mac, so the line became:
---
-L/Library/Frameworks/R.framework/Versions/4.0/Resources/library
---

Second, if you want to use g++-9 - i.e., you didn't change the version number in the cat string - run this command in the Terminal:
---
brew install gcc@9
---
This installs version 9. If you decide to use another version of gcc, you may nonetheless want to update your own version. I understand Eduardo updated gcc@10.

After doing this, gEcon installed for me without any trouble.

Hope this helps. Smarter people than myself are welcome to correct the above.

Matt

RE: How to: install gEcon on Mac OS X [ Reply ]
By: Eduardo Sánchez on 2021-03-10 11:09
[forum:48828]

Captura de pantalla 2021-03-10 a las 12.09.16.png (25) downloads
Hello!

I'm experiencing the same problem... could you help me on that providing further instructions on how did you solved the problem?

Many thanks in advance

RE: How to: install gEcon on Mac OS X [ Reply ]
By: Monika Köppl-Turyna on 2020-02-11 10:15
[forum:47935]
Ok, I actually managed to find the problem. My gcc was still pointing to clang. It helped to alias it.

RE: How to: install gEcon on Mac OS X [ Reply ]
By: Monika Köppl-Turyna on 2020-02-11 09:40
[forum:47934]

Bildschirmfoto 2020-02-11 um 10.39.27.png (36) downloads
Hi!
I have tried to install gEcon on Mac OS Catalina and despite changing the Makeconf settings to gcc and following the steps provided it fails to compile. Here a screenshot (as you can see it complies with gcc). Any ideas?

RE: How to: install gEcon on Mac OS X [ Reply ]
By: Karol Podemski on 2019-11-25 20:38
[forum:47183]
Thank you a lot Thore, on behalf of both gEcon users as well as gEcon development team.

Many Mac users asked us for binary or help, now they can build gEcon themselves following your thorough instruction.


How to: install gEcon on Mac OS X [ Reply ]
By: Thore Kockerols on 2019-11-25 14:24
[forum:47182]
Hi,

gEcon does work on mac and you have to compile it using gcc instead of clang. Here is how you can get all the necessary stuff to ultimately succesfuly build it yourself:

1) Install Xcode from the App store (this one is huge)

2) Open Xcode and accept the license agreement

3) Install Xcode Command Line Tools: Open a terminal and type: "xcode-select --install"

4) Install gcc using homebrew
4.1) Install homebrew: see https://brew.sh/
4.2) Install gcc - Open a terminal and type: "brew install gcc" (if he says he doesnt find xcode or such, make sure to abort and open xcode once more and accept any eventual license agreements...)

5) Change compiler to gcc - open R and type in the console:
cat ('CXX1X = g++-9\nOBJCXX = g++-9\nCXX17 = g++-9\nCXX14 = g++-9\nCXX11 = g++-9\nCXX98 = g++-9\nOBJC = gcc-9\nCC = gcc-9\nCXX = g++-9\nF77 = gfortran-9\nFC = gfortran-9\nSHLIB_OPENMP_CFLAGS = -fopenmp\nSHLIB_OPENMP_CXXFLAGS = -fopenmp\nSHLIB_OPENMP_FCFLAGS = -fopenmp\nSHLIB_OPENMP_FFLAGS = -fopenmp\nSHLIB_LIBADD = -L/Library/Frameworks/R.framework/Versions/3.6/Resources/library', file="~/.R/Makevars")

6) Install gEcon - open R and type in the console:
install.packages('http://gecon.r-forge.r-project.org/files/gEcon_1.2.0.tar.gz', type = 'source', repo = NULL)

If he finishes the compiling without Error you are good to go.

Thanks to:
Vienna University of Economics and Business Powered By FusionForge