* [PATCH] core-updates: qtbase fails to compile on Linux < 3.17
@ 2018-06-01 11:25 Ricardo Wurmus
2018-06-01 11:46 ` Ricardo Wurmus
2018-06-04 11:33 ` Ludovic Courtès
0 siblings, 2 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2018-06-01 11:25 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 860 bytes --]
Hi Guix,
qtbase sometimes fails to build on core-updates. I now know that it
only fails on Linux < 3.17, which is why I’ve seen the failure only on
RHEL6 and RHEL7 systems with Linux 2.6.32 and 3.10, respectively.
With the attached patch, qtbase builds on all supported kernels as the
minimum kernel version becomes 2.6.28, which is lower than the minimum
for glibc.
It disables code that depends on the “getentropy” and “renameat2”
syscalls. Qtbase has a fallback implementation for random things when
getentropy is not available. See src/corelib/global/qrandom.cpp for
more information.
Note that the *current* RHEL 7 kernel reports as 3.10. RHEL 7 is the
latest Red Hat distribution that is currently available, so the problem
affects not only old RHEL6 systems.
What do you think about this patch?
--
Ricardo
[-- Attachment #2: 0001-gnu-qtbase-Fix-build-on-older-kernels.patch --]
[-- Type: text/x-patch, Size: 2117 bytes --]
From d215bef77823fdbbb297c3641a18952926dacef8 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Fri, 1 Jun 2018 13:19:25 +0200
Subject: [PATCH] gnu: qtbase: Fix build on older kernels.
* gnu/packages/qt.scm (qtbase)[arguments]: Add configure flags
"-no-feature-getentropy" and "-no-feature-renameat2".
---
gnu/packages/qt.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index c3d0bff2f..a48a04fe4 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
-;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
@@ -487,6 +487,16 @@ developers using C++ or QML, a CSS & JavaScript like language.")
out "/share/doc/qt5/examples")
"-opensource"
"-confirm-license"
+
+ ;; These features require higher versions of Linux than the
+ ;; minimum version of the glibc. See
+ ;; src/corelib/global/minimum-linux_p.h. By disabling these
+ ;; features Qt5 applications can be used on the oldest
+ ;; kernels that the glibc supports, including the RHEL6
+ ;; (2.6.32) and RHEL7 (3.10) kernels.
+ "-no-feature-getentropy" ; requires Linux 3.17
+ "-no-feature-renameat2" ; requires Linux 3.16
+
;; Do not build examples; if desired, these could go
;; into a separate output, but for the time being, we
;; prefer to save the space and build time.
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] core-updates: qtbase fails to compile on Linux < 3.17
2018-06-01 11:25 [PATCH] core-updates: qtbase fails to compile on Linux < 3.17 Ricardo Wurmus
@ 2018-06-01 11:46 ` Ricardo Wurmus
2018-06-04 11:33 ` Ludovic Courtès
1 sibling, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2018-06-01 11:46 UTC (permalink / raw)
To: guix-devel
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
> qtbase sometimes fails to build on core-updates.
Of course that’s not just on “core-updates”. It’s a consequence of the
qtbase upgrade on the “master” branch.
--
Ricardo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] core-updates: qtbase fails to compile on Linux < 3.17
2018-06-01 11:25 [PATCH] core-updates: qtbase fails to compile on Linux < 3.17 Ricardo Wurmus
2018-06-01 11:46 ` Ricardo Wurmus
@ 2018-06-04 11:33 ` Ludovic Courtès
1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2018-06-04 11:33 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
Hello!
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> qtbase sometimes fails to build on core-updates. I now know that it
> only fails on Linux < 3.17, which is why I’ve seen the failure only on
> RHEL6 and RHEL7 systems with Linux 2.6.32 and 3.10, respectively.
Good catch!
> With the attached patch, qtbase builds on all supported kernels as the
> minimum kernel version becomes 2.6.28, which is lower than the minimum
> for glibc.
>
> It disables code that depends on the “getentropy” and “renameat2”
> syscalls. Qtbase has a fallback implementation for random things when
> getentropy is not available. See src/corelib/global/qrandom.cpp for
> more information.
I’m late to the party but I think it’s OK.
I think a better fix would be for Qt to handle ENOSYS correctly, which
presumably is what happens on these old kernels. I suppose it’s also
more difficult to achieve…
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-04 11:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-01 11:25 [PATCH] core-updates: qtbase fails to compile on Linux < 3.17 Ricardo Wurmus
2018-06-01 11:46 ` Ricardo Wurmus
2018-06-04 11:33 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.