GNU bug report logs - #30340
[PATCH 0/6] Adopt NixOS patches for Qt5

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Sat, 3 Feb 2018 19:23:02 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

Full log


Message #50 received at 30340 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>, 30340 <at> debbugs.gnu.org
Subject: Re: [bug#30340] [PATCH 1/6] gnu: qtbase: Use the store paths for
 other packages and dynamically loaded libs.
Date: Wed, 07 Feb 2018 17:16:59 +0100
[Message part 1 (text/plain, inline)]
Hartmut Goebel <h.goebel <at> crazy-compilers.com> writes:

> Adobt the NixOS patches as of 2018-01-19:

I don't see any patches in this series.  FWIW I think we deviate enough
from NixOS at this point that the comments are unnecessary.

> - .cmake.in and .prf files are not patches.
>
> - src/corelib/tools/qtimezoneprivate_tz.cpp: NixOS uses $TZDIR, we use
>   hardcoded path to tzdata.

Why hardcode the path?  We set TZDIR as well in (gnu system).

[...]

> @@ -540,7 +542,42 @@ developers using C++ or QML, a CSS & JavaScript like language.")
>                            "qt_config.prf" "winrt/package_manifest.prf"))
>                   (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
>                   (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
> -               #t))))))
> +               #t)))
> +         (add-after 'unpack 'patch-paths
> +           ;; Use the absolute paths for dynamically loaded libs, otherwise
> +           ;; the lib will be searched in the actual executable's RUNPATH,
> +           ;; which may not include the requested lib.

Is there any reason we cannot add these libraries to RUNPATH instead?
The below approach seems somewhat fragile to me.

> +           (lambda* (#:key inputs #:allow-other-keys)
> +             ;; tzdata
> +             (substitute* "src/corelib/tools/qtimezoneprivate_tz.cpp"
> +               (("\"/usr(/(share|lib)/zoneinfo/)" _ path _)
> +                (string-append "\"" (assoc-ref inputs "tzdata") path)))
> +             ;; libresolve. TODO: Check is this is really required
> +             (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
> +                                                 "cross-libc" "libc"))))
> +               (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
> +                              "src/network/kernel/qhostinfo_unix.cpp")
> +                 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
> +                (string-append a glibc "/lib/lib" b))))
> +             ;; X11/locale (compose path)
> +             (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
> +               ;; Don't search in /usr/…/X11/locale, …
> +               (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
> +                (string-append "// " line))
> +               ;; … but use libx11's path
> +               (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
> +                (string-append a "\"" (assoc-ref inputs "libx11") b)))
> +             ;; libGL
> +             (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
> +               (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
> +                (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
> +             ;; libXcusor
> +             (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
> +               (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
> +                (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
> +               (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
> +                (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
> +             #t)))))
>      (native-search-paths
>       (list (search-path-specification
>              (variable "QMAKEPATH")
> -- 
> 2.13.6
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 7 years and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.