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/"
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.
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.