[Pkg-xmpp-devel] Bug#1115142: spectrum2: FTBFS: /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
Timo Röhling
roehling at debian.org
Tue Nov 11 07:30:55 GMT 2025
Hi Adrian,
* Adrian Bunk <bunk at debian.org> [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 │
⠈⠳⣄⠀⠀⠀⠀ ╰────────────────────────────────────────────────────╯
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-xmpp-devel/attachments/20251111/e82c5f87/attachment-0001.sig>
More information about the Pkg-xmpp-devel
mailing list