-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathINSTALL.txt
165 lines (123 loc) · 4.34 KB
/
INSTALL.txt
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
The following are personal instructions for installing the JH version of Sferes with the help of homebrew.
=========
Depencies
=========
- boost (tested with boost-1.63.0, boost-1.58.0, boost-1.60.0, and boost-1.61.0)
- eigen3 (tested with eigen-3.3.2, eigen-3.2.2 or below fails)
- bullet (tested with bullet-2.86.1)
- OpenGL
- GLUT (tested with freeglut-3.0.0)
- freetype2 (tested with freetype-2.7.1)
- sdl (tested with sdl-1.2.15)
- gsl (tested with gsl-2.3)
- tbb (optional, tested with tbb-4.4-20161128)
- mpi (optional: provide --no-mpi to build without mpi, tested with open-mpi-2.0.2)
- boost-mpi (optional: provide --no-mpi to build without mpi, tested with boost-mpi-1.63.0)
- cmake (to install pngwriter, tested with version 3.13.4)
- pngwriter (https://github.com/pngwriter/pngwriter)
-------------------------------------
Installing dependencies with Homebrew
-------------------------------------
Before installing Sferes, first install the following dependencies:
brew install boost
brew install eigen
brew install bullet
brew install freeglut
brew install freetype
brew install sdl
brew install gsl
brew install tbb
brew install open-mpi
brew install boost-mpi
In addition, install the Xcode app through the apple-store/software-center, as the Xcode libraries are provided as part of the Xcode app, and are not installed by default.
--------------------------------
Installing dependencies with Apt
--------------------------------
apt update; apt install -y vim git
apt-get update; apt-get install cmake
In one go:
apt-get update
apt-get update; apt-get install apt-utils libopenmpi-dev libeigen3-dev libgsl-dev libtbb-dev cmake
Separate:
apt-get update
apt-get install aptitude # This is to search for the other packages
apt-get install apt-utils # Potentially aids in the installation of other packages
apt-get install libopenmpi-dev
apt-get install libboost-all-dev # Apparently this downloads 1.55, which may be a bit old
# Consider installing boost from source, as this gives you an old version of boost.
apt-get install libeigen3-dev
apt-get install libfreetype6-dev
apt-get install libgsl-dev
apt-get install libtbb-dev
# apt-get install libbullet-dev # This gives you a version of bullet that is too old
# We will have to install this manually
git clone https://github.com/bulletphysics/bullet3.git
mkdir -p bullet3/build_cmake
cd bullet3/build_cmake; cmake -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release ..; make; make install
cd bullet3/build_cmake; make
cd bullet3/build_cmake; make install
# apt install boost-mpi # Think this one is already installed
# Optional:
apt-get install freeglut3-dev
apt-get install libsdl-dev # Can not install, but maybe not that important?
apt-get install libfreetype6-dev
-----------------
Install pngwriter
-----------------
brew install cmake
git clone https://github.com/pngwriter/pngwriter.git
mkdir -p pngwriter-build
cd pngwriter-build
# for own install prefix append: -DCMAKE_INSTALL_PREFIX=$HOME/somepath
cmake ../pngwriter
make -j
# optional
make test
# sudo is only required for system paths
make install
==================
Configuring Sferes
==================
Create a modules.conf file with the following entries:
wafliboptions
bullet
nn2
continue
fastsim2
randmaze
oglft
datatools
modularity
pngwriter
cmoea
nsga3
If compiling without OpenGL, use:
wafliboptions
bullet
nn2
continue
fastsim2
randmaze
datatools
modularity
pthread
cmoea
nsga3
instead.
For boost 1.55, you need to patch the boost filesystem header in ea.hpp as follows:
#define BOOST_NO_CXX11_SCOPED_ENUMS
#include <boost/filesystem.hpp>
#undef BOOST_NO_CXX11_SCOPED_ENUMS
Checkout the necessary git submodules:
git submodule init
git submodule update
./waf configure
./waf build
./waf --exp modularity
===================
Configuring Eclipse
===================
While most of this should work out-of-the-box, there are a couple of potential things that need to be changed:
- The dependencies, includes, and libraries in the main folder may interfere with eclipse. Consider removing them from that folder.
- The bullet headers are included directly, meaning the bullet sub folder, probably /usr/local/include/bullet, needs to be added manually.
- Sferes uses -std=c++11. To set eclipse to also consider c++11, add it as an option under: Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> Provides -> CDT GCC Built-in Compiler Settings.