Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-91531

Inconsistent use of Qt_6_PRIVATE_API breaks BC between Qt 6.0 and Qt 6.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.1.0 Beta 1
    • Fix Version/s: 6.1.0 RC
    • Labels:
      None
    • Platform/s:
      Linux/Wayland, Linux/X11, Linux/Other display system
    • Commits:
      e4efa00c72c7011f4e5c27722c2a522b30274610 (qt/qtbase/6.1) 734ab493f7c05e06f4c8bc99884d8a99612c79c0 (qt/qtbase/dev)

      Description

      Just consider the the output of readelf for the different versions of Qt Network:

      ${color} readelf -CWs /usr/lib/libQt6Network.so.6.1.0 | grep -i qsslcertificate::frompath
       1888: 00000000000b0d90  2363 FUNC    GLOBAL DEFAULT   11 QSslCertificate::fromPath(QString const&, QSsl::EncodingFormat, QSslCertificate::PatternSyntax)@@Qt_6_PRIVATE_API
      ${color} readelf -CWs usr/lib/libQt6Network.so.6.0.1 | grep -i qsslcertificate::frompath     
       1813: 00000000000a7890  2363 FUNC    GLOBAL DEFAULT   11 QSslCertificate::fromPath(QString const&, QSsl::EncodingFormat, QSslCertificate::PatternSyntax)@@Qt_6

      This leads to failures like

      syncthingtray-qt6 --help
      syncthingtray-qt6: symbol lookup error: /usr/lib/libsyncthingconnector-qt6.so.1.1.2: undefined symbol: _ZN15QSslCertificate8fromPathERK7QStringN4QSsl14EncodingFormatENS_13PatternSyntaxE, version Qt_6

      unless one would recompile the application/library against the new ABI.

      It looks like symbols/functions using QSsl::EncodingFormat are affected.

      These libraries come from Arch Linux but it looks very similar with the ones provided for openSUSE. Here are the corresponding build scripts:

      I couldn't find any relevant changes (git diff v6.0.0..v6.1.0-beta1 – src/network/ssl/qsslcertificate.{h,cpp}) so I suspect something within the underlying system which makes the decision whether to add Qt_6_PRIVATE_API or not has changed or depends on something random.

      I assume the correct behavior is that Qt_6_PRIVATE_API is not added to the symbol name because none of these functions belong to the private API.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            martchus martchus
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes