forked from AquaticEcoDynamics/GLM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Macintosh
More file actions
53 lines (36 loc) · 1.94 KB
/
README.Macintosh
File metadata and controls
53 lines (36 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Building n on macOS-X requires :
1) XCode - available through the App Store
NB you will also need the commandline tools for XCode
xcode-select --install
2) There are various 3rd party libraries required - fortunately someone else has done the
hard work of porting them. There are several options, we have only looked at
MacPorts and Homebrew which seem to be amongst the most popular. If you don't
already have a collection, look at :
Homebrew : http://brew.sh/
3) If you want to use gfortran, make sure you have at least version 8.2.
brew install gcc
4) You will need netcdf - this is available from Homebrew :
brew install netcdf
5) To build the GUI you will need libgd - this is available through Homebrew
brew install gd
6) To build a version including FABM you will need cmake, both brew and port seem to include it
in their compiler bundles, but in case they don't :
brew install cmake
Note:
cmake attempts to verify that compiles actually work, unfortunately it
attempts to build an executable test program by linking to libgcc_s.dylib.
This file doesn't exist on the mac, normally it would be a link to libgcc_s.1.dylib.
My workaround for this is to add a symlink in the fortran library directory :
cd /opt/intel/lib
sudo ln -s /usr/lib/libgcc_s.1.dylib libgcc_s.dylib
Note:
GLM source includes a script - "macpkg.sh" to include non-standard libraries
into the glm.app binary.
Note:
GLM requires gfortran v8 or later in order to build correctly - previous versions of gfortran
had a bug in the C compatibility that prevented correct compilation.
Note:
If you have upgraded Xcode you might need to make it use the right version :
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
and you may need to upgrade the commandLine tools too :
sudo xcode-select --install