3 Depending on what platform or features you require the build process may
4 differ slightly. After you've successfully built a binary, running the
5 test suite to validate that the binary works as intended is a good next step.
7 If you consistently can reproduce a test failure, search for it in the
8 [Node.js issue tracker](https://github.com/nodejs/node/issues) or
16 * `gcc` and `g++` 4.8 or newer, or
17 * `clang` and `clang++` 3.4 or newer
19 * GNU Make 3.81 or newer
20 * libexecinfo (FreeBSD and OpenBSD only)
28 If your Python binary is in a non-standard location or has a
29 non-standard name, run the following instead:
32 $ export PYTHON=/path/to/python
44 To build the documentation:
50 To read the documentation:
56 To test if Node.js was built correctly:
59 $ node -e "console.log('Hello from Node.js ' + process.version)"
67 * [Python 2.6 or 2.7](https://www.python.org/downloads/)
68 * Visual Studio 2013 / 2015, all editions including the Community edition, or
69 * Visual Studio Express 2013 / 2015 for Desktop
70 * Basic Unix tools required for some tests,
71 [Git for Windows](http://git-scm.com/download/win) includes Git Bash
72 and tools which can be included in the global `PATH`.
84 To test if Node.js was built correctly:
87 $ node -e "console.log('Hello from Node.js ' + process.version)"
90 ### Android / Android based devices, aka. Firefox OS
92 Be sure you have downloaded and extracted [Android NDK]
93 (https://developer.android.com/tools/sdk/ndk/index.html)
94 before in a folder. Then run:
97 $ ./android-configure /path/to/your/android-ndk
102 ### `Intl` (ECMA-402) support:
104 [Intl](https://github.com/nodejs/node/wiki/Intl) support is not
108 #### "small" (English only) support
110 This option will build with "small" (English only) support, but
111 the full `Intl` (ECMA-402) APIs. With `--download=all` it will
112 download the ICU library as needed.
114 ##### Unix / Macintosh:
117 $ ./configure --with-intl=small-icu --download=all
123 > vcbuild small-icu download-all
126 The `small-icu` mode builds with English-only data. You can add full
129 *Note:* more docs are on
130 [the node wiki](https://github.com/nodejs/node/wiki/Intl).
132 #### Build with full ICU support (all locales supported by ICU):
134 With the `--download=all`, this may download ICU if you don't have an
137 ##### Unix / Macintosh:
140 $ ./configure --with-intl=full-icu --download=all
146 > vcbuild full-icu download-all
149 #### Building without Intl support
151 The `Intl` object will not be available. This is the default at
152 present, so this option is not normally needed.
154 ##### Unix / Macintosh:
157 $ ./configure --with-intl=none
166 #### Use existing installed ICU (Unix / Macintosh only):
169 $ pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
172 If you are cross compiling, your `pkg-config` must be able to supply a path
173 that works for both your host and target environments.
175 #### Build with a specific ICU:
177 You can find other ICU releases at
178 [the ICU homepage](http://icu-project.org/download).
179 Download the file named something like `icu4c-**##.#**-src.tgz` (or
182 ##### Unix / Macintosh
185 # from an already-unpacked ICU:
186 $ ./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu
188 # from a local ICU tarball
189 $ ./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu.tgz
192 $ ./configure --with-intl=full-icu --with-icu-source=http://url/to/icu.tgz
197 First unpack latest ICU to `deps/icu`
198 [icu4c-**##.#**-src.tgz](http://icu-project.org/download) (or `.zip`)
199 as `deps/icu` (You'll have: `deps/icu/source/...`)
205 ## Building Node.js with FIPS-compliant OpenSSL
207 NOTE: Windows is not yet supported
209 It is possible to build Node.js with
210 [OpenSSL FIPS module](https://www.openssl.org/docs/fips/fipsnotes.html).
212 **Note**: building in this way does **not** allow you to claim that the
213 runtime is FIPS 140-2 validated. Instead you can indicate that the runtime
214 uses a validated module. See the [security policy](http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf)
215 page 60 for more details. In addition, the validation for the underlying module
216 is only valid if it is deployed in accordance with its [security policy](http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf).
217 If you need FIPS validated cryptography it is recommended that you read both
218 the [security policy](http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf)
219 and [user guide](https://openssl.org/docs/fips/UserGuide-2.0.pdf).
223 1. Obtain a copy of openssl-fips-x.x.x.tar.gz.
224 To comply with the security policy you must ensure the path
225 through which you get the file complies with the requirements
226 for a "secure installation" as described in section 6.6 in
227 the [user guide](https://openssl.org/docs/fips/UserGuide-2.0.pdf).
228 For evaluation/experimentation you can simply download and verify
229 `openssl-fips-x.x.x.tar.gz` from https://www.openssl.org/source/
230 2. Extract source to `openssl-fips` folder and `cd openssl-fips`
234 (NOTE: to comply with the security policy you must use the exact
235 commands in steps 3-5 without any additional options as per
236 Appendix A in the [security policy](http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf).
237 The only exception is that `./config no-asm` can be
238 used in place of `./config`, and the FIPSDIR environment variable
239 may be used to specify a non-standard install folder for the
240 validated module, as per User Guide sections 4.2.1, 4.2.2, and 4.2.3.
241 6. Get into Node.js checkout folder
242 7. `./configure --openssl-fips=/path/to/openssl-fips/installdir`
243 For example on ubuntu 12 the installation directory was
244 /usr/local/ssl/fips-2.0
245 8. Build Node.js with `make -j`
246 9. Verify with `node -p "process.versions.openssl"` (`1.0.2a-fips`)