-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDEPS.Linux
185 lines (130 loc) · 8.19 KB
/
DEPS.Linux
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
Dependencies For Linux
Table of Contents
1. Introduction
2. Program and library dependencies
3. Corresponding package dependencies
1. For Ubuntu
1. Ubuntu packages
3. How to install via a GUI (recommended)
4. How to install using the command-line (advanced)
5. A note about the packages for GL and GLU
2. For other Linux variants
Introduction
This page lists the package dependencies which need to be satisfied to be able
to build GPlates from source on Linux.
Below, we list the corresponding Ubuntu packages. Similar packages should
be available on other Linux distributions. Ubuntu 8.04 is the oldest Ubuntu release that
we support; users of older Ubuntu releases may, for some packages, be required
to install and/or compile the dependencies manually.
Program and library dependencies
To compile GPlates, you will need the following programs and libraries
installed:
• cmake (3.5 or newer)
• g++ (4.8.1 or newer, required to support C++11)
• GL library (the OpenGL shared library)
• GLU library (the OpenGL Utility shared library)
• GLEW library (the OpenGL Extension Wrangler Library)
• Python library (version 2 or 3, preferably 3)
• Boost library headers (version 1.35 or newer; the highest version number which has been tested so far is 1.65.)
• Qt library (version 5.6 or newer)
• Geospatial Data Abstraction Library (GDAL) (1.3.2 or newer; GDAL 2 is highly recommended.)
• Computational Geometry Algorithms Library (CGAL) (4.7 or newer; preferably 4.12 or newer for improved CMake support)
• PROJ.4 (4.6.0 or newer)
• Qwt 6.0.1 (6.1.x is recommended)
• zlib
Corresponding package dependencies
For Ubuntu
This subsection provides more specific information on resolving the program and
library dependencies on an Ubuntu system.
(Note that GPlates development at the USyd node occurs on Ubuntu systems, so
the Ubuntu package dependencies will always be the most tested and up-to-date.)
Note that Ubuntu is based upon Debian, so (subject to the availability of the
appropriate versions of packages) these instructions should also work on a
Debian system.
Ubuntu packages
The following packages are not installed by default and may need to be
installed manually:
Program/library Corresponding Ubuntu packages
cmake cmake
g++ g++
GL See note below.
GLU See note below.
GLEW libglew-dev
Python python3-dev python3-numpy
Boost libboost-dev libboost-python-dev libboost-thread-dev libboost-program-options-dev
libboost-test-dev libboost-system-dev (See note below regarding Xenial 16.04 and libboost-python-dev)
Qt qt5-default libqt5opengl5-dev libqt5svg5-dev libqt5xmlpatterns5-dev (starting with Hirsute 21.04 you should exclude qt5-default).
GDAL libgdal-dev (or libgdal1-dev for GDAL1 on older systems)
CGAL libcgal-dev (may also need libcgal-qt5-dev on Xenial 16.04 due to bug in CGAL cmake)
PROJ.4 libproj-dev
Qwt libqwt-qt5-dev
zlib zlib1g-dev
Extras libxrender-dev libice-dev libsm-dev libfreetype6-dev libfontconfig1-dev (Ubuntu 14.04 Trusty Tahr and above)
The command to install the dependencies on Ubuntu is (NOTE: starting with Hirsute 21.04 you should exclude qt5-default from the list below):
sudo apt-get update; sudo apt-get install cmake libglew-dev python3-dev python3-numpy libboost-dev libboost-python-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libboost-system-dev qt5-default libqt5opengl5-dev libqt5svg5-dev libqt5xmlpatterns5-dev libgdal-dev libcgal-dev libproj-dev libqwt-qt5-dev zlib1g-dev libfreetype6-dev libfontconfig1-dev libxrender-dev libice-dev libsm-dev
(For Ubuntu releases before 14.04 Trusty Tahr, the libfreetype6-dev libfontconfig1-dev libxrender-dev libice-dev libsm-dev are not required.)
How to install via a GUI (recommended)
It is recommended that you start the Synaptic Package Manager graphical
application, and resolve the dependencies by simply searching for the required
packages and then selecting them for installation.
How to install using the command-line (advanced)
You can determine whether you have a particular package installed on your
system using the "dpkg-query -l" command, followed by the package name.
For example, to find out whether you have the package "libboost-dev" installed,
you would run the command:
dpkg-query -l libboost-dev
You would then look for a line which looks like:
ii libboost-dev:amd64 1.71.0.0ubuntu2 amd64 Boost C++ Libraries development files (default version)
Look at the first two letters in the line: "ii" tells you that libboost-dev is
currently installed on your system, while "un" or "pn" tell you that
libboost-dev is not currently installed on your system.
If you have determined that libboost-dev is not installed on your system, you
can install it by running the command:
sudo aptitude install libboost-dev
(assuming you have permission to run "sudo aptitude" on your system).
A note about the packages for GL and GLU
There appear to be multiple Debian/Ubuntu packages which fulfil the GL and GLU
library dependencies.
The GL library dependency is fulfilled by:
• xlibmesa-gl + xlibmesa-gl-dev; or
• libgl1-mesa-dri + libgl1-mesa-glx + libgl1-mesa-dev
The GLU library dependency is fulfilled by:
• xlibmesa-glu + xlibmesa-glu-dev; or
• libglu1-mesa + libglu1-mesa-dev
The mixture of packages seems to vary from system to system.
Firstly, whatever the mixture of packages on your system, if it fulfils the
library dependencies, don't change it. ("If it ain't broke, don't fix it.")
If you do need to install an extra package or two to fulfil dependencies, it is
most likely that you are missing a "-dev" package (since the non-dev packages
are used by many other packages, and are probably already on your system). In
that case, you should install the "-dev" package which corresponds to the
non-dev package already on your system. For example, if you already have
"libglu1-mesa" installed, you should install "libglu1-mesa-dev".
If you are also missing a non-dev package, well… time to call the sysadmin.
Note for nvidia card owners: You may find you need to install the
"nvidia-glx-dev" package to fufil the libGL dependency - but installing this
package may remove some mesa related packages. Only attempt this if configure
complains about a missing GL dependency and you are certain you are using the
nvidia binary driver. (If you don't know what this means, don't install
nvidia-glx-dev!)
A note about Boost
When running cmake (see BUILD.Linux) on Xenial 16.04, if you get the error...
Could not find the following Boost libraries:
boost_python3
...then you may need to create the following symbolic link...
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python3.so
A note about GDAL
If you decide to compile GDAL from source then ensure that GDAL links *statically*
to PROJ if the PROJ library is in a non-standard location. This ensures GPlates
does not generate a dynamic library loading error (for PROJ) when a raster with an
inbuilt spatial reference system (eg, a projection) is loaded.
You'll also need to ensure that the NetCDF library is installed and that GDAL is
configured to use it - this is necessary for GPlates to be able to load gridded rasters.
Here are the relevant options for the GDAL 2.x 'configure' script(assuming GDAL dependencies
have been installed in /opt/local/):
configure --with-netcdf=/path/to/netcdf --enable-netcdf4 --with-proj=/path/to/proj --with-threads --disable-static --without-grass --with-libtiff=/opt/local --with-jpeg=/opt/local --with-gif=/opt/local --with-png=/opt/local --with-geotiff=/opt/local --with-sqlite3=/opt/local --with-expat=/opt/local
...where '--enable-netcdf4' enables NetCDF version 4 which may require HDF5 '--with-hdf5=/path/to/hdf5' according to https://trac.osgeo.org/gdal/wiki/NetCDF.
And if using a version of GDAL older than 3.0 then replace '--with-proj=/path/to/proj' with '--with-static-proj4=/path/to/proj4'.
For other Linux variants
There are some sucessful stories about compiling GPlates on other Linux variants, including Fedora, Debian, Redhat
and CentOS.