Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netdata: update to the latest version #22677

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tiagogaspar8
Copy link
Contributor

Maintainer: Josef Schlehofer [email protected], Daniel Engberg [email protected]
Compile tested: x86 Fedora
Run tested: Ax3600

Description:

Update netdata to the latest version.

This has an issue where the logs aren't logged to the syslog, but the access logs can log to the syslog... If anyone has any idea why this might be happening let me know.

@BKPepe
Copy link
Member

BKPepe commented Nov 21, 2023

CI is failing, but I wonder. Could you compare the size between the old version and the latest one? I believe the latest one is so huge.

@diizzyy
Copy link
Contributor

diizzyy commented Nov 25, 2023

Yeah, there's going to be quite a difference in size

@BKPepe
Copy link
Member

BKPepe commented Dec 18, 2023

ping @tiagogaspar8 otherwise I will close this.

@tiagogaspar8
Copy link
Contributor Author

I'm sorry I've been absent, I will see about the reported questions this week, please bear with me.
Thanks.

@tiagogaspar8
Copy link
Contributor Author

Hi everyone,

Thanks for your patience.

Comparing ipkg sizes:

  • current: ~7.7MB
  • new: ~12.8MB

Regarding the build failures I need to take a look, I haven't had the chance.
Regarding the syslog I need to test with a newer version, though I doubt it will do any difference.

Thanks.

@tiagogaspar8
Copy link
Contributor Author

I was trying to build with version 1.44.1 and I'm getting this:

make[5]: Entering directory '/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.44.1'
aarch64-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I.   -DVARLIB_DIR="\"/var/lib/netdata\"" 	-DCACHE_DIR="\"/var/cache/netdata\"" 	-DCONFIG_DIR="\"/etc/netdata\"" 	-DLIBCONFIG_DIR="\"/usr/lib/netdata/conf.d\"" 	-DLOG_DIR="\"/var/log/netdata\"" 	-DPLUGINS_DIR="\"/usr/lib/netdata/plugins.d\"" 	-DRUN_DIR="\"/var/run/netdata\"" 	-DWEB_DIR="\"/usr/share/netdata/web\""    -I/mnt/openwrt/ss_mod/staging_dir/target-aarch64_cortex-a53_musl/usr/include -I/mnt/openwrt/ss_mod/staging_dir/target-aarch64_cortex-a53_musl/usr/include/uuid           -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.44.1=netdata-v1.44.1 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3  -fexceptions         -I/mnt/openwrt/ss_mod/staging_dir/target-aarch64_cortex-a53_musl/usr/include -I/mnt/openwrt/ss_mod/staging_dir/target-aarch64_cortex-a53_musl/usr/include/uuid                         -I /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.44.1/libnetdata/libjudy/src          -fstack-clash-protection -mbranch-protection=standard -c -o aclk/aclk_util.o aclk/aclk_util.c
aclk/aclk_util.c: In function 'base64_encode_helper':
aclk/aclk_util.c:466:5: error: unknown type name 'EVP_ENCODE_CTX'
  466 |     EVP_ENCODE_CTX *ctx = EVP_ENCODE_CTX_new();
      |     ^~~~~~~~~~~~~~
aclk/aclk_util.c:466:27: warning: implicit declaration of function 'EVP_ENCODE_CTX_new' [-Wimplicit-function-declaration]
  466 |     EVP_ENCODE_CTX *ctx = EVP_ENCODE_CTX_new();
      |                           ^~~~~~~~~~~~~~~~~~
aclk/aclk_util.c:466:27: warning: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
aclk/aclk_util.c:467:5: warning: implicit declaration of function 'EVP_EncodeInit' [-Wimplicit-function-declaration]
  467 |     EVP_EncodeInit(ctx);
      |     ^~~~~~~~~~~~~~
aclk/aclk_util.c:468:5: warning: implicit declaration of function 'EVP_EncodeUpdate' [-Wimplicit-function-declaration]
  468 |     EVP_EncodeUpdate(ctx, str, outl, in, in_len);
      |     ^~~~~~~~~~~~~~~~
aclk/aclk_util.c:470:5: warning: implicit declaration of function 'EVP_EncodeFinal' [-Wimplicit-function-declaration]
  470 |     EVP_EncodeFinal(ctx, str, &len);
      |     ^~~~~~~~~~~~~~~
aclk/aclk_util.c:482:5: warning: implicit declaration of function 'EVP_ENCODE_CTX_free' [-Wimplicit-function-declaration]
  482 |     EVP_ENCODE_CTX_free(ctx);
      |     ^~~~~~~~~~~~~~~~~~~
make[5]: *** [Makefile:8372: aclk/aclk_util.o] Error 1
make[5]: Leaving directory '/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.44.1'
make[4]: *** [Makefile:10843: all-recursive] Error 1
make[4]: Leaving directory '/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.44.1'
make[3]: *** [Makefile:5092: all] Error 2
make[3]: Leaving directory '/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.44.1'
make[2]: *** [Makefile:109: /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-v1.44.1/.built] Error 2
make[2]: Leaving directory '/mnt/openwrt/ss_mod/feeds/packages/admin/netdata'
time: package/feeds/packages/netdata/compile#12.06#3.41#15.39
    ERROR: package/feeds/packages/netdata failed to build.

Any suggestions?

@tiagogaspar8 tiagogaspar8 deleted the netdata-update branch February 10, 2024 23:43
@tiagogaspar8 tiagogaspar8 restored the netdata-update branch February 11, 2024 11:36
@tiagogaspar8 tiagogaspar8 reopened this Feb 11, 2024
@tiagogaspar8
Copy link
Contributor Author

Adding this here for reference:
https://forum.openwrt.org/t/compiling-error/193090/5

If anyone has a suggestion on how to fix this let me know.

openwrtdiy added a commit to openwrtdiy/packages that referenced this pull request Jun 1, 2024
Update netdata to the latest version.

Pull openwrt#22677
Discussion https://forum.openwrt.org/t/compiling-error/193090

Signed-off-by: Tiago Gaspar <[email protected]>
openwrtdiy added a commit to openwrtdiy/packages that referenced this pull request Sep 10, 2024
@tiagogaspar8
Copy link
Contributor Author

tiagogaspar8 commented Nov 7, 2024

Hi @BKPepe and @diizzyy,
I have some updates on this PR.

I was able to compile successfully netdata on the version 1.47.5 without ACLK.
ACLK is netdata's sw piece that connects with the cloud to sync dashboard info.
(I also needed to update protobuf yet that will come if I get netdata compiling in a way that can be upstreamed.)

This all sounds great, but netdata 2.0.0 was just released, and it is now mandatory to have ACLK, so now it won't build.

The error I get is this:

[121/440] cd /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-2.0.0 && /mnt/openwrt/ss_mod/staging_dir/target-aarch64_cortex-a53_musl/usr/bin/protoc-28.3.0 -I/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-2.0.0/src/aclk/aclk-schemas --cpp_out=/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-2.0.0/src/aclk/aclk-schemas /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-2.0.0/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-2.0.0/src/aclk/aclk-schemas/proto/aclk/v1/lib.pb.cc /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-2.0.0/src/aclk/aclk-schemas/proto/aclk/v1/lib.pb.h 
cd /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-2.0.0 && /mnt/openwrt/ss_mod/staging_dir/target-aarch64_cortex-a53_musl/usr/bin/protoc-28.3.0 -I/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-2.0.0/src/aclk/aclk-schemas --cpp_out=/mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-2.0.0/src/aclk/aclk-schemas /mnt/openwrt/ss_mod/build_dir/target-aarch64_cortex-a53_musl/netdata-2.0.0/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

And I think I narrowed it down to this function:
https://github.com/netdata/netdata/blob/v2.0.0/packaging/cmake/Modules/NetdataProtobuf.cmake#L174
this is where netdata calls protobuf to compile the aclk schemas, and it doesn't seem to be linking the libraries correctly.

If you can provide any help here it would be much appreciated, I need guidance on where this might go since I've now hit a roadblock that I won't move past without the help of someone who knows how to code.

Thanks!

Update netdata to the latest version.
Further work will be done to toggle features on and off.

Co-authored-by: Aditya Nugraha
Signed-off-by: Tiago Gaspar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants