During the build ucode on Ubuntu 20.04 with older jcon-c version (#define JSON_C_VERSION "0.13.1") which doesn't have some APIs:
-- Looking for json_tokener_get_parse_end
-- Looking for json_tokener_get_parse_end - not found
-- Looking for json_object_new_array_ext
-- Looking for json_object_new_array_ext - not found
-- Looking for json_object_new_uint64
-- Looking for json_object_new_uint64 - not found
build is failed like this
[ 21%] Building C object CMakeFiles/io_lib.dir/lib/io.c.o
Scanning dependencies of target resolv_lib
[ 23%] Building C object CMakeFiles/resolv_lib.dir/lib/resolv.c.o
/tmp/ucode-src/lib.c: In function 'uc_json_from_object':
/tmp/ucode-src/lib.c:3689:13: error: implicit declaration of function 'json_tokener_get_parse_end'; did you mean 'json_tokener_parse_ex'? [-Werror=implicit-function-declaration]
3689 | json_tokener_get_parse_end(tok) < (size_t)printbuf_length(buf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| json_tokener_parse_ex
/tmp/ucode-src/lib.c:3689:45: error: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Werror=sign-compare]
3689 | json_tokener_get_parse_end(tok) < (size_t)printbuf_length(buf));
| ^
/tmp/ucode-src/lib.c:3697:45: error: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Werror=sign-compare]
3697 | json_tokener_get_parse_end(tok) < ucv_string_length(rbuf));
| ^
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/libucode.dir/build.make:76: CMakeFiles/libucode.dir/lib.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:242: CMakeFiles/libucode.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
For Ubuntu 24.04 with JSON_C_VERSION "0.15" which has required APIs build is fine.
During the build ucode on Ubuntu 20.04 with older jcon-c version (#define JSON_C_VERSION "0.13.1") which doesn't have some APIs:
build is failed like this
For Ubuntu 24.04 with JSON_C_VERSION "0.15" which has required APIs build is fine.