danielaparker / jsoncons

A C++, header-only library for constructing JSON and JSON-like data formats, with JSON Pointer, JSON Patch, JSON Schema, JSONPath, JMESPath, CSV, MessagePack, CBOR, BSON, UBJSON
https://danielaparker.github.io/jsoncons
Other
726 stars 164 forks source link

Unable to compile Release 0.171.0 ubuntu 20.04 g++ 9.4.0 #440

Closed vadimen closed 3 months ago

vadimen commented 1 year ago

Describe the bug

/home/vadim/3_repos/jsoncons/include/jsoncons/item_event_visitor.hpp:1472:14: required from here /usr/include/c++/9/scoped_allocator:298:60: error: no matching function for call to ‘FreeListAllocator::FreeListAllocator()’ 298 | scoped_allocator_adaptor() : _OuterAlloc(), _M_inner() { } | ^ In file included from /home/vadim/3_repos/jsoncons/test/cbor/src/encode_cbor_tests.cpp:10: /home/vadim/3_repos/jsoncons/test/common/FreeListAllocator.hpp:45:5: note: candidate: ‘FreeListAllocator::FreeListAllocator(FreeListAllocator&&) [with T = char]’ 45 | FreeListAllocator(FreeListAllocator&& other) noexcept : list(other.list) { | ^~~~~ /home/vadim/3_repos/jsoncons/test/common/FreeListAllocator.hpp:45:5: note: candidate expects 1 argument, 0 provided /home/vadim/3_repos/jsoncons/test/common/FreeListAllocator.hpp:44:5: note: candidate: ‘template FreeListAllocator::FreeListAllocator(const FreeListAllocator&)’ 44 | FreeListAllocator(const FreeListAllocator&) noexcept {} | ^~~~~ /home/vadim/3_repos/jsoncons/test/common/FreeListAllocator.hpp:44:5: note: template argument deduction/substitution failed: In file included from /home/vadim/3_repos/jsoncons/test/cbor/src/encode_cbor_tests.cpp:9: /usr/include/c++/9/scoped_allocator:298:60: note: candidate expects 1 argument, 0 provided 298 | scoped_allocator_adaptor() : _OuterAlloc(), _M_inner() { } | ^ In file included from /home/vadim/3_repos/jsoncons/test/cbor/src/encode_cbor_tests.cpp:10: /home/vadim/3_repos/jsoncons/test/common/FreeListAllocator.hpp:42:5: note: candidate: ‘FreeListAllocator::FreeListAllocator(const FreeListAllocator&) [with T = char]’ 42 | FreeListAllocator(const FreeListAllocator&) noexcept {} | ^~~~~ /home/vadim/3_repos/jsoncons/test/common/FreeListAllocator.hpp:42:5: note: candidate expects 1 argument, 0 provided /home/vadim/3_repos/jsoncons/test/common/FreeListAllocator.hpp:40:5: note: candidate: ‘FreeListAllocator::FreeListAllocator(int) [with T = char]’ 40 | FreeListAllocator(int) noexcept | ^~~~~ /home/vadim/3_repos/jsoncons/test/common/FreeListAllocator.hpp:40:5: note: candidate expects 1 argument, 0 provided make[2]: [test/CMakeFiles/unit_tests.dir/build.make:271: test/CMakeFiles/unit_tests.dir/cbor/src/encode_cbor_tests.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:878: test/CMakeFiles/unit_tests.dir/all] Error 2 make: [Makefile:141: all] Error 2

Enumerate the steps to reproduce the bug 1) Copy the directory include/jsoncons to your include directory. If you wish to use extensions, copy include/jsoncons_ext as well. did by : sudo cp jsoncons -r /usr/include/; sudo cp jsoncons_ext/ -r /usr/include/ 2) mkdir build; cd build; cmake ..; make -j20;

What compiler, architecture, and operating system?

  • Compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
  • Architecture (e.g. x86, x64) x64
  • Operating system: Ubuntu 20.04.6 LTS

What jsoncons library version?

  • [x] Latest release 0.171.0
  • [ ] master
danielaparker commented 9 months ago

@vadimen , If you're still following this issue, could you check if it's still an issue in latest release release 0.173.4? I haven't been able to reproduce it in our test environments, but some things have changed.

danielaparker commented 3 months ago

Looks like a duplicate of #488