<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>403042</bug_id>
          
          <creation_ts>2019-01-09 16:06:15 +0000</creation_ts>
          <short_desc>Qt5 from KDE 5.12 runtime requires Linux kernel &gt;= 3.17</short_desc>
          <delta_ts>2019-01-10 08:05:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>8</classification_id>
          <classification>I don&apos;t know</classification>
          <product>kde</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Flatpak</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://github.com/flathub/flathub/issues/805</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>regression</keywords>
          <priority>NOR</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>scx.mail</reporter>
          <assigned_to name="Unassigned bugs">unassigned-bugs-null</assigned_to>
          <cc>aleixpol</cc>
    
    <cc>scx.mail</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1831236</commentid>
    <comment_count>0</comment_count>
    <who name="">scx.mail</who>
    <bug_when>2019-01-09 16:06:15 +0000</bug_when>
    <thetext>It seems that Qt5 from KDE 5.12 requires Linux kernel &gt;= *3.17*.
https://github.com/flathub/flathub/issues/805

```
&gt; $ flatpak run --command=file org.kde.Sdk//5.11 -L /usr/lib/libQt5Core.so.5
&gt; /usr/lib/libQt5Core.so.5: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.28, BuildID[sha1]=55f0af0db424e36d4747078c3983937f41761d75, stripped
```

```
&gt; $ flatpak run --command=file org.kde.Sdk//5.12 -L /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
&gt; /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=343152921fe7eb79af20efb2f735659b0982991b, for GNU/Linux 3.17.0, stripped
```

According to the minimum-linux_p.h, it is probably because Qt started using the `getrandom` syscall which was introduced in Linux *3.17*.
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/minimum-linux_p.h?id=4d9ac14bf8d1c1a33a2720c7f7dcaf8d912a592f#n77
It is possible build Qt without the `getentropy` feature and that would lower the required kernel version to *3.16*. Disabling `renameat2` will further reduce the requirements to *2.6.28*.

As you can see, it is possible to build Qt 5.12 against older kernel (RHEL 7.6, Devtoolset 7):
```
&gt; $ file lib/libQt5Core.so.5.12.0
&gt; lib/libQt5Core.so.5.12.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.28, BuildID[sha1]=acde2ce7459f76f3edae7e4caa75230fe0fbaad9, not stripped
```

See also:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895718#51
https://forum.critterandguitari.com/t/problems-with-qt/2246/9

Anyway, this means that on systems with the older kernel, you can&apos;t neither build nor run Qt5-based applications. We&apos;re still talking about the KDE 5.12 runtime, of course.

Examples of build failures:
```
&gt; /cfgtest_QtCore: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
```

```
&gt; /usr/bin/lrelease: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
```

Examples of run failures:
```
&gt; $ flatpak run org.pencil2d.Pencil2D
&gt; bwrap: Can&apos;t mkdir /usr/lib/sdk: Read-only file system
&gt; error: ldconfig failed, exit status 256
```

```
&gt; $ flatpak run org.olivevideoeditor.Olive
&gt; bwrap: Can&apos;t mkdir /usr/lib/sdk: Read-only file system
&gt; error: ldconfig failed, exit status 256
```

```
&gt; $ flatpak run org.bunkus.mkvtoolnix-gui
&gt; bwrap: Can&apos;t mkdir /usr/lib/sdk: Read-only file system
&gt; error: ldconfig failed, exit status 256
```

List of affected systems:
 * EL 7 (Red Hat Enterprise Linux 7, CentOS 7, Scientific Linux 7, Oracle Linux 7 with the Red Hat compatible kernel) - End Of Life: 2024-06
 * Debian 8 (oldstable) - End Of Life: 2020-05
 * Ubuntu 14.04 LTS - End Of Life: 2019-04

Currently affected apps from Flathub repo:
 * org.bunkus.mkvtoolnix-gui - https://github.com/flathub/flathub/pull/533
 * org.olivevideoeditor.Olive - https://github.com/flathub/flathub/pull/794
 * org.pencil2d.Pencil2D - https://github.com/flathub/flathub/pull/527

```
&gt; $ grep -HERi &apos;runtime-version.*5\.12&apos; *
&gt; org.bunkus.mkvtoolnix-gui/org.bunkus.mkvtoolnix-gui.yaml:runtime-version: &apos;5.12&apos;
&gt; org.kde.KStyle.Adwaita/org.kde.KStyle.Adwaita.json:  &quot;runtime-version&quot;: &quot;5.12&quot;,
&gt; org.kde.KStyle.HighContrast/org.kde.KStyle.HighContrast.json:  &quot;runtime-version&quot;: &quot;5.12&quot;,
&gt; org.kde.PlatformTheme.QGnomePlatform/org.kde.PlatformTheme.QGnomePlatform.json:    &quot;runtime-version&quot;: &quot;5.12&quot;,
&gt; org.olivevideoeditor.Olive/org.olivevideoeditor.Olive.yaml:runtime-version: &apos;5.12&apos;
&gt; org.pencil2d.Pencil2D/org.pencil2d.Pencil2D.yaml:runtime-version: &apos;5.12&apos;
```

What is worse, this problem affects all applications from the KDE repository.
https://phabricator.kde.org/source/flatpak-kde-applications

I would like to ask you to rebuild KDE 5.12 against Linux &lt;= 3.2.
https://phabricator.kde.org/source/flatpak-kde-runtime

There is already an idea to document and verify allowed kernel dependencies, in particular for runtimes.
https://github.com/flatpak/flatpak/issues/2551#issuecomment-452697898

Please keep in mind that Freedesktop 18.08 (on which KDE 5.12 is based) contains glibc 2.27, so it requires at least Linux *3.2*, but it shouldn&apos;t be a problem.
On the other hand, Freedesktop 1.6 uses glibc 2.24, which requires kernel *2.6.32*, at least for i686 and x86_64.

https://www.sourceware.org/ml/libc-alpha/2016-08/msg00212.html
&gt; The GNU C Library version 2.24 is now available
&gt; (...)
&gt; The minimum Linux kernel version that this version of the GNU C Library can be used with is 3.2, except on i[4567]86 and x86_64, where Linux kernel version 2.6.32 or later suffices (on architectures that already required kernel versions more recent than 3.2, those requirements remain unchanged).

https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html
&gt; The GNU C Library version 2.26 is now available
&gt; (...)
&gt; Linux kernel 3.2 or later is required at runtime, on all architectures supported by that kernel. (This is a change from version 2.25 only for x86-32 and x86-64.)

See also:
https://github.com/flathub/flathub/issues/805
https://github.com/flatpak/flatpak/issues/2551
https://github.com/flathub/net.ankiweb.Anki/pull/19#issuecomment-451034931
https://github.com/flathub/net.ankiweb.Anki/pull/19#issuecomment-452248896
https://github.com/KDE/flatpak-kde-runtime/pull/5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1831272</commentid>
    <comment_count>1</comment_count>
    <who name="Aleix Pol">aleixpol</who>
    <bug_when>2019-01-09 18:43:49 +0000</bug_when>
    <thetext>Should be fixed as of https://phabricator.kde.org/R257:a029f2957e947f6e32fe8a595edb0ac553654e90</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1831328</commentid>
    <comment_count>2</comment_count>
    <who name="">scx.mail</who>
    <bug_when>2019-01-10 08:05:52 +0000</bug_when>
    <thetext>It seems that it has been fixed.

Before:
```
&gt; $ flatpak run --command=bash org.kde.Sdk//5.12 -c &apos;find / -xtype f -executable 2&gt;/dev/null | xargs -I{} file -L &quot;{}&quot; | grep &quot;for GNU/Linux&quot; &apos; | grep -Ev &apos;3\.2\.0&apos;
&gt; /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=343152921fe7eb79af20efb2f735659b0982991b, for GNU/Linux 3.17.0, stripped
&gt; /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.12.0: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=343152921fe7eb79af20efb2f735659b0982991b, for GNU/Linux 3.17.0, stripped
&gt; /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.12: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=343152921fe7eb79af20efb2f735659b0982991b, for GNU/Linux 3.17.0, stripped
&gt; /usr/lib/x86_64-linux-gnu/libQt5Core.so: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=343152921fe7eb79af20efb2f735659b0982991b, for GNU/Linux 3.17.0, stripped
```

After:
```
&gt; $ flatpak run --command=bash org.kde.Sdk//5.12 -c &apos;find / -xtype f -executable 2&gt;/dev/null | xargs -I{} file -L &quot;{}&quot; | grep &quot;for GNU/Linux&quot; &apos; | grep -Ev &apos;3\.2\.0&apos;
&gt; /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d4b2645839fd05656f1a7c5f7f9c5bf5965dddce, for GNU/Linux 2.6.28, stripped
&gt; /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.12.0: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d4b2645839fd05656f1a7c5f7f9c5bf5965dddce, for GNU/Linux 2.6.28, stripped
&gt; /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.12: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d4b2645839fd05656f1a7c5f7f9c5bf5965dddce, for GNU/Linux 2.6.28, stripped
&gt; /usr/lib/x86_64-linux-gnu/libQt5Core.so: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d4b2645839fd05656f1a7c5f7f9c5bf5965dddce, for GNU/Linux 2.6.28, stripped
```</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>