Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 721712 - dev-cpp/nlohmann_json-3.7.3: error: 'value' is not a member of 'std::is_constructible<nlohmann::basic_json<>, const nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long in
Summary: dev-cpp/nlohmann_json-3.7.3: error: 'value' is not a member of 'std::is_const...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-05-08 22:52 UTC by Nicolas Werner
Modified: 2020-10-13 21:15 UTC (History)
1 user (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 Nicolas Werner 2020-05-08 22:52:53 UTC
Compiling any application with gcc-10 using nlohmann_json fails, with an error like this (shortened, actual error is much longer):

/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/include/g++-v10/bits/stl_uninitialized.h:137:72: Fehler: »value« ist kein Element von »std::is_constructible<nlohmann::basic_json<>, const nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_trai
ts<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::adl_serializer>&>«
  137 |       static_assert(is_constructible<_ValueType2, decltype(*__first)>::value,
      |  

This has been reported upstream already: https://github.com/nlohmann/json/issues/1920
And has been fixed in https://github.com/nlohmann/json/pull/2034

Adding the changes from that PR as a patch fixes any compilation issues. Since 3.8.0 is not released yet, I propose adding that patch for now to the 3.7.3 ebuild.

Reproducible: Always

Steps to Reproduce:
1.emerge nlohmann_json with the test useflag set
2.the tests should fail to compile. You can also test it with other applications using nlohmann_json, but this is the easiest way to test it.
3.
Actual Results:  
Compilation failures.

Expected Results:  
No compilation failures.

You can get the patch from this URL: https://patch-diff.githubusercontent.com/raw/nlohmann/json/pull/2034.patch
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-08 22:55:59 UTC
Can you file a PR to the gentoo repo?
Comment 2 Nicolas Werner 2020-05-08 22:57:05 UTC
Sure, will do.
Comment 3 Nicolas Werner 2020-05-08 23:15:34 UTC
I hope I did this correctly, I'm new to this: https://github.com/gentoo/gentoo/pull/15719
Comment 4 Larry the Git Cow gentoo-dev 2020-05-15 00:34:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29ae1e10e707b0d48cce53c08cf79ea3e26b07a8

commit 29ae1e10e707b0d48cce53c08cf79ea3e26b07a8
Author:     Nicolas Werner <nicolas.werner@hotmail.de>
AuthorDate: 2020-05-08 23:11:40 +0000
Commit:     Aaron Bauman <bman@gentoo.org>
CommitDate: 2020-05-15 00:34:27 +0000

    dev-cpp/nlohmann_json: fix build with gcc-10
    
    Closes: https://bugs.gentoo.org/721712
    
    Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
    Closes: https://github.com/gentoo/gentoo/pull/15719
    Signed-off-by: Aaron Bauman <bman@gentoo.org>

 .../files/nlohmann_json-3.7.3-gcc-10.patch         | 131 +++++++++++++++++++++
 dev-cpp/nlohmann_json/nlohmann_json-3.7.3.ebuild   |   4 +
 2 files changed, 135 insertions(+)