0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-09 23:57:55 +00:00

Enable libunwind in native packages and Docker images. ()

* Enable libunwind in Docker images.

* Enable libunwind in DEB native packages.

* Enable libunwind in RPM native packages.

* Fix typo in CMakeLists.
This commit is contained in:
Austin S. Hemmelgarn 2025-02-21 06:46:02 -05:00 committed by GitHub
parent 48bdd9b51b
commit d44562c27d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 2 deletions

View file

@ -2179,7 +2179,7 @@ if(ENABLE_LIBUNWIND)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(amd64)")
target_link_libraries(libnetdata PUBLIC PkgConfig::LIBUNWIND -lunwind-x86_64)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?.86")
target_link_libraries(libnetdata PUBLIC PkgCOnfig::LIBUNWIND -lunwind-x86)
target_link_libraries(libnetdata PUBLIC PkgConfig::LIBUNWIND -lunwind-x86)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm64)|(aarch64)")
target_link_libraries(libnetdata PUBLIC PkgConfig::LIBUNWIND -lunwind-aarch64)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm")

View file

@ -160,6 +160,7 @@ BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(liblz4)
BuildRequires: pkgconfig(yaml-0.1)
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(libunwind)
%if %{_have_log2journal}
BuildRequires: pkgconfig(libpcre2-8)
%endif
@ -406,7 +407,8 @@ happened, on your systems and applications.
-DENABLE_PLUGIN_SYSTEMD_JOURNAL=On \
-DENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE=On \
-DENABLE_BUNDLED_JSONC=Off \
-DENABLE_BUNDLED_YAML=Off
-DENABLE_BUNDLED_YAML=Off \
-DENABLE_LBIUNWIND=On
# Build step
%{cmake_build}

View file

@ -51,6 +51,8 @@ add_cmake_option ENABLE_BUNDLED_PROTOBUF Off
add_cmake_option ENABLE_BUNDLED_JSONC Off
add_cmake_option ENABLE_BUNDLED_YAML Off
add_cmake_option ENABLE_LIBUNWIND On
add_cmake_option BUILD_FOR_PACKAGING On
case "${PKG_TYPE}" in
@ -64,6 +66,10 @@ case "${PKG_TYPE}" in
add_cmake_option ENABLE_PLUGIN_XENSTAT On
add_cmake_option ENABLE_PLUGIN_EBPF Off
;;
armhf)
add_cmake_option ENABLE_PLUGIN_XENSTAT Off
add_cmake_option ENABLE_PLUGIN_EBPF Off
;;
*)
add_cmake_option ENABLE_PLUGIN_XENSTAT Off
add_cmake_option ENABLE_PLUGIN_EBPF Off

View file

@ -27,6 +27,7 @@ WORKDIR /opt/netdata.git
RUN chmod +x netdata-installer.sh && \
cp -rp /deps/* /usr/local/ && \
/bin/echo -e "INSTALL_TYPE='oci'\nPREBUILT_ARCH='$(uname -m)'" > ./system/.install-type && \
NETDATA_CMAKE_OPTIONS="-DENABLE_LIBUNWIND=On" \
CFLAGS="$(packaging/docker/gen-cflags.sh)" LDFLAGS="-Wl,--gc-sections" ./netdata-installer.sh --dont-wait --dont-start-it --use-system-protobuf \
${EXTRA_INSTALL_OPTS} --disable-ebpf --install-no-prefix / "$([ "$RELEASE_CHANNEL" = stable ] && echo --stable-channel)"