Cannot Manually Build with JSON-C support on Oracle Linux 7.9

Problem

Building 1.39 from source fails to build with JSON-C support

Following these instruction:

including the section on preparing JSON-C

I have also tried installing the JSON-C package available from yum:

Installed Packages
Name        : json-c
Arch        : x86_64
Version     : 0.11
Release     : 4.el7_0
Size        : 64 k
Repo        : installed
From repo   : anaconda
Summary     : A JSON implementation in C
URL         : https://github.com/json-c/json-c/wiki
License     : MIT
Description : JSON-C implements a reference counting object model that allows you to easily
            : construct JSON objects in C, output them as JSON formatted strings and parse
            : JSON formatted strings back into the C representation of JSON objects.

But the installer always exits with the following:



  - Command 'eval env CFLAGS='-fPIC -pipe' CXXFLAGS='-fPIC -pipe' LDFLAGS= cmake -DBUILD_SHARED_LIBS=OFF .' failed with exit code 1.
  -
  - Command 'eval env CFLAGS='-fPIC -pipe' CXXFLAGS='-fPIC -pipe' LDFLAGS= make -j4' failed with exit code 2.
  -
  - Command 'cp /tmp/netdata-jsonc-qAM1mq/json-c-json-c-0.14-20200419/libjson-c.a /home/usename/netdata/externaldeps/jsonc/libjson-c.a' failed with exit code 1.
  - Failed to build JSON-C, Netdata Cloud support will be disabled in this build.
cat /etc/redhat-release                  
Red Hat Enterprise Linux Server release 7.9 (Maipo)

cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="7.9"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Oracle Linux Server 7.9"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:9:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/" 

What I expected to happen

Build Success

Hi @bergc !

Can you try again but this time installing the json-c-devel package?

Thanks!

Hey @Manolis_Vasilakis,

I installed json-c-devel and the build fails on --- **Compile netdata** --- with the following error: make: *** No rule to make target httpd/h2o/lib/http2/.deps/libh2o_a-stream.Po'. Stop.

json-c-devel info:

~/netdata (master) » sudo yum info json-c-devel           
Loaded plugins: langpacks, ulninfo
Installed Packages
Name        : json-c-devel
Arch        : x86_64
Version     : 0.11
Release     : 4.el7_0
Size        : 51 k
Repo        : installed
Summary     : Development headers and library for json-c
URL         : https://github.com/json-c/json-c/wiki
License     : MIT
Description : This package contains the development headers and library for json-c.

Ok, thanks. h2o was just added today, so it’s a new dependency, can you try a git submodule update --init --recursive --force ?

Running that command produces:

~/netdata (master) » git submodule update --init --recursive --force
Submodule path 'aclk/aclk-schemas': checked out 'd3a5c636b6dacf364834f2ba99ce0170c71ef861'
Submodule path 'httpd/h2o': checked out '7359e98d78d018a35f5da7523feac69f64eddb4b'
Submodule path 'httpd/h2o/misc/cache-digest.js': checked out '1d982ed25eb15f41e78f614e67ad086c6bfe4af1'
Submodule path 'httpd/h2o/misc/oktavia': checked out '25b615f5bc0902b9107e3ffc1178ec6bf768b0ad'
Submodule path 'httpd/h2o/misc/p5-Server-Starter': checked out 'a0c10e5a5ca48cbb85150be0a8abcb43acb457b8'
Submodule path 'httpd/h2o/misc/picotemplate': checked out '55d6d242ae1e00ddf16199e15b1acaf6d5c84e42'
Submodule path 'ml/dlib': checked out '021cbbb1c2ddec39d8dd4cb6abfbbafdf1cf4482'
Submodule path 'mqtt_websockets': checked out '684fa17afb14ef5a46dde18802548615fdd441ac'
Submodule path 'mqtt_websockets/c-rbuf': checked out '51485be511f8c1d592b699f09f7c783aa2270375'
Submodule path 'mqtt_websockets/c_rhash': checked out 'f6c21836b921535ab818c7f72b77346d25f60d8e'

However running sudo ./netdata-installer.sh --enable-ml still fails with the same error.

So what I’m really after is getting v1.39 installed and being able to connect with Netdata Cloud, I went back and ran git checkout v1.39.0 and the sudo ./netdata-installer.sh --enable-ml is now successful. I’m assuming that was fixed by installing json-c-devel but am not 100% certain.

I think this can be considered resolved as I am not trying to build the most recent version available on master.

Thanks for your help @Manolis_Vasilakis!

You are welcome! Enjoy Netdata!