Added JSON-C dependency handling to instlal and packaging. (#8776)
* Add JSON-C dependency handling to instlal and packaging. * Update build failure message.
Austin S. Hemmelgarn committed
Apr 20, 2020 at 19:36 UTC
9b644c6d38d8c91518a80a5c4464471fb5875802
3 files changed
+20
-3
netdata-installer.sh
+6
-1
@@ -441,7 +441,12 @@ You may need to check these:
441
If your system cannot find zlib, although it is installed
442
run me with the option: --libs-are-really-here
443
444
-3. You need basic build tools installed, like:
444
+3. The pacakge json-c-dev (or json-c-devel)has to be installed.
445
+
446
+ If your system cannot find json-c, although it is installed
447
+ run me with the option: --libs-are-really-here
448
+
449
+4. You need basic build tools installed, like:
450
451
gcc make autoconf automake pkg-config
452
netdata.spec.in
+2
-2
@@ -120,7 +120,7 @@ BuildRequires: openssl-devel
120
%if 0%{?suse_version}
121
BuildRequires: judy-devel
122
BuildRequires: liblz4-devel
123
-BuildRequires: json-glib-devel
123
+BuildRequires: libjson-c-devel
124
%else
125
BuildRequires: Judy-devel
126
BuildRequires: lz4-devel
@@ -138,7 +138,7 @@ Requires: zlib
138
# for libuv, Requires version >= 1
139
Requires: libuv1
140
Requires: libJudy1
141
-Requires: json-glib
141
+Requires: libjson-c4
142
Requires: libuuid1
143
%else
144
# for libuv, Requires version >= 1
packaging/installer/install-required-packages.sh
+12
@@ -597,6 +597,17 @@ declare -A pkg_cmake=(
597
['default']="cmake"
598
)
599
600
+declare -A pkg_json_c_dev=(
601
+ ['alpine']="json-c-dev"
602
+ ['arch']="json-c"
603
+ ['clearlinux']="devpkg-json-c"
604
+ ['debian']="libjson-c-dev"
605
+ ['gentoo']="dev-libs/json-c"
606
+ ['sabayon']="dev-libs/json-c"
607
+ ['suse']="libjson-c-devel"
608
+ ['default']="json-c-devel"
609
+)
610
+
611
declare -A pkg_bridge_utils=(
612
['gentoo']="net-misc/bridge-utils"
613
['clearlinux']="network-basic"
@@ -1170,6 +1181,7 @@ packages() {
1181
suitable_package libz-dev
1182
suitable_package libuuid-dev
1183
suitable_package libmnl-dev
1184
+ suitable_package json-c-dev
1185
fi
1186
1187
# -------------------------------------------------------------------------