Hi Adrian,

* Adrian Bunk <[email protected]> [2025-11-10 21:03]:
On Sat, Sep 13, 2025 at 04:29:34PM +0000, Santiago Vila wrote:
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libjsoncpp.a(json_reader.cpp.o): relocation R_X86_64_PC32 against symbol `_ZTVN4Json17CharReaderBuilderE' can not be used when making a shared object; recompile with -fPIC

Editing libtransport/CMakeLists.txt to us JsonCpp::JsonCppShared instead of JsonCpp::JsonCpp fixes the build, but that shouldn't be necessary.

Timo, can you see what's going wrong here related to
https://sources.debian.org/src/spectrum2/2.2.1%2Bdfsg-2/cmake_modules/FindJsonCpp.cmake
?

libjsoncpp provides its own JsonCpp::JsonCpp target, and that one prefers the static library over the shared one if both are built:
https://sources.debian.org/src/libjsoncpp/1.9.6-4/jsoncpp-namespaced-targets.cmake

I think I'm going to change that in libjsoncpp, which will restore the previous behavior (when the static library was not built at all) and makes more sense in the Debian context anyway.


Cheers
Timo

--
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯

Attachment: signature.asc
Description: PGP signature

Reply via email to