Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.rc > #404353

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

From Timo Röhling <roehling@debian.org>
Newsgroups linux.debian.bugs.rc
Subject 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
Date 2025-11-11 08:40 +0100
Message-ID <LPR8S-c6M1-5@gated-at.bofh.it> (permalink)
References <LuBs8-f2Q8-59@gated-at.bofh.it> <LPFr3-bYQr-11@gated-at.bofh.it> <LuBs8-f2Q8-59@gated-at.bofh.it> <LPFr3-bYQr-11@gated-at.bofh.it>
Organization The Debian Project

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Adrian,

* Adrian Bunk <bunk@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 │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯

Back to linux.debian.bugs.rc | Previous | Next | Find similar | Unroll thread


Thread

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@debian.org> - 2025-11-11 08:40 +0100

csiph-web