Can't install Netdata on macOS Catalina 10.15.7

Environment

MacOS Catalina 10.15.7

Problem/Question

I can’t finish the installation by following the recommended procedure using automatic kickstart. It ends with multiple errors.
Below I report the final stage of the installation:

  CC       database/sqlite/sqlite_functions.o
  CC       database/sqlite/sqlite_aclk.o
  CC       database/sqlite/sqlite_health.o
database/sqlite/sqlite_functions.c:1651:5: error: use of undeclared identifier 'EVP_MD_CTX'
    EVP_MD_CTX *evpctx;
    ^
database/sqlite/sqlite_functions.c:1651:17: error: use of undeclared identifier 'evpctx'
    EVP_MD_CTX *evpctx;
                ^
database/sqlite/sqlite_functions.c:1652:30: error: use of undeclared identifier 'EVP_MAX_MD_SIZE'
    unsigned char hash_value[EVP_MAX_MD_SIZE];
                             ^
database/sqlite/sqlite_functions.c:1658:5: error: use of undeclared identifier 'evpctx'
    evpctx = EVP_MD_CTX_create();
    ^
database/sqlite/sqlite_functions.c:1658:14: error: implicit declaration of function 'EVP_MD_CTX_create' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    evpctx = EVP_MD_CTX_create();
             ^
database/sqlite/sqlite_functions.c:1659:5: error: implicit declaration of function 'EVP_DigestInit_ex' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
    ^
database/sqlite/sqlite_functions.c:1659:31: error: implicit declaration of function 'EVP_sha256' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
                              ^
database/sqlite/sqlite_functions.c:1659:23: error: use of undeclared identifier 'evpctx'
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
                      ^
database/sqlite/sqlite_functions.c:1661:5: error: implicit declaration of function 'EVP_DigestUpdate' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    EVP_DigestUpdate(evpctx, st->id, strlen(st->id));
    ^
database/sqlite/sqlite_functions.c:1661:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->id, strlen(st->id));
                     ^
database/sqlite/sqlite_functions.c:1662:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->name, strlen(st->name));
                     ^
database/sqlite/sqlite_functions.c:1663:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->family, strlen(st->family));
                     ^
database/sqlite/sqlite_functions.c:1664:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->context, strlen(st->context));
                     ^
database/sqlite/sqlite_functions.c:1665:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->title, strlen(st->title));
                     ^
database/sqlite/sqlite_functions.c:1666:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->units, strlen(st->units));
                     ^
database/sqlite/sqlite_functions.c:1667:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->plugin_name, strlen(st->plugin_name));
                     ^
database/sqlite/sqlite_functions.c:1669:26: error: use of undeclared identifier 'evpctx'
        EVP_DigestUpdate(evpctx, st->module_name, strlen(st->module_name));
                         ^
database/sqlite/sqlite_functions.c:1671:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, &st->priority, sizeof(st->priority));
                     ^
database/sqlite/sqlite_functions.c:1672:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, &st->chart_type, sizeof(st->chart_type));
                     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [database/sqlite/sqlite_functions.o] Error 1
make[2]: *** Waiting for unfinished jobs....
database/sqlite/sqlite_health.c:898:5: error: use of undeclared identifier 'EVP_MD_CTX'
    EVP_MD_CTX *evpctx;
    ^
database/sqlite/sqlite_health.c:898:17: error: use of undeclared identifier 'evpctx'
    EVP_MD_CTX *evpctx;
                ^
database/sqlite/sqlite_health.c:899:30: error: use of undeclared identifier 'EVP_MAX_MD_SIZE'
    unsigned char hash_value[EVP_MAX_MD_SIZE];
                             ^
database/sqlite/sqlite_health.c:901:5: error: use of undeclared identifier 'evpctx'
    evpctx = EVP_MD_CTX_create();
    ^
database/sqlite/sqlite_health.c:901:14: error: implicit declaration of function 'EVP_MD_CTX_create' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    evpctx = EVP_MD_CTX_create();
             ^
database/sqlite/sqlite_health.c:902:5: error: implicit declaration of function 'EVP_DigestInit_ex' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
    ^
database/sqlite/sqlite_health.c:902:31: error: implicit declaration of function 'EVP_sha256' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
                              ^
database/sqlite/sqlite_health.c:902:23: error: use of undeclared identifier 'evpctx'
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
                      ^
database/sqlite/sqlite_health.c:904:5: error: implicit declaration of function 'EVP_DigestUpdate' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    DIGEST_ALERT_CONFIG_VAL(cfg->alarm);
    ^
database/sqlite/sqlite_health.c:893:43: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                          ^
database/sqlite/sqlite_health.c:904:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:60: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                           ^
database/sqlite/sqlite_health.c:904:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:105: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                                                                        ^
database/sqlite/sqlite_health.c:905:5: error: use of undeclared identifier 'evpctx'
    DIGEST_ALERT_CONFIG_VAL(cfg->template_key);
    ^
database/sqlite/sqlite_health.c:893:60: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                           ^
database/sqlite/sqlite_health.c:905:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:105: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                                                                        ^
database/sqlite/sqlite_health.c:906:5: error: use of undeclared identifier 'evpctx'
    DIGEST_ALERT_CONFIG_VAL(cfg->os);
    ^
database/sqlite/sqlite_health.c:893:60: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                           ^
database/sqlite/sqlite_health.c:906:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:105: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                                                                        ^
database/sqlite/sqlite_health.c:907:5: error: use of undeclared identifier 'evpctx'
    DIGEST_ALERT_CONFIG_VAL(cfg->host);
    ^
database/sqlite/sqlite_health.c:893:60: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                           ^
database/sqlite/sqlite_health.c:907:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:105: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                                                                        ^
database/sqlite/sqlite_health.c:908:5: error: use of undeclared identifier 'evpctx'
    DIGEST_ALERT_CONFIG_VAL(cfg->on);
    ^
database/sqlite/sqlite_health.c:893:60: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                           ^
database/sqlite/sqlite_health.c:908:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:105: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                                                                        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [database/sqlite/sqlite_health.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
 FAILED   

 FAILED 

 ABORTED  netdata-installer.sh exited with error

What I expected to happen

Finish the Netdata installation

Hi @liuk4friends !! Welcome!!

I assume that this is on a x86 mac, right? (Because of Catalina).

Have you installed some required brew packages?

1 Like

Yes, through brew I should already have installed all the necessary packages

There is also an error in the initial installation step. I report it below:

Risoluzione di my-netdata.io (my-netdata.io)... 104.21.13.159, 172.67.156.192
Connessione a my-netdata.io (my-netdata.io)|104.21.13.159|:443... connesso.
Richiesta HTTP inviata, in attesa di risposta... 200 OK
Lunghezza: non specificato [application/octet-stream]
Salvataggio in: «/tmp/netdata-kickstart.sh»

/tmp/netdata-kickstart.sh                 [ <=>                                                                     ]  43,30K  --.-KB/s    in 0,01s   

2022-01-20 17:33:50 (3,86 MB/s) - «/tmp/netdata-kickstart.sh» salvato [44342]


 --- Using /var/folders/gj/rc406xgn2_74t5jpc7326bsm0000gs/T/netdata-kickstart-XXXXXXXXXX.rRjlfAMz as a temporary directory. --- 
 --- No existing installations of netdata found, assuming this is a fresh install. --- 
 --- Fetching script to detect required packages... --- 
[/var/folders/gj/rc406xgn2_74t5jpc7326bsm0000gs/T/netdata-kickstart-XXXXXXXXXX.rRjlfAMz]$ curl -q -sSL --connect-timeout 10 --retry 3 --output /var/folders/gj/rc406xgn2_74t5jpc7326bsm0000gs/T/netdata-kickstart-XXXXXXXXXX.rRjlfAMz/install-required-packages.sh https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/install-required-packages.sh 
 OK 

 --- Running downloaded script to detect required packages... --- 
[/var/folders/gj/rc406xgn2_74t5jpc7326bsm0000gs/T/netdata-kickstart-XXXXXXXXXX.rRjlfAMz]$ /bin/bash /var/folders/gj/rc406xgn2_74t5jpc7326bsm0000gs/T/netdata-kickstart-XXXXXXXXXX.rRjlfAMz/install-required-packages.sh netdata 
Sorry! This script needs BASH version 4+, but you have BASH version 3.2.57(1)-release
 FAILED 

 WARNING  It failed to install all the required packages, but installation might still be possible.

Something about the BASH version…

This below is from ‘brew info netdata’ :

netdata: stable 1.29.3 (bottled)
Diagnose infrastructure problems with metrics, visualizations & alarms
https://netdata.cloud/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/netdata.rb
License: GPL-3.0-or-later
==> Dependencies
Build: autoconf ✔, automake ✔, pkg-config ✔
Required: json-c ✔, libuv ✔, lz4 ✔, openssl@1.1 ✔
==> Caveats
To restart netdata after an upgrade:
  brew services restart netdata
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/netdata/sbin/netdata -D
==> Analytics
install: 168 (30 days), 511 (90 days), 4,216 (365 days)
install-on-request: 168 (30 days), 511 (90 days), 4,214 (365 days)
build-error: 0 (30 days)
mediaserver@Mac-mini-di-Luca local % brew info netdata

required packages seem ok
all are green

… and below you can find what I see with ‘brew info bash’ :

bash: stable 5.1.16 (bottled), HEAD
Bourne-Again SHell, a UNIX command interpreter
https://www.gnu.org/software/bash/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/bash.rb
License: GPL-3.0-or-later
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 42,296 (30 days), 110,764 (90 days), 323,940 (365 days)
install-on-request: 35,042 (30 days), 91,449 (90 days), 271,471 (365 days)
build-error: 35 (30 days)

Should I install this version of bash ?

Hey there!

No need to install newer bash, should work properly with existing one. Although you can try brew install bash, probably you’ll get rid of this error.

Thanks,
Costas

1 Like

thank you,
and what about sqlite errors?

It’s related with openssl.

οpenssl@1.1 is keg-only, which means it was not symlinked into /usr/local, because macOS provides LibreSSL. So installing another version in parallel can cause all kinds of trouble.

To have openssl@1.1 first in your PATH, run:

echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

or a simplified version / for testing, may be

cd /usr/local/include 
ln -s ../opt/openssl/include/openssl .

Thanks,
Costas

1 Like

thank you @copi
I followed your suggestions but I had no luck.
In the beginning I’ve tried:

cd /usr/local/include 
ln -s ../opt/openssl/include/openssl .

Then:

echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

After both attempts the installation failed with those sqlite related errors.

So I’ve installed last version of bash (with brew) but netdata’s installation continued to fail.

Now I can see a new error in the very beginning of installation. You can read it below:

Searching for libelf ...

The following command will be run:

 >> IMPORTANT << 
    Please make sure your system is up to date
    by running:  brew upgrade 

brew install autoconf-archive autogen cmake json-c-devel 


Press ENTER to run it > 
brew install autoconf-archive autogen cmake json-c-devel 
==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 617088, done.
remote: Total 617088 (delta 0), reused 0 (delta 0), pack-reused 617088
Receiving objects: 100% (617088/617088), 282.52 MiB | 5.39 MiB/s, done.
Resolving deltas: 100% (436417/436417), done.
Updating files: 100% (4022/4022), done.
Tapped 3962 casks (4,033 files, 302.3MB).
Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
Warning: No available formula with the name "json-c-devel".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.



We are very sorry!

Installation of required packages failed.

What to do now:

  1. Make sure your system is updated.
     Most of the times, updating your system will resolve the issue.

  2. If the error message is about a specific package, try removing
     that package from the command and run it again.
     Depending on the broken package, you may be able to continue.

  3. Let us know. We may be able to help.
     Open a github issue with the above log, at:

           https://github.com/netdata/netdata/issues


 FAILED 

 WARNING  It failed to install all the required packages, but installation might still be possible.

Below the sqlite errors that stop the installation process:

  CC       database/sqlite/sqlite_functions.o
  CC       database/sqlite/sqlite_aclk.o
  CC       database/sqlite/sqlite_health.o
database/sqlite/sqlite_functions.c:1651:5: error: use of undeclared identifier 'EVP_MD_CTX'
    EVP_MD_CTX *evpctx;
    ^
database/sqlite/sqlite_functions.c:1651:17: error: use of undeclared identifier 'evpctx'
    EVP_MD_CTX *evpctx;
                ^
database/sqlite/sqlite_health.c:898:5: error: use of undeclared identifier 'EVP_MD_CTX'
    EVP_MD_CTX *evpctx;
    ^
database/sqlite/sqlite_health.c:898:17: error: use of undeclared identifier 'evpctx'
    EVP_MD_CTX *evpctx;
                ^
database/sqlite/sqlite_functions.c:1652:30: error: use of undeclared identifier 'EVP_MAX_MD_SIZE'
    unsigned char hash_value[EVP_MAX_MD_SIZE];
                             ^
database/sqlite/sqlite_functions.c:1658:5: error: use of undeclared identifier 'evpctx'
    evpctx = EVP_MD_CTX_create();
    ^
database/sqlite/sqlite_functions.c:1658:14: error: implicit declaration of function 'EVP_MD_CTX_create' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    evpctx = EVP_MD_CTX_create();
             ^
database/sqlite/sqlite_health.c:899:30: error: use of undeclared identifier 'EVP_MAX_MD_SIZE'
    unsigned char hash_value[EVP_MAX_MD_SIZE];
                             ^
database/sqlite/sqlite_health.c:901:5: error: use of undeclared identifier 'evpctx'
    evpctx = EVP_MD_CTX_create();
    ^
database/sqlite/sqlite_health.c:901:14: error: implicit declaration of function 'EVP_MD_CTX_create' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    evpctx = EVP_MD_CTX_create();
             ^
database/sqlite/sqlite_functions.c:1659:5: error: implicit declaration of function 'EVP_DigestInit_ex' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
    ^
database/sqlite/sqlite_functions.c:1659:31: error: implicit declaration of function 'EVP_sha256' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
                              ^
database/sqlite/sqlite_health.c:902:5: error: implicit declaration of function 'EVP_DigestInit_ex' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
    ^
database/sqlite/sqlite_functions.c:1659:23: error: use of undeclared identifier 'evpctx'
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
                      ^
database/sqlite/sqlite_functions.c:1661:5: error: implicit declaration of function 'EVP_DigestUpdate' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    EVP_DigestUpdate(evpctx, st->id, strlen(st->id));
    ^
database/sqlite/sqlite_functions.c:1661:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->id, strlen(st->id));
                     ^
database/sqlite/sqlite_functions.c:1662:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->name, strlen(st->name));
                     ^
database/sqlite/sqlite_health.c:902:31: error: implicit declaration of function 'EVP_sha256' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
                              ^
database/sqlite/sqlite_functions.c:1663:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->family, strlen(st->family));
                     ^
database/sqlite/sqlite_functions.c:1664:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->context, strlen(st->context));
                     ^
database/sqlite/sqlite_functions.c:1665:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->title, strlen(st->title));
                     ^
database/sqlite/sqlite_health.c:902:23: error: use of undeclared identifier 'evpctx'
    EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
                      ^
database/sqlite/sqlite_health.c:904:5: error: implicit declaration of function 'EVP_DigestUpdate' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    DIGEST_ALERT_CONFIG_VAL(cfg->alarm);
    ^
database/sqlite/sqlite_health.c:893:43: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                          ^
database/sqlite/sqlite_functions.c:1666:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->units, strlen(st->units));
                     ^
database/sqlite/sqlite_functions.c:1667:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, st->plugin_name, strlen(st->plugin_name));
                     ^
database/sqlite/sqlite_functions.c:1669:26: error: use of undeclared identifier 'evpctx'
        EVP_DigestUpdate(evpctx, st->module_name, strlen(st->module_name));
                         ^
database/sqlite/sqlite_health.c:904:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:60: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                           ^
database/sqlite/sqlite_health.c:904:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:105: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                                                                        ^
database/sqlite/sqlite_health.c:905:5: error: use of undeclared identifier 'evpctx'
    DIGEST_ALERT_CONFIG_VAL(cfg->template_key);
    ^
database/sqlite/sqlite_health.c:893:60: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                           ^
database/sqlite/sqlite_functions.c:1671:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, &st->priority, sizeof(st->priority));
                     ^
database/sqlite/sqlite_functions.c:1672:22: error: use of undeclared identifier 'evpctx'
    EVP_DigestUpdate(evpctx, &st->chart_type, sizeof(st->chart_type));
                     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
database/sqlite/sqlite_health.c:905:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:105: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                                                                        ^
database/sqlite/sqlite_health.c:906:5: error: use of undeclared identifier 'evpctx'
    DIGEST_ALERT_CONFIG_VAL(cfg->os);
    ^
database/sqlite/sqlite_health.c:893:60: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                           ^
database/sqlite/sqlite_health.c:906:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:105: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                                                                        ^
database/sqlite/sqlite_health.c:907:5: error: use of undeclared identifier 'evpctx'
    DIGEST_ALERT_CONFIG_VAL(cfg->host);
    ^
database/sqlite/sqlite_health.c:893:60: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                           ^
20 errors generated.
database/sqlite/sqlite_health.c:907:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:105: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                                                                        ^
database/sqlite/sqlite_health.c:908:5: error: use of undeclared identifier 'evpctx'
    DIGEST_ALERT_CONFIG_VAL(cfg->on);
    ^
database/sqlite/sqlite_health.c:893:60: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                           ^
database/sqlite/sqlite_health.c:908:5: error: use of undeclared identifier 'evpctx'
database/sqlite/sqlite_health.c:893:105: note: expanded from macro 'DIGEST_ALERT_CONFIG_VAL'
#define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1))
                                                                                                        ^
make[2]: *** [database/sqlite/sqlite_functions.o] Error 1
make[2]: *** Waiting for unfinished jobs....
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [database/sqlite/sqlite_health.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
 FAILED   

 FAILED 

 ABORTED  netdata-installer.sh exited with error

Password:

I wonder how I could upload here the entire log…

Hi @liuk4friends

You can use https://pastebin.com/ . If it is possible, please upload there the complete build log, and send us the link here.

Thanks!

1 Like

Hi @Manolis_Vasilakis ,

here is the pastebin link:
https://pastebin.com/QM93e4vw

thank you in advance

So, it seems that it doesn’t pick up the path for the includes and libraries for OpenSSL, installed by brew.

We typically expect on a x86 mac to be located in /usr/local/opt/openssl/include and the libs to use for link in /usr/local/opt/openssl@1.1/lib.

This is where the installer tries to locate them, but you can override it, lets try:

Try to prepend the kickstart command with a CFLAGS and LDFLAGS with the paths that the include files and libraries live. An example would be:

`CFLAGS="-I /usr/local/opt/include/ -I /usr/local/opt/openssl/include/" LDFLAGS="-L /opt/homebrew/lib/ -L /usr/local/opt/openssl@1.1/lib" curl https://my-net

Again, you may need to adjust for the correct paths on your machine. Please don’t add another openssl after the include. There should also be a symlink openssl to openssl@1.1. Whatever you use should be fine. If the symlink is missing, then you can use `openssl@1.1’.

Also note that recently brew has been shipping Openssl 3, and that would be installed under openssl@3 or similar. You can use that as well, adjusting the paths above.

I’m assuming that either the symlink /usr/local/opt/openssl is missing, and openssl@3 is installed. Can you please paste an ls /usr/local/opt/ ?

Thanks!!

1 Like

thank you @Manolis_Vasilakis for your suggestion but unfortunately I had no luck.

I’ve tried your example:

CFLAGS="-I /usr/local/opt/include/ -I /usr/local/opt/openssl/include/" LDFLAGS="-L /opt/homebrew/lib/ -L /usr/local/opt/openssl@1.1/lib" wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh

The installation continues to fail as before. It seems to me that the errors are the same.

In the link below you can find the new log
Netdata failed build log #2

The output of ls /usr/local/opt/ is instead the following:

ls /usr/local/opt/
autoconf	     cmake		libunistring	lz4		       ossp-uuid
autoconf@2.71  	 gettext	libusb		    m4		       pkg-config
automake	     json-c		libusb-compat	make		   pkgconfig
bash		     libidn2	libuv		    nut		       wget
ca-certificates	 libtool	lsusb		    openssl@1.1	   zlib

Thank you again…

P.S.
If I can’t use the official installer what do you think about installing Netdata with Homebrew?

Hi! Can you try with CFLAGS="-I /usr/local/opt/include/ -I /usr/local/opt/openssl@1.1/include/" LDFLAGS="-L /opt/homebrew/lib/ -L /usr/local/opt/openssl@1.1/lib" one more try please?

Sometimes (we need to look when exactly) brew creates a symlink to openssl@1.1 under there. It’s not now, I think because of the way openssl was installed at first. If you specify brew install openssl it will, but with brew install openssl@1.1 it wont…

Let’s try the above, it should be able to compile … :slight_smile: Thanks for all your patience!!

1 Like

First of all, thank you @Manolis_Vasilakis for your kind attention.
Unfortunately, I wasn’t able to install Netdata.
I made two attempts.

The first by following your suggestion without changing anything.

The second time I made a small change for the CFLAGS= value.
In fact, I realized that the include folder is not inside the opt folder but in local.

So I made the following attempt:

CFLAGS="-I /usr/local/include/ -I /usr/local/opt/openssl/include/" LDFLAGS="-L /opt/homebrew/lib/ -L /usr/local/opt/openssl@1.1/lib" wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh

The installation, in both cases, ended with the same errors as the previous tests.

I noticed another difference in the folder path.
In fact, the Homebrew folder is not found in the / opt folder but in / usr / local /.
Also, the Homebrew folder does not contain a lib folder.

However, I have not made any other tests. Not being a linux user I don’t have the necessary knowledge on folder paths, their meaning, permissions, etcetera etcetera.

I trust in your preparation and in your patience :pray:

Please try
CFLAGS="-I/usr/local/opt/openssl@1.1/include/" LDFLAGS="-L/usr/local/opt/openssl@1.1/lib" wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh

1 Like

hi @vlvkobal
I’m sorry but no luck!

The installation fails with the same errors as before.
I am attaching the log file which seems to me a bit longer than the previous ones

Netdata failed build log #3

It seems like an impossible challenge

Please do

brew list | grep ssl
brew --prefix --install openssl@1.1

what is the output?

1 Like

here we are…

Mac-mini-di-Luca:~ admin$ brew list | grep ssl
openssl@1.1

Mac-mini-di-Luca:~ admin$ brew --prefix --install openssl@1.1
/usr/local/opt/openssl@1.1

Hi @liuk4friends don’t worry, we’ll get it, we like such things :slight_smile:

Ok, it seems that the CFLAGS and LDFLAGS that we ask you to specify are lost when it comes to the configure part (line 475 in your log). Basically what we do with those 2 is to tell the compiler that it can search those paths for C include files and libraries (in your case for openssl).

It might be that the flags are lost, because of the way the rest of the command is run:

CFLAGS="-I/usr/local/opt/openssl@1.1/include/" LDFLAGS="-L/usr/local/opt/openssl@1.1/lib" wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh

The && part might be the trouble.

If you can please could you try the following approach?:

  1. Download the kickstart script in it’s own command, i.e:

wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh

And then run it, and use the CFLAGS/LDFLAGS, ie.:

CFLAGS="-I/usr/local/opt/openssl@1.1/include/" LDFLAGS="-L/usr/local/opt/openssl@1.1/lib" sh /tmp/netdata-kickstart.sh

Thank you!

1 Like