unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: qt: Fix for i686.
@ 2015-04-29 15:13 Taylan Ulrich Bayırlı/Kammer
  2015-04-30 15:39 ` Taylan Ulrich Bayırlı/Kammer
  2015-04-30 22:25 ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-04-29 15:13 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 41 bytes --]

This is really hacky but seems to work.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0004-gnu-qt-Fix-for-i686.patch --]
[-- Type: text/x-diff, Size: 2442 bytes --]

From 35fdd9e2fcd5b953b3a088d0bb22d84f7dc5ded9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Fri, 24 Apr 2015 10:43:57 +0200
Subject: [PATCH 4/4] gnu: qt: Fix for i686.

See <https://bugreports.qt.io/browse/QTBUG-45205>.

* gnu/packages/qt.scm (qt): Copy mesa's GL headers to a temporary directory,
  patching them for Qt.
---
 gnu/packages/qt.scm | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 8de1ffe..0f4282d 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -166,8 +166,29 @@ webrtc/tools/e2e_quality/audio/perf")))))
      `(#:phases
          (alist-replace
           'configure
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out")))
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            ;; Mesa headers need monkey-patching for Qt.  See:
+            ;; https://bugreports.qt.io/browse/QTBUG-45205
+            (let* ((out (assoc-ref outputs "out"))
+                   (mesa (assoc-ref inputs "mesa"))
+                   (mesa-include (string-append mesa "/include"))
+                   (mesa-pkgconfig (string-append mesa "/lib/pkgconfig"))
+                   (mesa* (tmpnam))
+                   (mesa*-include (string-append mesa* "/include"))
+                   (mesa*-pkgconfig (string-append mesa* "/lib/pkgconfig")))
+              (copy-recursively mesa-include mesa*-include)
+              (substitute* (string-append mesa*-include "/GL/glext.h")
+                (("typedef ptrdiff_t GLsizeiptr;" all)
+                 (string-append "#ifndef BUILDING_CHROMIUM\n" all))
+                (("typedef ptrdiff_t GLintptr;" all)
+                 (string-append all "\n#endif")))
+              (copy-recursively mesa-pkgconfig mesa*-pkgconfig)
+              (substitute* (find-files mesa*-pkgconfig "\\.pc$")
+                (("includedir=.*")
+                 (string-append "includedir=" mesa*-include "\n")))
+              (setenv "PKG_CONFIG_PATH"
+                      (string-append mesa*-pkgconfig ":"
+                                     (getenv "PKG_CONFIG_PATH")))
               (substitute* '("configure" "qtbase/configure")
                 (("/bin/pwd") (which "pwd")))
               (substitute* "qtbase/src/corelib/global/global.pri"
-- 
2.2.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: qt: Fix for i686.
  2015-04-29 15:13 [PATCH] gnu: qt: Fix for i686 Taylan Ulrich Bayırlı/Kammer
@ 2015-04-30 15:39 ` Taylan Ulrich Bayırlı/Kammer
  2015-04-30 15:43   ` Andreas Enge
  2015-05-01  6:26   ` Taylan Ulrich Bayırlı/Kammer
  2015-04-30 22:25 ` Ludovic Courtès
  1 sibling, 2 replies; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-04-30 15:39 UTC (permalink / raw)
  To: guix-devel

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:

> This is really hacky but seems to work.

It seems Guix helped a Qt developer reproduce the bug and now there's a
proper fix:

https://bugreports.qt.io/browse/QTBUG-45205  (see bottom comment)

I will try those patches out; should have results by tomorrow.

Taylan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: qt: Fix for i686.
  2015-04-30 15:39 ` Taylan Ulrich Bayırlı/Kammer
@ 2015-04-30 15:43   ` Andreas Enge
  2015-05-01  6:26   ` Taylan Ulrich Bayırlı/Kammer
  1 sibling, 0 replies; 6+ messages in thread
From: Andreas Enge @ 2015-04-30 15:43 UTC (permalink / raw)
  To: Taylan Ulrich Bayırlı/Kammer; +Cc: guix-devel

On Thu, Apr 30, 2015 at 05:39:36PM +0200, Taylan Ulrich Bayırlı/Kammer wrote:
> It seems Guix helped a Qt developer reproduce the bug

This is neat!

Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: qt: Fix for i686.
  2015-04-29 15:13 [PATCH] gnu: qt: Fix for i686 Taylan Ulrich Bayırlı/Kammer
  2015-04-30 15:39 ` Taylan Ulrich Bayırlı/Kammer
@ 2015-04-30 22:25 ` Ludovic Courtès
  2015-05-01  7:15   ` Taylan Ulrich Bayırlı/Kammer
  1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2015-04-30 22:25 UTC (permalink / raw)
  To: Taylan Ulrich "Bayırlı/Kammer"; +Cc: guix-devel

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> This is really hacky but seems to work.

Good.  :-)

> From 35fdd9e2fcd5b953b3a088d0bb22d84f7dc5ded9 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>  <taylanbayirli@gmail.com>
> Date: Fri, 24 Apr 2015 10:43:57 +0200
> Subject: [PATCH 4/4] gnu: qt: Fix for i686.

“Fix compilation on i686.”

> See <https://bugreports.qt.io/browse/QTBUG-45205>.
>
> * gnu/packages/qt.scm (qt): Copy mesa's GL headers to a temporary directory,
>   patching them for Qt.

[...]

>       `(#:phases
>           (alist-replace
>            'configure
> -          (lambda* (#:key outputs #:allow-other-keys)
> -            (let ((out (assoc-ref outputs "out")))
> +          (lambda* (#:key inputs outputs #:allow-other-keys)
> +            ;; Mesa headers need monkey-patching for Qt.  See:
> +            ;; https://bugreports.qt.io/browse/QTBUG-45205
> +            (let* ((out (assoc-ref outputs "out"))
> +                   (mesa (assoc-ref inputs "mesa"))
> +                   (mesa-include (string-append mesa "/include"))
> +                   (mesa-pkgconfig (string-append mesa "/lib/pkgconfig"))
> +                   (mesa* (tmpnam))
> +                   (mesa*-include (string-append mesa* "/include"))
> +                   (mesa*-pkgconfig (string-append mesa* "/lib/pkgconfig")))
> +              (copy-recursively mesa-include mesa*-include)
> +              (substitute* (string-append mesa*-include "/GL/glext.h")
> +                (("typedef ptrdiff_t GLsizeiptr;" all)
> +                 (string-append "#ifndef BUILDING_CHROMIUM\n" all))
> +                (("typedef ptrdiff_t GLintptr;" all)
> +                 (string-append all "\n#endif")))
> +              (copy-recursively mesa-pkgconfig mesa*-pkgconfig)
> +              (substitute* (find-files mesa*-pkgconfig "\\.pc$")
> +                (("includedir=.*")
> +                 (string-append "includedir=" mesa*-include "\n")))
> +              (setenv "PKG_CONFIG_PATH"
> +                      (string-append mesa*-pkgconfig ":"
> +                                     (getenv "PKG_CONFIG_PATH")))

For clarity, could you make it a separate phase before the ‘configure’
phase, and also augment the comment to mention that we do the
monkey-patching here rather than using the bundled copy so we can still
use our own headers and DSO (what Mark explained)?

OK to push with this change, thanks a lot!

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: qt: Fix for i686.
  2015-04-30 15:39 ` Taylan Ulrich Bayırlı/Kammer
  2015-04-30 15:43   ` Andreas Enge
@ 2015-05-01  6:26   ` Taylan Ulrich Bayırlı/Kammer
  1 sibling, 0 replies; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-05-01  6:26 UTC (permalink / raw)
  To: guix-devel

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:

> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
>
>> This is really hacky but seems to work.
>
> It seems Guix helped a Qt developer reproduce the bug and now there's a
> proper fix:
>
> https://bugreports.qt.io/browse/QTBUG-45205  (see bottom comment)
>
> I will try those patches out; should have results by tomorrow.

The patches worked fine, and I saw nothing controversial about them so I
pushed the fix to core-updates.

Taylan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: qt: Fix for i686.
  2015-04-30 22:25 ` Ludovic Courtès
@ 2015-05-01  7:15   ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 0 replies; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-05-01  7:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:
>
>> This is really hacky but seems to work.
>
> Good.  :-)
>
>> From 35fdd9e2fcd5b953b3a088d0bb22d84f7dc5ded9 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>>  <taylanbayirli@gmail.com>
>> Date: Fri, 24 Apr 2015 10:43:57 +0200
>> Subject: [PATCH 4/4] gnu: qt: Fix for i686.
>
> “Fix compilation on i686.”
>
>> See <https://bugreports.qt.io/browse/QTBUG-45205>.
>>
>> * gnu/packages/qt.scm (qt): Copy mesa's GL headers to a temporary directory,
>>   patching them for Qt.
>
> [...]
>
>>       `(#:phases
>>           (alist-replace
>>            'configure
>> -          (lambda* (#:key outputs #:allow-other-keys)
>> -            (let ((out (assoc-ref outputs "out")))
>> +          (lambda* (#:key inputs outputs #:allow-other-keys)
>> +            ;; Mesa headers need monkey-patching for Qt.  See:
>> +            ;; https://bugreports.qt.io/browse/QTBUG-45205
>> +            (let* ((out (assoc-ref outputs "out"))
>> +                   (mesa (assoc-ref inputs "mesa"))
>> +                   (mesa-include (string-append mesa "/include"))
>> +                   (mesa-pkgconfig (string-append mesa "/lib/pkgconfig"))
>> +                   (mesa* (tmpnam))
>> +                   (mesa*-include (string-append mesa* "/include"))
>> +                   (mesa*-pkgconfig (string-append mesa* "/lib/pkgconfig")))
>> +              (copy-recursively mesa-include mesa*-include)
>> +              (substitute* (string-append mesa*-include "/GL/glext.h")
>> +                (("typedef ptrdiff_t GLsizeiptr;" all)
>> +                 (string-append "#ifndef BUILDING_CHROMIUM\n" all))
>> +                (("typedef ptrdiff_t GLintptr;" all)
>> +                 (string-append all "\n#endif")))
>> +              (copy-recursively mesa-pkgconfig mesa*-pkgconfig)
>> +              (substitute* (find-files mesa*-pkgconfig "\\.pc$")
>> +                (("includedir=.*")
>> +                 (string-append "includedir=" mesa*-include "\n")))
>> +              (setenv "PKG_CONFIG_PATH"
>> +                      (string-append mesa*-pkgconfig ":"
>> +                                     (getenv "PKG_CONFIG_PATH")))
>
> For clarity, could you make it a separate phase before the ‘configure’
> phase, and also augment the comment to mention that we do the
> monkey-patching here rather than using the bundled copy so we can still
> use our own headers and DSO (what Mark explained)?
>
> OK to push with this change, thanks a lot!
>
> Ludo’.

I pushed another patch now, which uses the proper fix provided by the Qt
maintainers; sorry for making you go through the trouble to review
this. :-)

Taylan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-01  7:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-29 15:13 [PATCH] gnu: qt: Fix for i686 Taylan Ulrich Bayırlı/Kammer
2015-04-30 15:39 ` Taylan Ulrich Bayırlı/Kammer
2015-04-30 15:43   ` Andreas Enge
2015-05-01  6:26   ` Taylan Ulrich Bayırlı/Kammer
2015-04-30 22:25 ` Ludovic Courtès
2015-05-01  7:15   ` Taylan Ulrich Bayırlı/Kammer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).