Hi, On Tue, Dec 29, 2020 at 07:10:23PM +0100, Sebastian Ramacher wrote: > On 2020-12-29 22:01:15, Andrey Rahmatullin wrote: > > Control: reassign -1 libspdlog1/1:1.8.1+ds-2+b1 > > Control: affects -1 waybar > > Control: severity -1 serious > > Control: retitle -1 libspdlog1 breaks ABI on rebuilds with different libfmt > > > > On Sun, Dec 27, 2020 at 09:26:09PM +0100, Michele Cane wrote: > > > waybar: symbol lookup error: waybar: undefined symbol: > > > _ZN6spdlog7details7log_msgC1ENS_10source_locEN3fmt2v617basic_string_viewIcEENS_5level10level_enumES6_ > > This is because libspdlog1 was rebuilt with newer libfmt and this caused > > symbol renames. > > > > #977454 says "The code is actually working with the new version, only the > > symbols file is wrong here. spdlog uses fmtlib internal API and exposes it > > through the symbols files. This looks wrong to me, as every new fmtlib > > will cause spdlog ftbfs due to the symbols file.". If it's about the same > > problem then it looks like it failed to mention that symbol changes cause > > much worse problems than just needing to update the symbols file. > > The situtation is somewhat similar to liboost-regex and libicu. > libboost-regex exports symbols that depend on libicu's ABI and change > whenever liboost-regex is rebuilt against a version of libicu with a > different ABI. > > For spdlog this can be solved in the same way as for boost. > liboost-regexX.Y provides libboost-regexX.Y-icuZ when built against > libicuZ. Reverse dependencies then depend on libboost-regexX.Y-icuZ. See > > https://salsa.debian.org/debian/boost/-/blob/master/debian/rules#L53 > https://salsa.debian.org/debian/boost/-/blob/master/debian/rules#L289 > https://salsa.debian.org/debian/boost/-/blob/master/debian/rules#L338 > > Cheers > -- > Sebastian Ramacher
Follow Sebastian's advice, please see the following patch.
diff --git a/debian/changelog b/debian/changelog index 1d31b26..f4b7f55 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +spdlog (1:1.8.1+ds-3) unstable; urgency=medium + + * Non-maintainer upload. + * Track fmtlib abi in libspdlog1 + + -- Shengjing Zhu <z...@debian.org> Wed, 30 Dec 2020 02:30:44 +0800 + spdlog (1:1.8.1+ds-2) unstable; urgency=medium [ Shengjing Zhu ] diff --git a/debian/control b/debian/control index e83f692..ab6d998 100644 --- a/debian/control +++ b/debian/control @@ -38,6 +38,8 @@ Package: libspdlog1 Architecture: any Multi-Arch: same Section: libs +Breaks: libspdlog (<< 1:1.8.1+ds-3) +Provides: ${spdlog:Provides} Depends: ${shlibs:Depends}, ${misc:Depends} Description: Very fast C++ logging library diff --git a/debian/rules b/debian/rules index f20dd81..154cbdc 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,10 @@ endif export DEB_BUILD_MAINT_OPTIONS=hardening=+all +soversion = 1 +fmtabi = $(shell apt show libfmt-dev 2>/dev/null | sed -n 's/Depends: .*libfmt\([0-9]*\) .*/\1/p') +spdlogfmtabi = libspdlog$(soversion)-fmt$(fmtabi) + %: dh $@ --with pkgkde_symbolshelper --buildsystem=cmake @@ -41,3 +45,9 @@ override_dh_auto_install: rm -f example/logs/.gitignore dh_auto_install find debian -name .gitignore -delete + +override_dh_gencontrol: + dh_gencontrol -- -Vspdlog:Provides=$(spdlogfmtabi) + +override_dh_makeshlibs: + dh_makeshlibs -plibspdlog1 -V '$(spdlogfmtabi)'