On 10/13/24 10:22 AM, Helmut Jarausch wrote:
> Hi,
> 
> I have somewhat broken my GenToo system.
> (Nearly) all applications based on qt:5 die with
> 
> Cannot mix incompatible Qt library (5.15.13) with this library (5.15.14)
> 
> I have re-emerged all packages in dev-qt/ in slot 5, which didn't help.
> I've tried strace but couldn't find the culprit.
> 
> Does anybody know a means to find an old library or plugin which causes
> this problem?
> 
> Many thanks for your help,
> Helmut

The general issue here is that applications which use Qt can do it via
one of two methods:

- link to Qt regularly, and only require a specific major version, i.e.
  all 5.* versions are valid and work fine.

- link to Qt's private API, which means you must build against a
  specific PV and use that at runtime, and to enforce this, the
  resulting code will perform a check at runtime to see whether you are
  mixing versions, and if you are mixing versions it will error out with
  "Cannot mix incompatible Qt library (5.xx.xx) with this library
  (5.xx.xx)"


You may recognize the latter error message. :)

It is explicitly documented in the Gentoo policy for Qt packaging:
https://wiki.gentoo.org/wiki/Project:Qt/Policies#Dependencies

Packages which use private API headers of Qt *must* depend on a binding
subslot operator to enforce that they are rebuilt every time Qt is
updated. Packages which do NOT use private API headers should never
depend on binding subslot operators, as they should not be rebuilt.

In theory, all packages in ::gentoo should be correctly annotated as
such. Maybe not all of them actually are...

You can detect which ones have the issue. They will link to symbols such
as "XXXXX@Qt_6_PRIVATE_API".

I have a script which can detect that for existing binaries:
https://git.sr.ht/~eschwartz/dotfiles/tree/master/item/bin/pkg-list-linked-libraries

e.g.

pkg-list-linked-libraries -s /usr/lib64 Qt_6_PRIVATE_API

It will report a bunch of results for dev-qt/* packages too, but with a
bit of filtering you can see what's relevant?


-- 
Eli Schwartz

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to