Build fails: fatal error: 'dpp/nlohmann/json.hpp' file not found
Closed this issue · 8 comments
Git commit reference
10.0.35
Describe the bug
In file included from /usr/ports/www/dpp/work/DPP-10.0.35/mlspp/lib/hpke/src/signature.cpp:9:
/usr/ports/www/dpp/work/DPP-10.0.35/mlspp/lib/hpke/../../../include/dpp/json.h:25:11: fatal error: 'dpp/nlohmann/json.hpp' file not found
25 | #include <dpp/nlohmann/json.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
cmake variable DPP_USE_EXTERNAL_JSON is set to ON, but this doesn't add the C++ define DPP_USE_EXTERNAL_JSON for mlspp/lib/hpke/src/signature.cpp.
To Reproduce
Regular build.
System Details:
- OS: FreeBSD 14.1
this file should still exist though. why doesnt it?
cant duplicate via the standard build process via cmake. Is this some package build like ports tree?
looks like the ports tree build DELETES pieces of dpp?
You might want to remove this dependency:
https://cgit.freebsd.org/ports/tree/www/dpp/Makefile#n18
sodium is no longer required by dpp.
thanks, fix for this awaiting merge. I'm not sure how i feel about the deletion of source parts. This might break someones bot if theyre explicitly including those files. They shouldn't, but you cant ever trust a user, because the header is there they may assume it is public (instead of the correct dpp/json.h which includes the correct thing.
looks like the ports tree build DELETES pieces of dpp?
Yes, because it shouldn't be needed when built with DPP_USE_EXTERNAL_JSON=ON.
if someones source code depends on it being there, their compile will fail
Once the external nlohman json library is used - it can't be mixed with the bundled one because they would generally have different versions, and such compilation would generally produce broken binary.