Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 720330 - sys-fs/multipath-tools-0.8.3-r1 fails to compile after update to json-c-0.14 (PATCH)
Summary: sys-fs/multipath-tools-0.8.3-r1 fails to compile after update to json-c-0.14 ...
Status: RESOLVED FIXED
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: PATCH
Depends on:
Blocks:
 
Reported: 2020-05-01 18:29 UTC by hangglider
Modified: 2020-05-02 07:29 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 hangglider 2020-05-01 18:29:23 UTC
x86_64-pc-linux-gnu-gcc -march=haswell -O2 -pipe -DBIN_DIR=\"/sbin\" -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -MMD -MP -fPIC -fvisibility=hidden -I../libdmmp -I../libmpathcmd -I/usr/include/json-c -c -o libdmmp_p
g.o libdmmp_pg.c                                                                                          
In file included from libdmmp.c:37:                                                                       
libdmmp.c: In function 'dmmp_mpath_array_get':                                                                                                                                                                      
libdmmp_private.h:85:59: error: 'TRUE' undeclared (first use in this function)                     
   85 |  if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE) { \        
      |                                                           ^~~~
libdmmp.c:205:2: note: in expansion of macro '_json_obj_get_value'
  205 |  _json_obj_get_value(ctx, j_obj, cur_json_major_version,
      |  ^~~~~~~~~~~~~~~~~~~
libdmmp_private.h:85:59: note: each undeclared identifier is reported only once for each function it appears in
   85 |  if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE) { \
      |                                                           ^~~~
libdmmp.c:205:2: note: in expansion of macro '_json_obj_get_value'
  205 |  _json_obj_get_value(ctx, j_obj, cur_json_major_version,
      |  ^~~~~~~~~~~~~~~~~~~
...

Reproducible: Always

Steps to Reproduce:
1. Update json-c to 0.14
2. recompile sys-fs/multipath-tools
Actual Results:  
Compiler has undefined symbol TRUE


Patched multipath-tools-0.8.3/libdmmp/libdmmp_private.h manually to contain a line

#define TRUE 0

after having had a look at the source of json-c. Compiled and installed fine, but I'm unsre if it should be fixed in dev-libs/json-c or multipath-tools.
Comment 1 Kobboi 2020-05-01 19:04:23 UTC
json-c removed the TRUE/FALSE end of 2017 in https://github.com/json-c/json-c/commit/0992aac61f8b087efd7094e9ac2b84fa9c040fcd

Looks like it needs to be fixed in multipath-tools to me.
Comment 2 hangglider 2020-05-01 19:15:27 UTC
Thanks Kobboi, then it only needs to be fixed in libdmmp/libdmmp_private.h, as I did a recursive grep and only found the occurences there.
Comment 4 Larry the Git Cow gentoo-dev 2020-05-02 07:29:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e3a04d1532db375c74b38c71963316ef4a466f0

commit 6e3a04d1532db375c74b38c71963316ef4a466f0
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-05-02 07:28:43 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-05-02 07:28:59 +0000

    sys-fs/multipath-tools: add json-c-0.14 support
    
    Closes: https://bugs.gentoo.org/720330
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 .../files/multipath-tools-0.8.3-json-c-0.14.patch  | 28 +++++++
 .../multipath-tools-0.8.3-r2.ebuild                | 92 ++++++++++++++++++++++
 2 files changed, 120 insertions(+)