Repository navigation
Conversation
Signed-off-by: Abhishek Agarwal <agab0323@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1489.
The CMake build finds jsoncpp only through jsoncpp's CMake package file and then links
JsonCpp::JsonCpp. That breaks in two cases:jsoncpp.pc, so configure stops atCMakeLists.txt:107(details in CMake configure fails where jsoncpp has no CMake package file (Arch Linux) #1489).libjsoncpp-dev(1.7.4-3.1ubuntu2) only definesjsoncpp_libandjsoncpp_lib_static; the 1.9.5 package in Ubuntu 24.04 addsJsonCpp::JsonCppinjsoncpp-namespaced-targets.cmake. Without it, configure fails withTarget "bmsim" links to: JsonCpp::JsonCppand the same for every other target that links jsoncpp.This keeps
find_package(jsoncpp)(nowQUIET). If it does not provideJsonCpp::JsonCpp, the target is defined on top of jsoncpp's pkg-config data instead, which is also howconfigure.acfinds jsoncpp. Where the package file defines the target, as with the 1.9.5 package in CI, nothing changes.Testing
Arch Linux, CMake 4.4.4, jsoncpp 1.9.8:
ctestwork without any workaround. 50/51 tests pass;test_switchfails because the Pythonthriftmodule is not installed here.build.ninjais the same as main configured with a localFindjsoncpp.cmakedoing the same pkg-config lookup, except for the rule that re-runs CMake. Same with-DENABLE_PACKET_TRACE=ON -DENABLE_WERROR=ON.jsoncppConfig.cmakeplaced onCMAKE_PREFIX_PATHis still loaded first.jsoncpp_lib, like Ubuntu 20.04's, main fails with the error above and this branch configures. I checked the Ubuntu 20.04 and 24.04 packages by unpacking them, not on those systems.cmake_minimum_required.