@cryptotaxi247 / netdata-1 / commits / d98adc041

Fix 32-bit builds of journal-viewer plugin. (#21580)

* Fix 32-bit builds of journal-viewer plugin. * Use a patched version of fastant to fix 32-bit builds on x86. * Disable systemd journal plugin on ARMv6l static builds. We’ve never had this functionality there, so not enabling it with these changes doesn’t lose us anything relative to the status quo. --------- Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud>

vkalintiris committed Jan 16, 2026 at 18:02 UTC d98adc041a201f7f13f63717bdd33df74292e65c
6 files changed +19 -14
CMakeLists.txt
+13 -3
@@ -207,11 +207,21 @@ if(ENABLE_NETDATA_JOURNAL_FILE_READER OR ENABLE_PLUGIN_OTEL)
207 endif()
208
209 if(ENABLE_NETDATA_JOURNAL_FILE_READER)
210 + set(JOURNAL_VIEWER_RUSTFLAGS --cfg=tracing_unstable)
211 +
212 + # We depend (transitively) on the `io-uring` crate which doesn't provide
213 + # prebuilt bindings for 32-bit arches. Considering this is a compile-time
214 + # and not a runtime dependency (because we don't use foyer's io-uring
215 + # engine), we can simply skip the check.
216 + if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
217 + list(APPEND JOURNAL_VIEWER_RUSTFLAGS --cfg=io_uring_skip_arch_check)
218 + endif()
219 +
220 if(STATIC_BUILD)
211 - corrosion_add_target_rustflags(journal-viewer-plugin --cfg=tracing_unstable "-C" "target-feature=+crt-static")
212 - else()
213 - corrosion_add_target_rustflags(journal-viewer-plugin --cfg=tracing_unstable)
221 + list(APPEND JOURNAL_VIEWER_RUSTFLAGS "-C" "target-feature=+crt-static")
222 endif()
223 +
224 + corrosion_add_target_rustflags(journal-viewer-plugin ${JOURNAL_VIEWER_RUSTFLAGS})
225 endif()
226
227 if(ENABLE_PLUGIN_OTEL)
packaging/docker/Dockerfile
+1 -5
@@ -32,11 +32,7 @@ RUN chmod +x netdata-installer.sh && \
32 cp -rp /deps/* /usr/local/ && \
33 BUILD_ARCH="${BUILD_ARCH:-"$(uname -m)"}" && \
34 /bin/echo -e "INSTALL_TYPE='oci'\nPREBUILT_ARCH='${BUILD_ARCH}'" > ./system/.install-type && \
35 - if [ "${BUILD_ARCH}" = "armv7l" ]; then \
36 - EXTRA_INSTALL_OPTS="${EXTRA_INSTALL_OPTS} --disable-plugin-systemd-journal" ; \
37 - else \
38 - EXTRA_INSTALL_OPTS="${EXTRA_INSTALL_OPTS} --enable-plugin-systemd-journal" ; \
39 - fi && \
35 + EXTRA_INSTALL_OPTS="${EXTRA_INSTALL_OPTS} --enable-plugin-systemd-journal" && \
36 NETDATA_BUILD_DIR=/build \
37 CFLAGS="$(packaging/docker/gen-cflags.sh)" LDFLAGS="-Wl,--gc-sections" ./netdata-installer.sh --dont-wait --dont-start-it \
38 --use-system-protobuf \
packaging/installer/functions.sh
+1 -1
@@ -330,7 +330,7 @@ prepare_cmake_options() {
330 fi
331
332 if [ -z "${ENABLE_SYSTEMD_JOURNAL}" ]; then
333 - if command -v rustc > /dev/null 2>&1 && [ "$(uname -m)" != 'armv7l' ] && [ "$(uname -m)" != 'armv6l' ]; then
333 + if command -v rustc > /dev/null 2>&1; then
334 ENABLE_SYSTEMD_JOURNAL=1
335 else
336 ENABLE_SYSTEMD_JOURNAL=0
packaging/makeself/jobs/70-netdata-git.install.sh
-3
@@ -28,9 +28,6 @@ case "${BUILDARCH}" in
28 armv6l)
29 export INSTALLER_ARGS="--disable-plugin-otel --disable-plugin-systemd-journal"
30 ;;
31 - armv7l)
32 - export INSTALLER_ARGS="--enable-plugin-otel --disable-plugin-systemd-journal"
33 - ;;
31 *)
32 export INSTALLER_ARGS="--enable-plugin-otel --enable-plugin-systemd-journal"
33 ;;
src/crates/Cargo.lock
+1 -2
@@ -808,8 +808,7 @@ dependencies = [
808 [[package]]
809 name = "fastant"
810 version = "0.1.10"
811 -source = "registry+https://github.com/rust-lang/crates.io-index"
812 -checksum = "62bf7fa928ce0c4a43bd6e7d1235318fc32ac3a3dea06a2208c44e729449471a"
811 +source = "git+https://github.com/netdata/fastant.git?branch=fastant-x86-fix#1786237e508ae865e2058f246bc7b1a452fececf"
812 dependencies = [
813 "small_ctor",
814 "web-time",
src/crates/Cargo.toml
+3
@@ -180,3 +180,6 @@ lto = "fat"
180 codegen-units = 1
181 strip = true
182 panic = "abort"
183 +
184 +[patch.crates-io]
185 +fastant = { git = "https://github.com/netdata/fastant.git", branch = "fastant-x86-fix" }