master
md 135 lines 3.91 KB
Rendered Raw
1 # Netdata Static Binary Build
2
3 Netdata provides pre-built static binaries for Linux systems where native packages aren't available. The [installer](/packaging/installer/methods/kickstart.md) automatically uses these static builds when needed.
4
5 **Key Features**:
6
7 - Self-contained installation (no system dependencies required, no interference with system libraries)
8 - Installed under `/opt/netdata`
9
10 ## Supported Architectures
11
12 | Architecture | Identifier | Notes |
13 |--------------|------------|----------------------------------|
14 | x86_64 | `x86_64` | 64-bit Intel/AMD processors |
15 | ARMv6 | `armv6l` | Raspberry Pi 1, some older SBCs |
16 | ARMv7 | `armv7l` | Raspberry Pi 2/3, many SBCs |
17 | AArch64 | `aarch64` | ARM 64-bit (Pi 4, newer devices) |
18
19 ---
20
21 ## Build Process
22
23 ### Requirements
24
25 | Requirement | Purpose |
26 |------------------|-------------------------------------------|
27 | Docker or Podman | Container environment for isolated builds |
28 | ~10GB disk space | For build artifacts and containers |
29
30 ### Preparation
31
32 Before building, ensure your repository is clean from previous builds.
33
34 [Perform a cleanup](/packaging/installer/methods/manual.md#perform-a-cleanup-in-your-netdata-repo)
35
36 ### Building the Static Binary
37
38 Run the build script with your target [architecture identifier](#supported-architectures):
39
40 ```bash
41 # For x86_64 (default)
42 ./packaging/makeself/build-static.sh x86_64
43
44 # For ARM 64-bit (AArch64)
45 ./packaging/makeself/build-static.sh aarch64
46
47 # For ARMv6
48 ./packaging/makeself/build-static.sh armv6l
49
50 # For ARMv7
51 ./packaging/makeself/build-static.sh armv7l
52 ```
53
54 The script will automatically:
55
56 - Launch an Alpine Linux container
57 - Install necessary build dependencies
58 - Compile required third-party tools (bash, curl, etc.)
59 - Build Netdata with optimized settings
60 - Package everything into a self-extracting installer
61
62 When building for an architecture different from your host:
63
64 - The build process uses QEMU for emulation
65 - Build times will be significantly longer
66 - More disk space may be required
67 - Some features may have architecture-specific limitations
68
69 ### Build Output
70
71 The process generates several installer files in the artifacts/ directory:
72
73 ```
74 artifacts/
75 ├── netdata-latest.gz.run # Latest version
76 ├── netdata-v[VERSION]-[BUILD].gz.run # Specific version
77 ├── netdata-[ARCH]-latest.gz.run # Architecture-specific latest
78 └── netdata-[ARCH]-v[VERSION]-[BUILD].gz.run # Architecture-specific version
79 ```
80
81 Example output:
82
83 ```
84 $ ls -l artifacts/
85 drwxrwxr-x - user group cache
86 .rwxrwxr-x 94M user group netdata-latest.gz.run
87 .rwxrwxr-x 94M user group netdata-v2.3.0-193-nightly.gz.run
88 .rwxrwxr-x 94M user group netdata-x86_64-latest.gz.run
89 .rwxrwxr-x 94M user group netdata-x86_64-v2.3.0-193-nightly.gz.run
90 ```
91
92 ## Advanced Build Options
93
94 ### Debug Builds
95
96 For troubleshooting, you can create a debug-enabled build:
97
98 ```bash
99 ./packaging/makeself/build-static.sh x86_64 debug
100 ```
101
102 Debug build characteristics:
103
104 - Larger file size
105 - Runtime performance impact
106 - Additional diagnostic information
107 - Disabled optimizations
108 - Enhanced tracing capabilities
109
110 ## Troubleshooting
111
112 ### Running with Valgrind
113
114 To diagnose memory issues or crashes:
115
116 ```bash
117 PATH="/opt/netdata/bin:${PATH}" valgrind --undef-value-errors=no /opt/netdata/bin/srv/netdata -D
118 ```
119
120 **Important notes**:
121
122 - Performance will be significantly reduced (~10x slower)
123 - Stop Valgrind with Ctrl+C
124 - The `--undef-value-errors=no` flag suppresses hundreds of false positives from the bundled libraries
125
126 ### Crash Reporting
127
128 If Netdata crashes during development or testing:
129
130 1. Capture the complete Valgrind output
131 2. [Open a GitHub Issue](https://github.com/netdata/netdata/issues/new/choose)
132 3. Include:
133 - Build details (architecture, version)
134 - Complete stack trace
135 - Steps to reproduce the issue