[build] FAILED: _deps/nlohmann_json_schema_validator-build/CMakeFiles/nlohmann_json_schema_validator.dir/src/json-validator.cpp.o
[build] /usr/bin/clang++ -DJSON_USE_IMPLICIT_CONVERSIONS=0 -I/home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json_schema_validator/802e/src -isystem /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json/26c2/include -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -g -std=c++23 -fPIC -pipe -Wall -Wextra -Wshadow -MD -MT _deps/nlohmann_json_schema_validator-build/CMakeFiles/nlohmann_json_schema_validator.dir/src/json-validator.cpp.o -MF _deps/nlohmann_json_schema_validator-build/CMakeFiles/nlohmann_json_schema_validator.dir/src/json-validator.cpp.o.d -o _deps/nlohmann_json_schema_validator-build/CMakeFiles/nlohmann_json_schema_validator.dir/src/json-validator.cpp.o -c /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json_schema_validator/802e/src/json-validator.cpp
[build] /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json_schema_validator/802e/src/json-validator.cpp:910:5: error: no viable conversion from 'const json' (aka 'const basic_json<>') to 'long'
[build] 910 | T value = instance; // conversion of json to value_type
[build] | ^ ~~~~~~~~
[build] /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json_schema_validator/802e/src/json-validator.cpp:941:2: note: in instantiation of member function '(anonymous namespace)::numeric<long>::validate' requested here
[build] 941 | numeric(const json &sch, root_schema *root, std::set<std::string> &kw)
[build] | ^
[build] /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/bits/stl_construct.h:110:22: note: in instantiation of member function '(anonymous namespace)::numeric<long>::numeric' requested here
[build] 110 | return ::new(__loc) _Tp(std::forward<_Args>(__args)...);
[build] | ^
[build] /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::numeric<long>, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<nlohmann::basic_json<> &, nlohmann::json_schema::root_schema *&, std::set<std::basic_string<char>> &>' requested here
[build] 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...);
[build] | ^
[build] /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/bits/shared_ptr_base.h:1719:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<(anonymous namespace)::numeric<long>, std::allocator<void>, nlohmann::basic_json<> &, nlohmann::json_schema::root_schema *&, std::set<std::basic_string<char>> &>' requested here
[build] 1719 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...)
[build] | ^
[build] /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<(anonymous namespace)::numeric<long>>::__shared_ptr<std::allocator<void>, nlohmann::basic_json<> &, nlohmann::json_schema::root_schema *&, std::set<std::basic_string<char>> &>' requested here
[build] 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...)
[build] | ^
[build] /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<(anonymous namespace)::numeric<long>>::shared_ptr<std::allocator<void>, nlohmann::basic_json<> &, nlohmann::json_schema::root_schema *&, std::set<std::basic_string<char>> &>' requested here
[build] 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a},
[build] | ^
[build] /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json_schema_validator/802e/src/json-validator.cpp:1330:15: note: in instantiation of function template specialization 'std::make_shared<(anonymous namespace)::numeric<long>, nlohmann::basic_json<> &, nlohmann::json_schema::root_schema *&, std::set<std::basic_string<char>> &>' requested here
[build] 1330 | return std::make_shared<numeric<json::number_integer_t>>(schema, root, kw);
[build] | ^
[build] /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json/26c2/include/nlohmann/json.hpp:1419:15: note: candidate function
[build] 1419 | constexpr operator value_t() const noexcept
[build] | ^
[build] /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json/26c2/include/nlohmann/json.hpp:1923:55: note: explicit conversion function is not a candidate
[build] 1923 | JSON_EXPLICIT operator ValueType() const
[build] | ^
[build] /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json_schema_validator/802e/src/json-validator.cpp:910:5: error: no viable conversion from 'const json' (aka 'const basic_json<>') to 'double'
[build] 910 | T value = instance; // conversion of json to value_type
[build] | ^ ~~~~~~~~
[build] /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json_schema_validator/802e/src/json-validator.cpp:941:2: note: in instantiation of member function '(anonymous namespace)::numeric<double>::validate' requested here
[build] 941 | numeric(const json &sch, root_schema *root, std::set<std::string> &kw)
[build] | ^
[build] /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/bits/stl_construct.h:110:22: note: in instantiation of member function '(anonymous namespace)::numeric<double>::numeric' requested here
[build] 110 | return ::new(__loc) _Tp(std::forward<_Args>(__args)...);
[build] | ^
[build] /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::numeric<double>, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<nlohmann::basic_json<> &, nlohmann::json_schema::root_schema *&, std::set<std::basic_string<char>> &>' requested here
[build] 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...);
[build] | ^
[build] /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/bits/shared_ptr_base.h:1719:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<(anonymous namespace)::numeric<double>, std::allocator<void>, nlohmann::basic_json<> &, nlohmann::json_schema::root_schema *&, std::set<std::basic_string<char>> &>' requested here
[build] 1719 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...)
[build] | ^
[build] /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<(anonymous namespace)::numeric<double>>::__shared_ptr<std::allocator<void>, nlohmann::basic_json<> &, nlohmann::json_schema::root_schema *&, std::set<std::basic_string<char>> &>' requested here
[build] 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...)
[build] | ^
[build] /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<(anonymous namespace)::numeric<double>>::shared_ptr<std::allocator<void>, nlohmann::basic_json<> &, nlohmann::json_schema::root_schema *&, std::set<std::basic_string<char>> &>' requested here
[build] 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a},
[build] | ^
[build] /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json_schema_validator/802e/src/json-validator.cpp:1332:15: note: in instantiation of function template specialization 'std::make_shared<(anonymous namespace)::numeric<double>, nlohmann::basic_json<> &, nlohmann::json_schema::root_schema *&, std::set<std::basic_string<char>> &>' requested here
[build] 1332 | return std::make_shared<numeric<json::number_float_t>>(schema, root, kw);
[build] | ^
[build] /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json/26c2/include/nlohmann/json.hpp:1419:15: note: candidate function
[build] 1419 | constexpr operator value_t() const noexcept
[build] | ^
[build] /home/alex/Documents/git/zrythm/.cache/CPM/nlohmann_json/26c2/include/nlohmann/json.hpp:1923:55: note: explicit conversion function is not a candidate
[build] 1923 | JSON_EXPLICIT operator ValueType() const
[build] | ^
[build] 2 errors generated.
I build my project using
JSON_ImplicitConversions=OFFwhen building nlohmann-json, and this causes a build failure injson-schema-validator. Please consider making this work with implicit conversions disabled (which is better practice and will be the default in the next major release of nlohmann-json).See https://json.nlohmann.me/api/macros/json_use_implicit_conversions .
Here is my build log showing the failures: