Skip to content

Add libjson version check on configure to fix build error#131

Merged
igaw merged 1 commit intolinux-nvme:masterfrom
sc108-lee:fix/json-c
Dec 9, 2021
Merged

Add libjson version check on configure to fix build error#131
igaw merged 1 commit intolinux-nvme:masterfrom
sc108-lee:fix/json-c

Conversation

@sc108-lee
Copy link
Copy Markdown
Contributor

json_util_get_last_err, json_object_to_fd are supported from json-c-0.13-20171207
if json-c version is lower than 0.13, build without it

Signed-off-by: Steven Seungcheol Lee sc108.lee@samsung.com

if not checking the version, make will be failed with below for lower version of json-c

/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../src//libnvme.a(json.ol): in function json_read_config': /root/Desktop/repo/libnvme_upstream/src/nvme/json.c:164: undefined reference to json_util_get_last_err'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../src//libnvme.a(json.ol): in function json_update_config': /root/Desktop/repo/libnvme_upstream/src/nvme/json.c:290: undefined reference to json_object_to_fd'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: /root/Desktop/repo/libnvme_upstream/src/nvme/json.c:295: undefined reference to json_util_get_last_err' /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: /root/Desktop/repo/libnvme_upstream/src/nvme/json.c:295: undefined reference to json_util_get_last_err'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:29: test] Error 1

json_util_get_last_err, json_object_to_fd are supported from json-c-0.13-20171207
if json-c version is lower than 0.13, build without it

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
@igaw
Copy link
Copy Markdown
Collaborator

igaw commented Dec 9, 2021

Makes sense, for the meson build we set the min version to 0.13 too.

@sc108-lee sc108-lee deleted the fix/json-c branch September 5, 2023 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants