Skip to content

Commit 870fb58

Browse files
committed
doc: add note in BUILDING.md about running make distclean
Fixes: #28675
1 parent 9528f95 commit 870fb58

File tree

1 file changed

+74
-43
lines changed

1 file changed

+74
-43
lines changed

BUILDING.md

Lines changed: 74 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,53 @@ file a new issue.
1010

1111
## Table of Contents
1212

13-
* [Supported platforms](#supported-platforms)
14-
* [Input](#input)
15-
* [Strategy](#strategy)
16-
* [Platform list](#platform-list)
17-
* [Supported toolchains](#supported-toolchains)
18-
* [Official binary platforms and toolchains](#official-binary-platforms-and-toolchains)
19-
* [OpenSSL asm support](#openssl-asm-support)
20-
* [Previous versions of this document](#previous-versions-of-this-document)
21-
* [Building Node.js on supported platforms](#building-nodejs-on-supported-platforms)
22-
* [Note about Python 2 and Python 3](#note-about-python-2-and-python-3)
23-
* [Unix and macOS](#unix-and-macos)
24-
* [Unix prerequisites](#unix-prerequisites)
25-
* [macOS prerequisites](#macos-prerequisites)
26-
* [Building Node.js](#building-nodejs-1)
27-
* [Running Tests](#running-tests)
28-
* [Running Coverage](#running-coverage)
29-
* [Building the documentation](#building-the-documentation)
30-
* [Building a debug build](#building-a-debug-build)
31-
* [Windows](#windows)
32-
* [Prerequisites](#prerequisites)
33-
* [Option 1: Manual install](#option-1-manual-install)
34-
* [Option 2: Automated install with Boxstarter](#option-2-automated-install-with-boxstarter)
35-
* [Building Node.js](#building-nodejs-1)
36-
* [Android/Android-based devices (e.g. Firefox OS)](#androidandroid-based-devices-eg-firefox-os)
37-
* [`Intl` (ECMA-402) support](#intl-ecma-402-support)
38-
* [Build with full ICU support (all locales supported by ICU)](#build-with-full-icu-support-all-locales-supported-by-icu)
39-
* [Unix/macOS](#unixmacos)
40-
* [Windows](#windows-1)
41-
* [Trimmed: `small-icu` (English only) support](#trimmed-small-icu-english-only-support)
42-
* [Unix/macOS](#unixmacos-1)
43-
* [Windows](#windows-2)
44-
* [Building without Intl support](#building-without-intl-support)
45-
* [Unix/macOS](#unixmacos-2)
46-
* [Windows](#windows-3)
47-
* [Use existing installed ICU (Unix/macOS only)](#use-existing-installed-icu-unixmacOS-only)
48-
* [Build with a specific ICU](#build-with-a-specific-icu)
49-
* [Unix/macOS](#unixmacos-3)
50-
* [Windows](#windows-4)
51-
* [Building Node.js with FIPS-compliant OpenSSL](#building-nodejs-with-fips-compliant-openssl)
52-
* [Building Node.js with external core modules](#building-nodejs-with-external-core-modules)
53-
* [Unix/macOS](#unixmacos-4)
54-
* [Windows](#windows-5)
55-
* [Note for downstream distributors of Node.js](#note-for-downstream-distributors-of-nodejs)
13+
* [Building Node.js](#building-nodejs)
14+
* [Table of Contents](#table-of-contents)
15+
* [Supported platforms](#supported-platforms)
16+
* [Input](#input)
17+
* [Strategy](#strategy)
18+
* [Platform list](#platform-list)
19+
* [Supported toolchains](#supported-toolchains)
20+
* [Official binary platforms and toolchains](#official-binary-platforms-and-toolchains)
21+
* [OpenSSL asm support](#openssl-asm-support)
22+
* [Previous versions of this document](#previous-versions-of-this-document)
23+
* [Building Node.js on supported platforms](#building-nodejs-on-supported-platforms)
24+
* [Note about Python 2 and Python 3](#note-about-python-2-and-python-3)
25+
* [Unix and macOS](#unix-and-macos)
26+
* [Unix prerequisites](#unix-prerequisites)
27+
* [macOS prerequisites](#macos-prerequisites)
28+
* [Building Node.js](#building-nodejs-1)
29+
* [Running Tests](#running-tests)
30+
* [Running Coverage](#running-coverage)
31+
* [Building the documentation](#building-the-documentation)
32+
* [Building a debug build](#building-a-debug-build)
33+
* [Cleaning up the build](#cleaning-up-the-build)
34+
* [Windows](#windows)
35+
* [Prerequisites](#prerequisites)
36+
* [Option 1: Manual install](#option-1-manual-install)
37+
* [Option 2: Automated install with Boxstarter](#option-2-automated-install-with-boxstarter)
38+
* [Building Node.js](#building-nodejs-2)
39+
* [Android/Android-based devices (e.g. Firefox OS)](#androidandroid-based-devices-eg-firefox-os)
40+
* [Troubleshooting Build failures](#troubleshooting-build-failures)
41+
* [`Intl` (ECMA-402) support](#intl-ecma-402-support)
42+
* [Build with full ICU support (all locales supported by ICU)](#build-with-full-icu-support-all-locales-supported-by-icu)
43+
* [Unix/macOS](#unixmacos)
44+
* [Windows](#windows-1)
45+
* [Trimmed: `small-icu` (English only) support](#trimmed-small-icu-english-only-support)
46+
* [Unix/macOS](#unixmacos-1)
47+
* [Windows](#windows-2)
48+
* [Building without Intl support](#building-without-intl-support)
49+
* [Unix/macOS](#unixmacos-2)
50+
* [Windows](#windows-3)
51+
* [Use existing installed ICU (Unix/macOS only)](#use-existing-installed-icu-unixmacos-only)
52+
* [Build with a specific ICU](#build-with-a-specific-icu)
53+
* [Unix/macOS](#unixmacos-3)
54+
* [Windows](#windows-4)
55+
* [Building Node.js with FIPS-compliant OpenSSL](#building-nodejs-with-fips-compliant-openssl)
56+
* [Building Node.js with external core modules](#building-nodejs-with-external-core-modules)
57+
* [Unix/macOS](#unixmacos-4)
58+
* [Windows](#windows-5)
59+
* [Note for downstream distributors of Node.js](#note-for-downstream-distributors-of-nodejs)
5660

5761
## Supported platforms
5862

@@ -488,6 +492,27 @@ $ gdb /opt/node-debug/node core.node.8.1535359906
488492
$ backtrace
489493
```
490494

495+
#### Cleaning up the build
496+
497+
Always try
498+
499+
``` console
500+
$ make clean
501+
$ make -j4
502+
```
503+
504+
first, to clean the current build and build again.
505+
506+
For a more thorough clean up, try
507+
508+
``` console
509+
$ make distclean
510+
$ ./configure
511+
$ make -j4
512+
```
513+
```distclean``` should be followed by ```./configure```, and therefore takes
514+
significantly longer to rebuild than using ```make clean```.
515+
491516
### Windows
492517

493518
#### Prerequisites
@@ -596,6 +621,12 @@ $ ./android-configure /path/to/your/android-ndk
596621
$ make
597622
```
598623

624+
### Troubleshooting Build failures
625+
Error: ``` fatal error: 'src/snapshot/macros.h' file not found```
626+
627+
This is probably due to a stale build, and should be fixed with a full clean.
628+
Refer to [Cleaning up the build](#cleaning-up-the-build)
629+
599630
## `Intl` (ECMA-402) support
600631

601632
[Intl](https://github.com/nodejs/node/blob/master/doc/api/intl.md) support is

0 commit comments

Comments
 (0)