Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC 13 build failures #3927

Closed
1 of 2 tasks
xvitaly opened this issue Jan 24, 2023 · 15 comments · Fixed by #3950 or #3895
Closed
1 of 2 tasks

GCC 13 build failures #3927

xvitaly opened this issue Jan 24, 2023 · 15 comments · Fixed by #3950 or #3895
Labels
kind: bug solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@xvitaly
Copy link
Contributor

xvitaly commented Jan 24, 2023

Description

Build failure under GCC 13.

Reproduction steps

Run standard build with tests enabled against GCC 13.

Expected vs. actual results

[1/164] /usr/bin/g++ -DDOCTEST_CONFIG_SUPER_FAST_ASSERTS -DJSON_TEST_KEEP_MACROS -DJSON_TEST_USING_MULTIPLE_HEADERS=1 -I/builddir/build/BUILD/json-3.11.2/tests/thirdparty/doctest -I/builddir/build/BUILD/json-3.11.2/tests/thirdparty/fifo_map -I/builddir/build/BUILD/json-3.11.2/redhat-linux-build/include -I/builddir/build/BUILD/json-3.11.2/include -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wno-deprecated -Wno-float-equal -Wno-deprecated-declarations -std=gnu++11 -MD -MT tests/CMakeFiles/test-allocator_cpp11.dir/src/unit-allocator.cpp.o -MF tests/CMakeFiles/test-allocator_cpp11.dir/src/unit-allocator.cpp.o.d -o tests/CMakeFiles/test-allocator_cpp11.dir/src/unit-allocator.cpp.o -c /builddir/build/BUILD/json-3.11.2/tests/src/unit-allocator.cpp
FAILED: tests/CMakeFiles/test-allocator_cpp11.dir/src/unit-allocator.cpp.o 
/usr/bin/g++ -DDOCTEST_CONFIG_SUPER_FAST_ASSERTS -DJSON_TEST_KEEP_MACROS -DJSON_TEST_USING_MULTIPLE_HEADERS=1 -I/builddir/build/BUILD/json-3.11.2/tests/thirdparty/doctest -I/builddir/build/BUILD/json-3.11.2/tests/thirdparty/fifo_map -I/builddir/build/BUILD/json-3.11.2/redhat-linux-build/include -I/builddir/build/BUILD/json-3.11.2/include -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wno-deprecated -Wno-float-equal -Wno-deprecated-declarations -std=gnu++11 -MD -MT tests/CMakeFiles/test-allocator_cpp11.dir/src/unit-allocator.cpp.o -MF tests/CMakeFiles/test-allocator_cpp11.dir/src/unit-allocator.cpp.o.d -o tests/CMakeFiles/test-allocator_cpp11.dir/src/unit-allocator.cpp.o -c /builddir/build/BUILD/json-3.11.2/tests/src/unit-allocator.cpp
In file included from /usr/include/c++/13/ext/alloc_traits.h:34,
                 from /usr/include/c++/13/bits/basic_string.h:39,
                 from /usr/include/c++/13/string:54,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/streambuf:43,
                 from /usr/include/c++/13/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/13/iterator:66,
                 from /builddir/build/BUILD/json-3.11.2/include/nlohmann/json.hpp:28,
                 from /builddir/build/BUILD/json-3.11.2/tests/src/unit-allocator.cpp:12:
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of 'struct std::__allocator_traits_base::__rebind<{anonymous}::bad_allocator<std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> > >, std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >, void>':
/usr/include/c++/13/bits/alloc_traits.h:94:11:   required by substitution of 'template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = {anonymous}::bad_allocator<std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> > >; _Up = std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >]'
/usr/include/c++/13/bits/alloc_traits.h:228:8:   required by substitution of 'template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >; _Alloc = {anonymous}::bad_allocator<std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> > >]'
/usr/include/c++/13/ext/alloc_traits.h:126:65:   required from 'struct __gnu_cxx::__alloc_traits<{anonymous}::bad_allocator<std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> > >, std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> > >::rebind<std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> > >'
/usr/include/c++/13/bits/stl_map.h:150:28:   required from 'class std::map<std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator>, std::less<std::__cxx11::basic_string<char> >, {anonymous}::bad_allocator<std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> > > >'
/builddir/build/BUILD/json-3.11.2/include/nlohmann/detail/meta/type_traits.hpp:169:8:   recursively required by substitution of 'template<class Default, template<class ...> class Op, class ... Args> struct nlohmann::json_abi_v3_11_2::detail::detector<Default, typename nlohmann::json_abi_v3_11_2::detail::make_void<Op<Args ...> >::type, Op, Args ...> [with Default = nlohmann::json_abi_v3_11_2::detail::nonesuch; Op = nlohmann::json_abi_v3_11_2::detail::detect_key_compare; Args = {std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, {anonymous}::bad_allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, {anonymous}::bad_allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, {anonymous}::bad_allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > > > > >}]'
/builddir/build/BUILD/json-3.11.2/include/nlohmann/detail/meta/type_traits.hpp:169:8:   required from 'struct nlohmann::json_abi_v3_11_2::detail::has_key_compare<std::map<std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator>, std::less<std::__cxx11::basic_string<char> >, {anonymous}::bad_allocator<std::pair<const std::__cxx11::basic_string<char>, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> > > > >'
/builddir/build/BUILD/json-3.11.2/include/nlohmann/detail/meta/type_traits.hpp:177:11:   required from 'struct nlohmann::json_abi_v3_11_2::detail::actual_object_comparator<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >'
/builddir/build/BUILD/json-3.11.2/include/nlohmann/detail/meta/type_traits.hpp:182:7:   required by substitution of 'template<class BasicJsonType> using nlohmann::json_abi_v3_11_2::detail::actual_object_comparator_t = typename nlohmann::json_abi_v3_11_2::detail::actual_object_comparator::type [with BasicJsonType = nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator>]'
/builddir/build/BUILD/json-3.11.2/include/nlohmann/json.hpp:369:11:   required from 'class nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator>'
/builddir/build/BUILD/json-3.11.2/tests/src/unit-allocator.cpp:46:9:   required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
   70 |                         _Tp>::value,
      |                               ^~~~~
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: 'std::integral_constant<bool, false>::value' evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of 'struct std::__allocator_traits_base::__rebind<{anonymous}::bad_allocator<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator>, void>':
/usr/include/c++/13/bits/alloc_traits.h:94:11:   required by substitution of 'template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = {anonymous}::bad_allocator<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >; _Up = nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator>]'
/usr/include/c++/13/bits/alloc_traits.h:228:8:   required by substitution of 'template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator>; _Alloc = {anonymous}::bad_allocator<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >]'
/usr/include/c++/13/ext/alloc_traits.h:126:65:   required from 'struct __gnu_cxx::__alloc_traits<{anonymous}::bad_allocator<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >, nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >::rebind<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >'
/usr/include/c++/13/bits/stl_vector.h:88:21:   required from 'struct std::_Vector_base<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator>, {anonymous}::bad_allocator<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> > >'
/usr/include/c++/13/bits/stl_vector.h:423:11:   required from 'class std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator>, {anonymous}::bad_allocator<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> > >'
/builddir/build/BUILD/json-3.11.2/include/nlohmann/detail/iterators/iter_impl.hpp:64:151:   required from 'class nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator> >'
/builddir/build/BUILD/json-3.11.2/include/nlohmann/json.hpp:730:14:   required from 'class nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char>, bool, long int, long unsigned int, double, {anonymous}::bad_allocator>'
/builddir/build/BUILD/json-3.11.2/tests/src/unit-allocator.cpp:46:9:   required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: 'std::integral_constant<bool, false>::value' evaluates to false

Minimal code example

No response

Error messages

error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A

Compiler and operating system

GCC 13.0.0, Fedora Linux 38

Library version

3.11.2

Validation

@heirecka
Copy link

#3895

@heirecka
Copy link

But there's another one with the MR above applied (gcc 13 snapshot 20230122):


make  -f tests/CMakeFiles/test-large_json_cpp11.dir/build.make tests/CMakeFiles/test-large_json_cpp11.dir/build
In file included from /var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/tests/thirdparty/doctest/doctest_compatibility.h:6,
                 from /var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/tests/src/unit-iterators2.cpp:16:
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/tests/src/unit-iterators2.cpp: In function 'void _DOCTEST_ANON_FUNC_2()':
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/tests/src/unit-iterators2.cpp:946:32: error: no match for 'operator==' (operand types are 'doctest::detail::Expression_lhs<std::ranges::reverse_view<std::ranges::ref_view<nlohmann::json_abi_v3_11_2::basic_json<> > >&>' and 'nlohmann::json_abi_v3_11_2::json' {aka 'nlohmann::json_abi_v3_11_2::basic_json<>'})
  946 |                 CHECK(reversed == j_expected);
      |                                ^~ ~~~~~~~~~~
      |                                   |
      |                                   nlohmann::json_abi_v3_11_2::json {aka nlohmann::json_abi_v3_11_2::basic_json<>}
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/tests/thirdparty/doctest/doctest.h:2099:24: note: in definition of macro 'DOCTEST_ASSERT_IMPLEMENT_1'
 2099 |                     << __VA_ARGS__) DOCTEST_CLANG_SUPPRESS_WARNING_POP
      |                        ^~~~~~~~~~~
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/tests/thirdparty/doctest/doctest.h:2573:20: note: in expansion of macro 'DOCTEST_CHECK'
 2573 | #define CHECK(...) DOCTEST_CHECK(__VA_ARGS__)
      |                    ^~~~~~~~~~~~~
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/tests/src/unit-iterators2.cpp:946:17: note: in expansion of macro 'CHECK'
  946 |                 CHECK(reversed == j_expected);
      |                 ^~~~~
In file included from /var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/tests/src/unit-iterators2.cpp:18:
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/include/nlohmann/json.hpp:3691:10: note: candidate: 'template<class ScalarType>  requires  is_scalar_v<ScalarType> bool nlohmann::json_abi_v3_11_2::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::operator==(ScalarType) const [with ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::json_abi_v3_11_2::adl_serializer; BinaryType = std::vector<unsigned char>]' (reversed)
 3691 |     bool operator==(ScalarType rhs) const noexcept
      |          ^~~~~~~~
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/include/nlohmann/json.hpp:3691:10: note:   template argument deduction/substitution failed:
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/include/nlohmann/json.hpp:3691:10: note: constraints not satisfied
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/include/nlohmann/json.hpp: In substitution of 'template<class ScalarType>  requires  is_scalar_v<ScalarType> bool nlohmann::json_abi_v3_11_2::basic_json<>::operator==(ScalarType) const [with ScalarType = std::map]':
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/tests/src/unit-iterators2.cpp:946:17:   required from here
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/include/nlohmann/json.hpp:3691:10:   required by the constraints of 'template<template<class, class, class ...> class ObjectType, template<class, class ...> class ArrayType, class StringType, class BooleanType, class NumberIntegerType, class NumberUnsignedType, class NumberFloatType, template<class> class AllocatorType, template<class, class> class JSONSerializer, class BinaryType> template<class ScalarType>  requires  is_scalar_v<ScalarType> bool nlohmann::json_abi_v3_11_2::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::operator==(ScalarType) const'
/var/tmp/paludis/build/dev-libs-json-3.11.2/work/json-3.11.2/include/nlohmann/json.hpp:3690:19: note: the expression 'is_scalar_v<ScalarType> [with ScalarType = doctest::detail::Expression_lhs<std::ranges::reverse_view<std::ranges::ref_view<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > > > >&>]' evaluated to 'false'
 3690 |     requires std::is_scalar_v<ScalarType>
      |              ~~~~~^~~

@eitlane
Copy link

eitlane commented Feb 7, 2023

Hello, Any update on this?

@nlohmann
Copy link
Owner

nlohmann commented Feb 7, 2023

No. And since we're using GCC 13.0 in our CI as well, I have no idea how to fix this.

@nlohmann nlohmann added the state: help needed the issue needs help to proceed label Feb 7, 2023
@heirecka
Copy link

heirecka commented Feb 7, 2023

No. And since we're using GCC 13.0 in our CI as well, I have no idea how to fix this.

Does it? I may be missing something looking at the jobs, but it looks to me only <=12 is tested, ci_test_compilers_gcc (latest) seems to be 12 as well, e.g. https://github.com/nlohmann/json/actions/runs/4061409493/jobs/6991615009 -> Run cmake and according to its output gcc claims to be 12.2.0

@nlohmann
Copy link
Owner

nlohmann commented Feb 7, 2023

Yes, you seem to be right.

@kloczek
Copy link

kloczek commented Feb 20, 2023

Any update? 🤔

@eitlane
Copy link

eitlane commented Feb 21, 2023

I am folloing as well. Gcc 13 is coming with Fedora 38 and I would like to be able to compile this library on it

@nlohmann
Copy link
Owner

I am currently traveling. If anyone wants to help it would be great. First step would be adding GCC 13 to the CI.

@ArsenArsen
Copy link
Contributor

trofi fixed half of this problem in #3895, I'm working on the other half, and it should be done within a few minutes

ArsenArsen added a commit to ArsenArsen/json that referenced this issue Feb 21, 2023
This fixes a build error on GCC 13:

  /home/arsen/nlohmann_json/tests/src/unit-iterators2.cpp: In function ‘void _DOCTEST_ANON_FUNC_2()’:
  /home/arsen/nlohmann_json/tests/src/unit-iterators2.cpp:946:32: error: no match for ‘operator==’ (operand types are ‘doctest::detail::Expression_lhs<std::ranges::reverse_view<std::ranges::ref_view<nlohmann::json_abi_v3_11_2::basic_json<> > >&>’ and ‘nlohmann::json_abi_v3_11_2::json’ {aka ‘nlohmann::json_abi_v3_11_2::basic_json<>’})
    946 |                 CHECK(reversed == j_expected);
        |                                ^~ ~~~~~~~~~~
        |                                   |
        |                                   nlohmann::json_abi_v3_11_2::json {aka nlohmann::json_abi_v3_11_2::basic_json<>}

Bug: https://bugs.gentoo.org/895692
Closes: nlohmann#3927
@nlohmann nlohmann added solution: proposed fix a fix for the issue has been proposed and waits for confirmation and removed state: help needed the issue needs help to proceed labels Mar 5, 2023
@nlohmann nlohmann added this to the Release 3.11.3 milestone Mar 5, 2023
@navinp0304
Copy link

Fixed this in PR #3966 .The changes in #3895 are not completely merged.

@trofi
Copy link
Contributor

trofi commented May 29, 2023

WDYT of releasing json-3.11.3 release? Current latest json-3.11.2 fails to build with already released gcc-13.1.0. I think develop is in a reasonable shape.

@horenmar
Copy link

+1 to next release. GCC 13 is the default system compiler on newer distros, so right now this library will not build on e.g. current Ubuntu.

@nlohmann
Copy link
Owner

I am currently having issues running my release script. I will create a bug issue and ask for help bringing this forward.

@nlohmann
Copy link
Owner

I am currently having issues running my release script. I will create a bug issue and ask for help bringing this forward.

This: #4197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
9 participants