Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 723232 - sys-fs/cryptsetup-2.2.2: Failed to build with dev-libs/json-c >= 0.14
Summary: sys-fs/cryptsetup-2.2.2: Failed to build with dev-libs/json-c >= 0.14
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 723234
Blocks: CVE-2020-12762
  Show dependency tree
 
Reported: 2020-05-15 11:39 UTC by David
Modified: 2020-05-15 18:12 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2020-05-15 11:39:24 UTC
Now that dev-libs/json-c-0.14-r2 is table, sys-fs/cryptsetup failed to be builded/rebuilded

We need to apply upstream patch

https://gitlab.com/cryptsetup/cryptsetup/-/commit/604abec333a0efb44fd8bc610aa0b1151dd0f612

Reproducible: Always

Actual Results:  
In file included from lib/luks2/luks2_disk_metadata.c:24:
lib/luks2/luks2_internal.h:62:10: error: conflicting types for ‘json_object_get_uint64’
   62 | uint64_t json_object_get_uint64(json_object *jobj);
      |          ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/json-c/json.h:27,
                 from lib/luks2/luks2_internal.h:28,
                 from lib/luks2/luks2_disk_metadata.c:24:
/usr/include/json-c/json_object.h:725:22: note: previous declaration of ‘json_object_get_uint64’ was here
  725 | JSON_EXPORT uint64_t json_object_get_uint64(const struct json_object *obj);
      |                      ^~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:2041: lib/luks2/libcryptsetup_la-luks2_disk_metadata.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from lib/luks2/luks2_json_format.c:22:
lib/luks2/luks2_internal.h:62:10: error: conflicting types for ‘json_object_get_uint64’
   62 | uint64_t json_object_get_uint64(json_object *jobj);
      |          ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/json-c/json.h:27,
                 from lib/luks2/luks2_internal.h:28,
                 from lib/luks2/luks2_json_format.c:22:
/usr/include/json-c/json_object.h:725:22: note: previous declaration of ‘json_object_get_uint64’ was here
  725 | JSON_EXPORT uint64_t json_object_get_uint64(const struct json_object *obj);
      |                      ^~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:2048: lib/luks2/libcryptsetup_la-luks2_json_format.lo] Error 1
In file included from lib/luks2/luks2_json_metadata.c:23:
lib/luks2/luks2_internal.h:62:10: error: conflicting types for ‘json_object_get_uint64’
   62 | uint64_t json_object_get_uint64(json_object *jobj);
      |          ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/json-c/json.h:27,
                 from lib/luks2/luks2_internal.h:28,
                 from lib/luks2/luks2_json_metadata.c:23:
/usr/include/json-c/json_object.h:725:22: note: previous declaration of ‘json_object_get_uint64’ was here
  725 | JSON_EXPORT uint64_t json_object_get_uint64(const struct json_object *obj);
      |                      ^~~~~~~~~~~~~~~~~~~~~~
lib/luks2/luks2_json_metadata.c: In function ‘json_str_to_uint64’:
lib/luks2/luks2_json_metadata.c:237:10: error: ‘FALSE’ undeclared (first use in this function)
  237 |   return FALSE;
Comment 1 Alex Efros 2020-05-15 15:25:37 UTC
Thanks!

I can confirm saving mentioned above commit to /etc/portage/patches/sys-fs/cryptsetup-2.2.2/json-c-0.14.patch has fixed the build.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-15 17:57:14 UTC
Closing because 2.3.2 has the fix (stabling ongoing, done for most arches, in bug 723234).

Please emerge --sync and re-try if you are hitting this issue. Thanks!