Compiling error

Hi all!

I have been trying to update netdata in the past few months, and in the last weeks, netdata has released a major version.

I have been trying to compile it to no avail, I get this stupid error:

make[3]: Entering directory '/mnt/openwrt/ss_mod/feeds/packages/admin/netdata'
rm -f /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/.built
touch /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/.built_check
MAKEFLAGS="" /mnt/openwrt/ss_mod/staging_dir/host/bin/ninja -v -j1 -C /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1 
ninja: Entering directory `/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1'
[0/2] /mnt/openwrt/ss_mod/staging_dir/host/bin/cmake -P /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/CMakeFiles/VerifyGlobs.cmake
[1/244] cd /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1 && /mnt/openwrt/ss_mod/staging_dir/target-aarch64_cortex-a53_musl/usr/bin/protoc-3.17.3.0 -I/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/src/aclk/aclk-schemas --cpp_out=/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/src/aclk/aclk-schemas /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/src/aclk/aclk-schemas/proto/aclk/v1/lib.proto
FAILED: src/aclk/aclk-schemas/proto/aclk/v1/lib.pb.cc src/aclk/aclk-schemas/proto/aclk/v1/lib.pb.h /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/src/aclk/aclk-schemas/proto/aclk/v1/lib.pb.cc /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/src/aclk/aclk-schemas/proto/aclk/v1/lib.pb.h 
cd /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1 && /mnt/openwrt/ss_mod/staging_dir/target-aarch64_cortex-a53_musl/usr/bin/protoc-3.17.3.0 -I/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/src/aclk/aclk-schemas --cpp_out=/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/src/aclk/aclk-schemas /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/src/aclk/aclk-schemas/proto/aclk/v1/lib.proto
qemu-aarch64-static: Could not open '/lib/ld-musl-aarch64.so.1': No such file or directory
ninja: build stopped: subcommand failed.
make[3]: *** [Makefile:127: /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.45.1/.built] Error 1
make[3]: Leaving directory '/mnt/openwrt/ss_mod/feeds/packages/admin/netdata'
time: package/feeds/packages/netdata/compile#0.29#0.09#0.36
    ERROR: package/feeds/packages/netdata failed to build.

This is with this makefile:

#

# Copyright (C) 2008-2016 OpenWrt.org

#

# This is free software, licensed under the GNU General Public License v2.

# See /LICENSE for more information.

#

include $(TOPDIR)/rules.mk

PKG_NAME:=netdata

PKG_VERSION:=1.45.1

PKG_RELEASE:=1

PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>, Daniel Engberg <daniel.engberg.lists@pyret.net>

PKG_LICENSE:=GPL-3.0-or-later

PKG_LICENSE_FILES:=COPYING

PKG_CPE_ID:=cpe:/a:my-netdata:netdata

PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz

PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)

PKG_HASH:=3c633bc7ffd4ae588684eb651ffcc03b276bba9d069ba3aa534d2c46a8370fef

PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)

PKG_INSTALL:=1

PKG_BUILD_PARALLEL:=1

PKG_FIXUP:=autoreconf

PKG_BUILD_FLAGS:=no-mips16 gc-sections

include $(INCLUDE_DIR)/package.mk

include $(INCLUDE_DIR)/cmake.mk

define Package/netdata

SECTION:=admin

CATEGORY:=Administration

DEPENDS:=+zlib +libuuid +libuv +libmnl +libjson-c +libyaml +libstdcpp +libatomic +libopenssl +libcurl +protobuf +liblz4 +libc

TITLE:=Real-time performance monitoring tool

URL:=https://www.netdata.cloud/

endef

define Package/netdata/description

netdata is a highly optimized Linux daemon providing real-time performance

monitoring for Linux systems, applications and SNMP devices over the web.

If you want to use Python plugins install python3, python3-yaml and

python3-urllib3

endef

TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3

TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib

CMAKE_OPTIONS += \

-DENABLE_PLUGIN_FREEIPMI=Off \

-DENABLE_DBENGINE=Off \

-DENABLE_PLUGIN_SYSTEMD_JOURNAL=Off \

-DENABLE_PLUGIN_CUPS=Off \

-DENABLE_PLUGIN_DEBUGFS=Off \

-DENABLE_PLUGIN_EBPF=Off \

-DENABLE_PLUGIN_LOGS_MANAGEMENT=Off \

-DENABLE_LOGS_MANAGEMENT_TESTS=Off \

-DENABLE_ACLK=On \

-DENABLE_CLOUD=Off \

-DENABLE_H2O=Off \

-DENABLE_ML=Off \

-DENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE=Off \

-DENABLE_EXPORTER_MONGODB=Off \

-DENABLE_PLUGIN_NFACCT=Off \

-DENABLE_PLUGIN_XENSTAT=Off \

-DENABLE_PLUGIN_CGROUP_NETWORK=Off \

-DENABLE_WEBRTC=Off \

# --without-libcap \

# --disable-unit-tests \

# -DENABLE_BUNDLED_YAML=On \

# -DENABLE_BUNDLED_PROTOBUF=Off \

# -DENABLE_BUNDLED_JSONC=Off \

define Package/netdata/conffiles

/etc/netdata/

endef

define Package/netdata/install

$(INSTALL_DIR) $(1)/usr/sbin

$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin

$(INSTALL_DIR) $(1)/etc/netdata

$(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc

$(INSTALL_DATA) ./files/netdata.conf $(1)/etc/netdata

touch $(1)/etc/netdata/.opt-out-from-anonymous-statistics

$(INSTALL_DIR) $(1)/etc/init.d

$(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata

$(INSTALL_DIR) $(1)/usr/lib

$(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib

$(INSTALL_DIR) $(1)/usr/share/netdata

$(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share

rm $(1)/usr/share/netdata/web/demo*html

rm $(1)/usr/share/netdata/web/fonts/*.eot

rm $(1)/usr/share/netdata/web/fonts/*.svg

rm $(1)/usr/share/netdata/web/fonts/*.ttf

rm $(1)/usr/share/netdata/web/fonts/*.woff

rm $(1)/usr/share/netdata/web/fonts/*.woff2

rm $(1)/usr/share/netdata/web/images/*.png

rm $(1)/usr/share/netdata/web/images/*.gif

rm $(1)/usr/share/netdata/web/images/*.ico

rm $(1)/usr/share/netdata/web/images/*.jpg

rm $(1)/usr/share/netdata/web/images/*.svg

rm $(1)/usr/share/netdata/web/v2/3D_PARTY_LICENSES.txt

rm $(1)/usr/share/netdata/web/v2/LICENSE.md

rm $(1)/usr/share/netdata/web/v2/*.LICENSE.txt

rm -rf $(1)/usr/share/netdata/web/old

rm -rf $(1)/usr/share/netdata/web/v0

rm -rf $(1)/usr/share/netdata/web/v1

rm -rf $(1)/usr/share/netdata/web/static/

rm -rf $(1)/usr/share/netdata/web/css/

endef

$(eval $(call BuildPackage,netdata))

Can someone help giving me a hint?

Thanks a lot!

does it exist ?

The question here is "where"?

In the host system, it doesn't, but in the build environment it does, I even see the staging dirs in the compile command.

It tells you where ?

It's however not listed in the Makefile.

How should I add it to makefile?
I would say it's missing some flag but I'm not sure how to add it.

Does that not cover the directories where the missing library is?

PS. You may want to open an issue/PR and tag maintainers asking for help with the Makefile for the new version.

Sorry for the late reply.

It should cover them, but It says they're missing still :person_shrugging:

I have a PR open:

The maintainers were unfortunately no help, probably busy with something else :confused:

Any other suggestions?