#1138612 libnlohmann-json-schema-validator-dev: Missing dependency on nlohmann-json3-dev

Package:
libnlohmann-json-schema-validator-dev
Source:
libnlohmann-json-schema-validator-dev
Description:
json schema validation library (development files)
Submitter:
Sylvain Joubert
Date:
2026-06-01 06:55:02 UTC
Severity:
normal
#1138612#5
Date:
2026-06-01 06:53:11 UTC
From:
To:
Dear Maintainer,

I believe this package is missing a dependency on the nlohmann-json3-dev
package since the json validator headers include and depend on it.

In addition I think this dependency should be very strict on the expected
nlohmann-json3-dev version since the exact version, to the patch level, is
embedded in the ABI namespace of the dependency symbols.
Such a mismatch can lead to linker errors.
For example, having the validator at 2.4.0-2 (built against nlohmann-json
3.11.3) and nlohmann-json at 3.12.0.really.3.12.0.really.3.12.0-2 (from
experimental since I really wanted 3.12) leads to:

undefined reference to
`nlohmann::json_schema::json_validator::validate(nlohmann::json_abi_v3_12_0::basic_json<std::map,
std::vector, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char,
std::allocator<unsigned char> >, void> const&,
nlohmann::json_schema::error_handler&, nlohmann::json_uri const&) const'
(and others)

FYI, I think there are other usages of nlohmann-json that would break in
combination with the validator but without a clear solution on the packaging
side.
For example, one can enable more detailed diagnostics using the compile time
define JSON_DIAGNOSTICS with the side effect of encoding this information in
the ABI namespace.
Unless the validator library is itself made fully header-only I don't think
this can be solved here, but the version mismatch with the default
configuration should be.

Sylvain