Skip to content

Commit 0add65b

Browse files
committed
Fix INSTALL.md
1 parent 993a3fc commit 0add65b

File tree

1 file changed

+88
-89
lines changed

1 file changed

+88
-89
lines changed

INSTALL.md

Lines changed: 88 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ General Instructions
66

77
Try, e.g.:
88

9-
cd <working-tree directory>
109
make
1110
./mnl <(echo $'{{extern "manool.org.18/std/0.5/all"} in Out.WriteLine["Hello, world!"]}')
1211

@@ -27,70 +26,70 @@ The section Confirmed Builds provides more specific instructions together with r
2726
+ Decent C99 compiler toolchain with support for some GCC-specific extensions (which includes clang and Intel's icc)
2827
+ Decent C++11 compiler toolchain with support for some GCC-specific extensions (which includes sufficiently recent clang++ and Intel's icpc)
2928
+ Full-blown Linux or FreeBSD target operating system (which includes a sufficiently recent Android with CrystaX NDK)
30-
+ One of the following ISA/ABI targets: x86-64/lp64, i386+sse2/ilp32, x86-64/ilp32, aarch64+el/lp64, armv7l+vfp/ilp32
29+
+ One of the following ISA/ABI targets: x86-64/lp64, i386+sse2/ilp32, x86-64/ilp32, aarch64+el/lp64, armv7+el+vfp/ilp32
3130
+ Sufficiently recent GNU `make` utility
3231
+ POSIX-compliant shell (`sh`) + `mkdir`, `cp`, and `rm`
3332

3433
#### Makefile phony targets
3534

36-
+ `all` (default) --- build MANOOL; the result is placed into the directory `build` and its various subdirectories (created automatically if needed)
37-
+ `run` --- run a short build integrity test; depends on an up-to-date MANOOL build
38-
+ `run-valgrind` --- the same but run the test under Valgrind to look more closely for any build issues
39-
+ `install` --- install MANOOL; depends on an up-to-date MANOOL build
40-
+ `clean` --- clean up the `build` directory
41-
42-
####
43-
44-
+ `CC` --- command to invoke the C compiler; by default: `$(SCL)` `$(GCC)` `$(PIPE)` `-w` `$(MARCH)` `-pthread` `-std=c99`
45-
+ `CXX` --- command to invoke the C++ compiler (including for linking); by default: `$(SCL)` `$(GXX)` `$(PIPE)` `-w` `$(MARCH)` `-pthread` `-std=c++11`
46-
+ `CPPFLAGS` --- additional preprocessing options (for both C and C++ sources); e.g., refer to Other preprocessor definitions below
47-
+ `CFLAGS` --- additional compilation options (normally optimization-related only) for the C compiler; by default just `-O3`
48-
+ `CXXFLAGS` --- additional compilation options for the C++ compiler; by default specified by `CFLAGS`
49-
+ `LDFLAGS` --- additional linking options; by default: `-s` `-Wl,--as-needed`
50-
+ `LDLIBS` --- options to specify libraries for linking; by default: `-lm` `-ldl` `-lrt`
51-
+ `SCL` --- command prefix for enabling RHEL/CentOS Software Collections (see `CC`/`CXX`), if needed; for instance: `scl` `enable` `devtoolset-8` `--`
52-
+ `GCC` --- by default just `gcc` (see `CC`); use, for instance, `clang` to compile with clang
53-
+ `GXX` --- by default just `g++` (see `CXX`); use, for instance, `clang++` for clang++
54-
+ `PIPE` --- by default `-pipe` to enable using pipes (see `CC`/`CXX`, may lead to build issues in some rare cases on some platforms)
55-
+ `MARCH` --- to specify a target machine architecture (ISA/ABI) if needed; by default: `-msse2` `-mfpmath=sse` (relevant for the i386 ISA)
56-
+ `LDFLAGS_SO` --- additional linking options to use when building shared (.so) libraries; by default `-fPIC`
57-
+ `RUN_ARGS` --- to specify command line arguments for running the test; by default just `test.mnl`
58-
+ `VALGRIND` --- command prefix to test under Valgrind; by default: `$(SCL)` `valgrind`
59-
+ `PREFIX` --- destination root directory for the `install` target; by default `/usr/local`
60-
+ `MNL_CONFIG` --- to enable/disable various features via conditional compilation flags (refer to Conditional compilation below)
35+
+ `all` (default) - build MANOOL; the result is placed into the directory `build` and its various subdirectories (created automatically if needed)
36+
+ `run` - run a short build integrity test; depends on an up-to-date MANOOL build
37+
+ `run-valgrind` - the same but run the test under Valgrind to look more closely for any build issues
38+
+ `install` - install MANOOL; depends on an up-to-date MANOOL build
39+
+ `clean` - clean up the `build` directory
40+
41+
#### Makefile configuration variables
42+
43+
+ `CC` - command to invoke the C compiler; by default: `$(SCL)` `$(GCC)` `$(PIPE)` `-w` `$(MARCH)` `-pthread` `-std=c99`
44+
+ `CXX` - command to invoke the C++ compiler (including for linking); by default: `$(SCL)` `$(GXX)` `$(PIPE)` `-w` `$(MARCH)` `-pthread` `-std=c++11`
45+
+ `CPPFLAGS` - additional preprocessing options (for both C and C++ sources); e.g., refer to Other preprocessor definitions below
46+
+ `CFLAGS` - additional compilation options (normally optimization-related only) for the C compiler; by default just `-O3`
47+
+ `CXXFLAGS` - additional compilation options for the C++ compiler; by default specified by `CFLAGS`
48+
+ `LDFLAGS` - additional linking options; by default: `-s` `-Wl,--as-needed`
49+
+ `LDLIBS` - options to specify libraries for linking; by default: `-lm` `-ldl` `-lrt`
50+
+ `SCL` - command prefix for enabling RHEL/CentOS Software Collections (see `CC`/`CXX`), if needed; for instance: `scl` `enable` `devtoolset-8` `--`
51+
+ `GCC` - by default just `gcc` (see `CC`); use, for instance, `clang` to compile with clang
52+
+ `GXX` - by default just `g++` (see `CXX`); use, for instance, `clang++` for clang++
53+
+ `PIPE` - by default `-pipe` to enable using pipes (see `CC`/`CXX`, may lead to build issues in some rare cases on some platforms)
54+
+ `MARCH` - to specify a target machine architecture (ISA/ABI) if needed; by default: `-msse2` `-mfpmath=sse` (relevant for the i386 ISA)
55+
+ `LDFLAGS_SO` - additional linking options to use when building shared (.so) libraries; by default `-fPIC`
56+
+ `RUN_ARGS` - to specify command line arguments for running the test; by default just `test.mnl`
57+
+ `VALGRIND` - command prefix to test under Valgrind; by default: `$(SCL)` `valgrind`
58+
+ `PREFIX` - destination root directory for the `install` target; by default `/usr/local`
59+
+ `MNL_CONFIG` - to enable/disable various features via conditional compilation flags (refer to Conditional compilation below)
6160

6261
#### Conditional compilation
6362

6463
`MNL_CONFIG` is to contain one or more of the following space-separated flags (all features are enabled by default except `MNL_USE_DEBUG`):
65-
* `-UMNL_WITH_OPTIMIZE` --- prevent compilation of VM operation fusion optimizations
64+
* `-UMNL_WITH_OPTIMIZE` - prevent compilation of VM operation fusion optimizations
6665
(e.g., for benchmarking their effect, to reduce the object code size, or to reduce build times during debugging)
67-
* `-UMNL_WITH_IDENT_OPT` --- for (in)equality comparisons, disable dynamic optimizations based on object identity
66+
* `-UMNL_WITH_IDENT_OPT` - for (in)equality comparisons, disable dynamic optimizations based on object identity
6867
(for good or for bad)
69-
* `-UMNL_WITH_MULTITHREADING` --- disable support for multiple threads of execution
68+
* `-UMNL_WITH_MULTITHREADING` - disable support for multiple threads of execution
7069
(considerably improves single-threaded performance)
71-
* `-UMNL_WITH_UUID_NS` --- use `mnl` as a top-level namespace instead of a UUID for MANOOL stuff
70+
* `-UMNL_WITH_UUID_NS` - use `mnl` as a top-level namespace instead of a UUID for MANOOL stuff
7271
(useful to simplify object file analysis, but should be avoided otherwise)
73-
* `-UMNL_USE_EXPECT` --- do not use branch prediction specifications (`__builtin_expect` gcc-specific builtins)
74-
* `-UMNL_USE_INLINE` --- do not use inlining control (via `__always_inline__`/`__noinline__` gcc-specific attributes)
75-
* `-UMNL_USE_PURE` --- do not mark pure functions (with `__const__` and `__pure__` gcc-specific attributes)
76-
* `-UMNL_USE_NOCLOBBER` --- do not mark pure functions (with `__pure__` gcc-specific attributes);
72+
* `-UMNL_USE_EXPECT` - do not use branch prediction specifications (`__builtin_expect` gcc-specific builtins)
73+
* `-UMNL_USE_INLINE` - do not use inlining control (via `__always_inline__`/`__noinline__` gcc-specific attributes)
74+
* `-UMNL_USE_PURE` - do not mark pure functions (with `__const__` and `__pure__` gcc-specific attributes)
75+
* `-UMNL_USE_NOCLOBBER` - do not mark pure functions (with `__pure__` gcc-specific attributes);
7776
`MNL_USE_PURE` is stronger than `MNL_USE_NOCLOBBER`
78-
* `-DMNL_USE_DEBUG` --- enable the debugging facility (`using` `::std::cerr` in the `::mnl::aux` namespace)
77+
* `-DMNL_USE_DEBUG` - enable the debugging facility (`using` `::std::cerr` in the `::mnl::aux` namespace)
7978

8079
#### Other preprocessor definitions
8180

82-
+ `MNL_AUX_UUID` --- top-level namespace (rarely needs to be defined); forces the effect of `MNL_WITH_UUID_NS`
83-
+ `MNL_STACK` --- hard-coded default for the `MNL_STACK` environment variable; by default `6291456` (6 MiB)
84-
+ `MNL_HEAP` --- hard-coded default for the `MNL_HEAP` environment variable; by default `268435456` (256 MiB)
85-
+ `MNL_PATH` --- hard-coded default for the `MNL_PATH` environment variable; by default `/usr/local/lib/manool:/usr/lib/manool`
81+
+ `MNL_AUX_UUID` - top-level namespace (rarely needs to be defined); forces the effect of `MNL_WITH_UUID_NS`
82+
+ `MNL_STACK` - hard-coded default for the `MNL_STACK` environment variable; by default `6291456` (6 MiB)
83+
+ `MNL_HEAP` - hard-coded default for the `MNL_HEAP` environment variable; by default `268435456` (256 MiB)
84+
+ `MNL_PATH` - hard-coded default for the `MNL_PATH` environment variable; by default `/usr/local/lib/manool:/usr/lib/manool`
8685

8786
### Installation
8887

8988
To install MANOOL after building, try, e.g. (also read about the `PREFIX` makefile variable above):
9089

9190
sudo make install
9291

93-
### Using MANOOL
92+
### Launching MANOOL
9493

9594
To run installed MANOOL, point the environment variable `MNL_PATH` to the installed-library directory, e.g.:
9695

@@ -114,138 +113,138 @@ Confirmed Builds
114113

115114
### Newer OSes
116115

117-
+ Ubuntu Server 18.04 LTS, x86-64 (AMD), x86-64/lp64, g++
116+
+ Ubuntu Server 18.04 LTS, x86-64, x86-64/lp64, g++
118117

119-
apt install g++ make
118+
sudo apt install g++ make
120119
make
121120

122-
+ Ubuntu Server 18.04 LTS, x86-64 (AMD), i386+sse2/ilp32, g++
121+
+ Ubuntu Server 18.04 LTS, x86-64, i386+sse2/ilp32, g++
123122

124-
apt install g++-multilib make
123+
sudo apt install g++-multilib make
125124
make MARCH='-m32 -msse2 -mfpmath=sse' LDFLAGS_SO=
126125

127-
+ Ubuntu Server 18.04 LTS, x86-64 (AMD), x86-64/ilp32, g++
126+
+ Ubuntu Server 18.04 LTS, x86-64, x86-64/ilp32, g++
128127

129-
apt install g++-multilib make
128+
sudo apt install g++-multilib make
130129
make MARCH=-mx32
131130

132-
+ Ubuntu Server 18.04 LTS, x86-64 (AMD), x86-64/lp64, clang++
131+
+ Ubuntu Server 18.04 LTS, x86-64, x86-64/lp64, clang++
133132

134-
apt install clang make
133+
sudo apt install clang make
135134
make GCC=clang GXX=clang++
136135

137136
***
138137

139-
+ RHEL 8, x86-64 (AMD), x86-64/lp64, g++
138+
+ RHEL 8, x86-64, x86-64/lp64, g++
140139

141-
yum install gcc-c++ make
140+
sudo yum install gcc-c++ make
142141
make
143142

144-
+ RHEL 8, x86-64 (AMD), i386+sse2/ilp32, g++
143+
+ RHEL 8, x86-64, i386+sse2/ilp32, g++
145144

146-
yum install gcc-c++ make glibc-devel.i686 libstdc++-devel.i686
145+
sudo yum install gcc-c++ make glibc-devel.i686 libstdc++-devel.i686
147146
make MARCH='-m32 -msse2 -mfpmath=sse' LDFLAGS_SO=
148147

149-
+ RHEL 8, x86-64 (AMD), x86-64/lp64, clang++
148+
+ RHEL 8, x86-64, x86-64/lp64, clang++
150149

151-
yum install clang make
150+
sudo yum install clang make
152151
make GCC=clang GXX=clang++
153152

154-
+ RHEL 8, x86-64 (AMD), i386+sse2/ilp32, clang++
153+
+ RHEL 8, x86-64, i386+sse2/ilp32, clang++
155154

156-
yum install clang make glibc-devel.i686 libstdc++-devel.i686
155+
sudo yum install clang make glibc-devel.i686 libstdc++-devel.i686
157156
make GCC=clang GXX=clang++ MARCH='-m32 -msse2 -mfpmath=sse' LDFLAGS_SO=
158157

159158
***
160159

161-
+ Ubuntu Server 18.04 LTS, aarch64 (ARM), aarch64+el/lp64, g++
160+
+ Ubuntu Server 18.04 LTS, aarch64, aarch64+el/lp64, g++
162161

163-
apt install g++ make
162+
sudo apt install g++ make
164163
make MARCH=
165164

166-
+ Ubuntu Server 18.04 LTS, aarch64 (ARM), aarch64+el/lp64, clang++
165+
+ Ubuntu Server 18.04 LTS, aarch64, aarch64+el/lp64, clang++
167166

168-
apt install clang make
167+
sudo apt install clang make
169168
make GCC=clang GXX=clang++ MARCH=
170169

171170
***
172171

173-
+ FreeBSD 12, x86-64 (Intel), x86-64/lp64, clang++
172+
+ FreeBSD 12, x86-64, x86-64/lp64, clang++
174173

175-
pkg install gmake
174+
sudo pkg install gmake
176175
gmake GCC=clang GXX=clang++
177176

178-
+ FreeBSD 12, x86-64 (Intel), x86-64/lp64, g++
177+
+ FreeBSD 12, x86-64, x86-64/lp64, g++
179178

180-
pkg install lang/gcc gmake
179+
sudo pkg install lang/gcc gmake
181180
gmake
182181

183182
***
184183

185-
+ openSUSE Leap 15.1, x86-64 (Intel), x86-64/lp64, g++
184+
+ openSUSE Leap 15.1, x86-64, x86-64/lp64, g++
186185

187-
zypper install gcc-c++ make
186+
sudo zypper install gcc-c++ make
188187
make
189188

190189
***
191190

192-
+ Android 5.1 (Lollipop), armv7+vfp (ARM), armv7l+vfp/ilp32, clang++
191+
+ Android 5.1 (Lollipop), armv7+vfp, armv7+el+vfp/ilp32, clang++
193192

194193
# (from cxxdroid terminal)
195194
make GCC=clang GXX=clang++ MARCH= LDLIBS='-lm -ldl'
196195

197196

198197
### Older OSes
199198

200-
+ CentOS 6, x86-64 (Intel), x86-64/lp64, g++
199+
+ CentOS 6, x86-64, x86-64/lp64, g++
201200

202-
yum install centos-release-scl && yum install devtoolset-8-gcc-c++
203-
make SCL='scl enable devtoolset-8'
201+
sudo yum install centos-release-scl && sudo yum install devtoolset-8-gcc-c++
202+
make SCL='scl enable devtoolset-8 --'
204203

205204
***
206205

207-
+ CentOS 7, x86-64 (AMD), x86-64/lp64, g++
206+
+ CentOS 7, x86-64, x86-64/lp64, g++
208207

209-
yum install centos-release-scl && yum install devtoolset-8-gcc-c++
210-
make SCL='scl enable devtoolset-8'
208+
sudo yum install centos-release-scl && sudo yum install devtoolset-8-gcc-c++
209+
make SCL='scl enable devtoolset-8 --'
211210

212-
+ CentOS 7, x86-64 (AMD), x86-64/lp64, clang++
211+
+ CentOS 7, x86-64, x86-64/lp64, clang++
213212

214-
yum install centos-release-scl && yum install llvm-toolset-7-clang
215-
make SCL='scl enable llvm-toolset-7' GCC=clang GXX=clang++
213+
sudo yum install centos-release-scl && sudo yum install llvm-toolset-7-clang
214+
make SCL='scl enable llvm-toolset-7 --' GCC=clang GXX=clang++
216215

217216
***
218217

219-
+ Debian GNU/Linux 9 (Stretch), x86-64 (AMD), x86-64/lp64, clang++
218+
+ Debian GNU/Linux 9 (Stretch), x86-64, x86-64/lp64, clang++
220219

221-
apt install clang-7 make
220+
sudo apt install clang-7 make
222221
make GCC=clang-7 GXX=clang++-7
223222

224-
+ Debian GNU/Linux 9 (Stretch), x86-64 (AMD), x86-64/lp64, g++
223+
+ Debian GNU/Linux 9 (Stretch), x86-64, x86-64/lp64, g++
225224

226-
apt install g++ make
225+
sudo apt install g++ make
227226
make GXX='g++ -fpermissive'
228227

229228
***
230229

231-
+ Ubuntu Server 16.04 LTS, x86-64 (AMD), x86-64/lp64, clang++
230+
+ Ubuntu Server 16.04 LTS, x86-64, x86-64/lp64, clang++
232231

233-
apt install clang-6.0 make
232+
sudo apt install clang-6.0 make
234233
make GCC=clang-6.0 GXX=clang++-6.0
235234

236-
+ Ubuntu Server 16.04 LTS, x86-64 (AMD), x86-64/lp64, g++
235+
+ Ubuntu Server 16.04 LTS, x86-64, x86-64/lp64, g++
237236

238-
apt install g++ make
237+
sudo apt install g++ make
239238
make GXX='g++ -fpermissive'
240239

241240
***
242241

243-
+ Debian GNU/Linux 8 (Jessie), x86-64 (Intel), x86-64/lp64, clang++
242+
+ Debian GNU/Linux 8 (Jessie), x86-64, x86-64/lp64, clang++
244243

245-
apt install clang-4.0
244+
sudo apt install clang-4.0
246245
make GCC=clang-4.0 GXX=clang++-4.0
247246

248-
+ Debian GNU/Linux 8 (Jessie), x86-64 (Intel), x86-64/lp64, g++
247+
+ Debian GNU/Linux 8 (Jessie), x86-64, x86-64/lp64, g++
249248

250-
apt install g++
249+
sudo apt install g++
251250
make GXX='g++ -fpermissive'

0 commit comments

Comments
 (0)