From: iyzsong@member.fsf.org (宋文武)
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: guix-devel <guix-devel@gnu.org>,
Thomas Danckaert <post@thomasdanckaert.be>
Subject: Re: QT install and search paths
Date: Sun, 03 Sep 2017 12:58:04 +0800 [thread overview]
Message-ID: <878thwbcpv.fsf@member.fsf.org> (raw)
In-Reply-To: <0f97b74f-282d-9996-aa61-d3084e164b09@crazy-compilers.com> (Hartmut Goebel's message of "Sat, 2 Sep 2017 18:40:44 +0200")
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
Hartmut Goebel <h.goebel@crazy-compilers.com> writes:
> Am 27.08.2017 um 18:49 schrieb Hartmut Goebel:
>
> It is searched in several sub-directories of /tmp/guix-build-…/qtwayland-opensource-src-5.9.1/plugins/platforms/../../../ (which is the
> /tmp/guix-build-qtwayland-5.9.1.drv-0 directory), but not in …/lib. I did not find out how to
>
> Uff, I tracked this down in a heavy thinking session.
>
> * This search-path stems from the libraries RUNPATH, which was $ORIGIN/../../lib and is now only $ORIGIN/../../../
>
> * The RUNPATH is set in /gnu/store/…-qtbase-5.9.1/lib/qt5/mkspecs/features/qt.prf line 272, using the relative path from $$qtRelativeRPathBase (which equals
> $target.path, which is /gnu/store/…-qtbase-5.9.1/lib/qt5/plugins/platforms) to $QT_INSTALL_LIBS (which is /gnu/store/…-qtbase-5.9.1/lib). This relative path obviously is
> ../../../ .
>
> * Prior to this patch we installed the plugins into …-qtbase-5.9.1/plugins, which results in the aforementioned relative path to be ../../lib and the RUNPATH to be set to
> $ORIGIN/../../lib.
Oh, that's right, thanks!
>
> Conclusions:
>
> 1. It's been pure luck that the qtwayland tests passed prior to this change.
>
> 2. Do make the tests pass, we need to set LD_LIBRARY_PATH prior to running the tests
>
Yeah, patch updated with qtwayland fixed:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-qtbase-Use-a-more-standard-directory-layout.patch --]
[-- Type: text/x-patch, Size: 4999 bytes --]
From 18da38fbed889c482db6bab91749f63f7adbde5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@member.fsf.org>
Date: Fri, 25 Aug 2017 22:52:41 +0800
Subject: [PATCH] gnu: qtbase: Use a more standard directory layout.
* gnu/packages/qt.scm (qtbase)[arguments]: Pass docdir, headerdir,
archdatadir, datadir and examplesdir to 'configure'. Ajdust the
patch-qt_config.prf phase accordingly.
[native-search-paths]: Adjust accordingly.
(qtwayland)[arguments]: New field.
Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
---
gnu/packages/qt.scm | 43 +++++++++++++++++++++++++++----------------
1 file changed, 27 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 3e3588a50..80508f058 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -459,6 +459,12 @@ developers using C++ or QML, a CSS & JavaScript like language.")
"./configure"
"-verbose"
"-prefix" out
+ "-docdir" (string-append out "/share/doc/qt5")
+ "-headerdir" (string-append out "/include/qt5")
+ "-archdatadir" (string-append out "/lib/qt5")
+ "-datadir" (string-append out "/share/qt5")
+ "-examplesdir" (string-append
+ out "/share/doc/qt5/examples")
"-opensource"
"-confirm-license"
;; Do not build examples; if desired, these could go
@@ -488,38 +494,31 @@ developers using C++ or QML, a CSS & JavaScript like language.")
(add-after 'install 'patch-qt_config.prf
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
+ (mkspecs (string-append out "/lib/qt5/mkspecs"))
(qt_config.prf (string-append
- out "/mkspecs/features/qt_config.prf")))
+ mkspecs "/features/qt_config.prf")))
;; For each Qt module, let `qmake' uses search paths in the
;; module directory instead of all in QT_INSTALL_PREFIX.
(substitute* qt_config.prf
(("\\$\\$\\[QT_INSTALL_HEADERS\\]")
- "$$replace(dir, mkspecs/modules, include)")
+ "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
(("\\$\\$\\[QT_INSTALL_LIBS\\]")
- "$$replace(dir, mkspecs/modules, lib)")
+ "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
(("\\$\\$\\[QT_HOST_LIBS\\]")
- "$$replace(dir, mkspecs/modules, lib)")
- (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
- "$$replace(dir, mkspecs/modules, plugins)")
- (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
- "$$replace(dir, mkspecs/modules, libexec)")
+ "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
(("\\$\\$\\[QT_INSTALL_BINS\\]")
- "$$replace(dir, mkspecs/modules, bin)")
- (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
- "$$replace(dir, mkspecs/modules, imports)")
- (("\\$\\$\\[QT_INSTALL_QML\\]")
- "$$replace(dir, mkspecs/modules, qml)"))
+ "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
#t))))))
(native-search-paths
(list (search-path-specification
(variable "QMAKEPATH")
- (files '("")))
+ (files '("lib/qt5")))
(search-path-specification
(variable "QML2_IMPORT_PATH")
- (files '("qml")))
+ (files '("lib/qt5/qml")))
(search-path-specification
(variable "QT_PLUGIN_PATH")
- (files '("plugins")))
+ (files '("lib/qt5/plugins")))
(search-path-specification
(variable "XDG_DATA_DIRS")
(files '("share")))
@@ -805,6 +804,18 @@ developers using C++ or QML, a CSS & JavaScript like language.")
(snippet
;; The examples try to build and cause the build to fail
'(delete-file-recursively "examples"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments qtsvg)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'check 'set-ld-library-path
+ ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
+ ;;
+ ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
+ ;; wayland platform plugin.
+ (lambda _
+ (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
+ #t))))))
(native-inputs
`(("glib" ,glib)
("perl" ,perl)
--
2.13.3
[-- Attachment #3: Type: text/plain, Size: 1481 bytes --]
> 3. tests of other packages may fail for the same reason.
Yes, I have got tiled running, and find that 'cool-retro-term' need to
be adjusted.
And vlc fails to build due to can't find headers of Qt5X11Extras.
Indeed, the pkg-config output of Qt5X11Extras seems wrong:
--8<---------------cut here---------------start------------->8---
$ pkg-config --cflags --libs Qt5X11Extras
-I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5/QtGui -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5 -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5/QtCore -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5 -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5/QtX11Extras -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5 -L/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/lib -lQt5X11Extras -lQt5Gui -lQt5Core
--8<---------------cut here---------------end--------------->8---
I can try fix this pkg-config issue.
>
> I'll take care of the packages in kde-frameworks.scm, I assume/hope
> Thomas will take care of the ones in kde.scm.
Yeah, I build 'kiarchive', and find it puts 'mkspecs' under $out, which
needs change to $out/lib/qt5/mkspecs.
>
> 宋文武, how can we coordinate the required changes? Should they go into one patch? Or into a series?
I think we could make a series patches, and can squash them later if
suitable.
next prev parent reply other threads:[~2017-09-03 4:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 18:25 QT install and search paths Hartmut Goebel
2017-08-24 11:37 ` Thomas Danckaert
2017-08-25 7:32 ` Hartmut Goebel
2017-08-24 11:59 ` 宋文武
2017-08-25 7:06 ` Hartmut Goebel
2017-08-25 12:40 ` 宋文武
2017-08-25 16:04 ` 宋文武
2017-08-26 8:31 ` Hartmut Goebel
2017-08-27 16:49 ` Hartmut Goebel
2017-09-02 16:40 ` Hartmut Goebel
2017-09-03 4:58 ` 宋文武 [this message]
2017-09-03 11:46 ` 宋文武
2017-09-03 12:39 ` Hartmut Goebel
2017-09-03 14:04 ` Hartmut Goebel
2017-09-03 14:46 ` 宋文武
2017-09-04 7:44 ` Thomas Danckaert
2017-09-04 9:16 ` Hartmut Goebel
2017-09-07 13:38 ` 宋文武
2017-09-19 16:30 ` Hartmut Goebel
2017-09-22 12:59 ` Hartmut Goebel
2017-10-06 12:22 ` Hartmut Goebel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878thwbcpv.fsf@member.fsf.org \
--to=iyzsong@member.fsf.org \
--cc=guix-devel@gnu.org \
--cc=h.goebel@crazy-compilers.com \
--cc=post@thomasdanckaert.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).