kiwix / libkiwix

Common code base for all Kiwix ports
https://download.kiwix.org/release/libkiwix/
GNU General Public License v3.0
112 stars 55 forks source link

ABI break in 12.1.0 #998

Closed legoktm closed 10 months ago

legoktm commented 10 months ago

There seems to have been an ABI break between 12.0.0 and 12.1.0, when running kiwix-desktop --version (compiled against 12.0.0) against a newly built 12.1.0, seeing:

kiwix-desktop: symbol lookup error: kiwix-desktop: undefined symbol: _ZN5kiwix10Downloader14getDownloadIdsB5cxx11Ev

which demangles to kiwix::Downloader::getDownloadIds[abi:cxx11]()

legoktm commented 10 months ago

I reverted the part of https://github.com/kiwix/libkiwix/commit/18b7b5f277a7734c024f7b36b5ad9e0584740b1c that touched getDownloadIds() (i.e. removing const) and it fixed the issue.

legoktm commented 10 months ago

With the const added, the symbol name becomes _ZNK5kiwix10Downloader14getDownloadIdsB5cxx11Ev - specifically it starts with _ZNK5 instead of _ZN5.

legoktm commented 10 months ago

The patch I've drafted right now (but not uploaded to Debian) is to just remove the const from this one method - https://salsa.debian.org/debian/libkiwix/-/blob/master/debian/patches/0002-Revert-ABI-breakage-in-kiwix-Downloader-getDownloadI.patch

Does that seem reasonable? I can also submit it as a PR too.

legoktm commented 10 months ago

OK, I've submitted #999. If that can get a thumbs up I'll apply it to Debian.

mgautierfr commented 10 months ago

A version 12.1.1 of libkiwix has just been published with the api/abi break removed (equivalent to 12.1.0 - breaks) A version 13.0.0 of libkiwix has also just been published which is equal to 12.1.0 (equivalent to 12.1.0 + breaks)

You should not use version 12.1.0 for now one. Use either 12.1.1 (without api break) or (13.0.0 with api break)

(Api/break break compared to 12.0.0)

legoktm commented 10 months ago

Thank you! I'm updating Debian to 12.1.1 right now and will get 13.0.0 rolling shortly. :)