Re: QT install and search paths
Hallo, I just posted to patch-series for this. - 28719 is your (unchanged) and my patches for changing the directory layout - 28720 are enhancements to KDE framework Please review these patches. Thanks! Both series are available on the "wip-qt-paths" branch. I suggest to push both series to master in one rush to avoid unnecessary rebuilds. http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28719 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28720 -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Re: QT install and search paths
Am 19.09.2017 um 18:30 schrieb Hartmut Goebel: > I found some things missing in may packages, so I suggest implementing > this first on the wip-qt-paths branch to avoid unnecessary rebuilds: > > - QCH > > - PythonModuleGeneration > > I will look at this and push further changes to the "wip-qt-paths" branch. I now pushed this branch. Feel free to fix whatever you mean ins necessary. I retired from building QCH for all packages, since for "extra-cmake-modules" there is he comment: to save space, we do not add these inputs. I also retired from activating PythonModuleGeneration, since the first package I treid ended up requiring python, python-sip, python2, and clang. THen I stopped :-) -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Re: QT install and search paths
Hi, Am 07.09.2017 um 15:38 schrieb 宋文武: > Yes, and here are my updates on the paths issue of pkg-config files and > qwt: I did put your patches and mine in a new branch "wip-qt-paths". Building these (based on master from 2017-09-17 12:08:48 86805c1ba39) passed. I found some things missing in may packages, so I suggest implementing this first on the wip-qt-paths branch to avoid unnecessary rebuilds: - QCH - PythonModuleGeneration I will look at this and push further changes to the "wip-qt-paths" branch. -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Re: QT install and search paths
Hartmut Goebel writes: > Am 04.09.2017 um 09:44 schrieb Thomas Danckaert: >> Just to make sure, the idea is to: >> >> 1. apply 宋文武's qtbase patch adjusting the paths of various qt components >> >> 2. apply your 2 patches for qtscintilla and qtwebkit >> >> 3. adjust kde.scm so packages in there build correctly? > > ACK from my side. Yes, and here are my updates on the paths issue of pkg-config files and qwt: >From e8a252f5037b77f44a1516c715bbd437a6e23cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sun, 3 Sep 2017 17:38:57 +0800 Subject: [PATCH 2/3] gnu: qt: Fix install paths in submodules. Before this, the paths in pkg-config (.pc) and libtool (.la) files of submodules are all pointing to qtbase. * gnu/packages/qt.scm (qtbase)[native-inputs]: Move 'which' to 'propagated-inputs'. [arguments]: Rename 'patch-mkspecs' phase to 'patch-mkspecs' and patch more qmake spec files there. (qtsvg)[arguments]: Add 'configure-qmake' phase. --- gnu/packages/qt.scm | 86 +++-- 1 file changed, 63 insertions(+), 23 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 80508f058..a41aa4fbb 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -375,7 +375,8 @@ developers using C++ or QML, a CSS & JavaScript like language.") #t (build-system gnu-build-system) (propagated-inputs - `(("mesa" ,mesa))) + `(("mesa" ,mesa) + ("which" ,(@ (gnu packages base) which (inputs `(("alsa-lib" ,alsa-lib) ("cups" ,cups) @@ -426,8 +427,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("perl" ,perl) ("pkg-config" ,pkg-config) ("python" ,python-2) - ("ruby" ,ruby) - ("which" ,(@ (gnu packages base) which + ("ruby" ,ruby))) (arguments `(#:phases (modify-phases %standard-phases @@ -491,10 +491,11 @@ developers using C++ or QML, a CSS & JavaScript like language.") '("-no-sse2")) "-no-mips_dsp" "-no-mips_dspr2") - (add-after 'install 'patch-qt_config.prf + (add-after 'install 'patch-mkspecs (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) -(mkspecs (string-append out "/lib/qt5/mkspecs")) +(archdata (string-append out "/lib/qt5")) +(mkspecs (string-append archdata "/mkspecs")) (qt_config.prf (string-append mkspecs "/features/qt_config.prf"))) ;; For each Qt module, let `qmake' uses search paths in the @@ -508,6 +509,20 @@ developers using C++ or QML, a CSS & JavaScript like language.") "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))") (("\\$\\$\\[QT_INSTALL_BINS\\]") "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))")) + + ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS. + (substitute* (string-append mkspecs "/features/qt_functions.prf") + (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2") + "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})")) + + ;; Resolve qmake spec files within qtbase by absolute paths. + (substitute* + (map (lambda (file) + (string-append mkspecs "/features/" file)) +'("device_config.prf" "moc.prf" "qt_build_config.prf" + "qt_config.prf" "winrt/package_manifest.prf")) + (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata) + (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)) #t)) (native-search-paths (list (search-path-specification @@ -553,26 +568,51 @@ developers using C++ or QML, a CSS & JavaScript like language.") (arguments `(#:phases (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; Valid QT_BUILD_PARTS variables are: - ;; libs tools tests examples demos docs translations - (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests" - (string-append "PREFIX=" out)) - (add-before 'install 'fix-Makefiles + (add-before 'configure 'configure-qmake (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out(assoc-ref outputs "out")) - (qtbase (assoc-ref inputs "qtbase"))) - (substitute* (find-files "." "Makefile") -(((string-append "INSTALL_ROOT)" qtbase)) - (string-append "INSTALL_ROOT)" out))) +
Re: QT install and search paths
Am 04.09.2017 um 09:44 schrieb Thomas Danckaert: > Just to make sure, the idea is to: > > 1. apply 宋文武's qtbase patch adjusting the paths of various qt components > > 2. apply your 2 patches for qtscintilla and qtwebkit > > 3. adjust kde.scm so packages in there build correctly? ACK from my side. -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Re: QT install and search paths
From: Hartmut Goebel Subject: Re: QT install and search paths Date: Sat, 2 Sep 2017 18:40:44 +0200 > I'll take care of the packages in kde-frameworks.scm, I assume/hope > Thomas will take care of the ones in kde.scm. Hi, Just to make sure, the idea is to: 1. apply 宋文武's qtbase patch adjusting the paths of various qt components 2. apply your 2 patches for qtscintilla and qtwebkit 3. adjust kde.scm so packages in there build correctly? I'll have a look, but give me some time :) Thomas
Re: QT install and search paths
Hartmut Goebel writes: > Am 03.09.2017 um 13:46 schrieb 宋文武: > > 0002-gnu-qt-Fix-install-paths-in-submodules.patch > > I'm afraid this breaks some packages, e.g. qwt (qt.scm) and sonnet > (kde-frameworks.scm). Can you have a look at what is going wrong here? > Thanks Yeah, this patch need more works. I also find that 'qttools' ends up with broken 'imported_location' in Qt5LinguistToolsConfig.cmake and Qt5HelpConfigExtras.cmake, will look into it later...
Re: QT install and search paths
Am 03.09.2017 um 13:46 schrieb 宋文武: > 0002-gnu-qt-Fix-install-paths-in-submodules.patch > I'm afraid this breaks some packages, e.g. qwt (qt.scm) and sonnet (kde-frameworks.scm). Can you have a look at what is going wrong here? Thanks (Without this patch, but with my other two applied I can build all packages in qt.scm and kde-framewords.scm.) -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Re: QT install and search paths
Hi, enclosed the required patch for qscintilla to make python-qscintilla build and qtwebkit. -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible | >From 3e4a25c412632095b1415296f9d46a4b93fad212 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sat, 2 Sep 2017 23:20:15 +0200 Subject: [PATCH 1/2] gnu: qtwebkit: Fix rpath for the qmlwebkit plugins. After the qtbase installation directories have been changed, the relative RPATH in the libs no longer matched the sructure. * gnu/packages/qt.scm(qtwebkit)[arguments]: New phase fix-qmlwebkit-plugins-rpath. --- gnu/packages/qt.scm | 9 + 1 file changed, 9 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 3478fdaae..86b35bdc8 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -1613,6 +1613,15 @@ different kinds of sliders, and much more.") (arguments `(#:phases (modify-phases %standard-phases + (add-before 'configure 'fix-qmlwebkit-plugins-rpath + (lambda _ + (substitute* "Source/WebKit/qt/declarative/experimental/experimental.pri" + (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib") +"RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../../lib")) + (substitute* "Source/WebKit/qt/declarative/public.pri" + (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib") +"RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../lib")) + #t)) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) -- 2.13.5 >From c3fab9284454c90461dc601970e2a67942f84373 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sun, 3 Sep 2017 11:36:42 +0200 Subject: [PATCH 2/2] gnu: qscintilla: Adopt paths REWORD * gnu/packages/qt.scm(qscintilla)[configure]: XXX --- gnu/packages/qt.scm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 86b35bdc8..f9e743348 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -1412,8 +1412,10 @@ contain over 620 classes.") (string-append out "/include")) (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]") (string-append out "/translations")) - (("\\$\\$\\[QT_INSTALL_DATA\\]") out) - (("\\$\\$\\[QT_HOST_DATA\\]") out)) + (("\\$\\$\\[QT_INSTALL_DATA\\]") + (string-append out "/lib/qt$${QT_MAJOR_VERSION}")) + (("\\$\\$\\[QT_HOST_DATA\\]") + (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))) (zero? (system* "qmake" (native-inputs `(("qtbase" ,qtbase))) (home-page "http://www.riverbankcomputing.co.uk/software/qscintilla/intro";) -- 2.13.5
Re: QT install and search paths
> [...] > And vlc fails to build due to can't find headers of Qt5X11Extras. > Indeed, the pkg-config output of Qt5X11Extras seems wrong: > $ 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 > I can try fix this pkg-config issue. Here is it: >From b2f4822b3a1c8f76d2c6dcf39590d3810d3510bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sun, 3 Sep 2017 17:38:57 +0800 Subject: [PATCH 2/2] gnu: qt: Fix install paths in submodules. Before this, the paths in pkg-config (.pc) and libtool (.la) files of submodules are all pointing to qtbase. * gnu/packages/qt.scm (qtsvg)[arguments]: Use a customized qt.conf to override install paths to $out. --- gnu/packages/qt.scm | 57 + 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 80508f058..771a03bd5 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -554,25 +554,48 @@ developers using C++ or QML, a CSS & JavaScript like language.") `(#:phases (modify-phases %standard-phases (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) +(qtbase (assoc-ref inputs "qtbase")) +(tmpdir (string-append (getenv "TMPDIR"))) +(qmake (string-append tmpdir "/qmake")) +(qt.conf (string-append tmpdir "/qt.conf"))) + ;; Use qmake with a customized qt.conf to override install + ;; paths to $out. + (symlink (which "qmake") qmake) + (with-output-to-file qt.conf + (lambda () + ;; Thoese must be kept in sync with qtbase. + (format #t "[Paths] +Prefix=~a +ArchData=lib/qt5 +Data=share/qt5 +Documentation=share/doc/qt5 +Headers=include/qt5 +Libraries=lib +LibraryExecutables=lib/qt5/libexec +Binaries=bin +Tests=tests +Plugins=lib/qt5/plugins +Imports=lib/qt5/imports +Qml2Imports=lib/qt5/qml +Translations=share/qt5/translations +Settings=etc/xdg +Examples=share/doc/qt5/examples +HostPrefix=~a +HostData=lib/qt5 +HostBinaries=bin +HostLibrariesPath=lib +" out qtbase))) + ;; Valid QT_BUILD_PARTS variables are: ;; libs tools tests examples demos docs translations - (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests" - (string-append "PREFIX=" out)) - (add-before 'install 'fix-Makefiles - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out(assoc-ref outputs "out")) - (qtbase (assoc-ref inputs "qtbase"))) - (substitute* (find-files "." "Makefile") -(((string-append "INSTALL_ROOT)" qtbase)) - (string-append "INSTALL_ROOT)" out))) - #t))) -(add-before 'check 'set-display - (lambda _ -;; make Qt render "offscreen", required for tests -(setenv "QT_QPA_PLATFORM" "offscreen") -#t))) + (zero? (system* qmake "QT_BUILD_PARTS = libs tools tests") + (add-before 'check 'set-display + (lambda _ + ;; make Qt render "offscreen", required for tests + (setenv "QT_QPA_PLATFORM" "offscreen") + #t))) (define-public qtimageformats (package (inherit qtsvg) -- 2.13.3 This fixes the pkg-config files of various qt submodules, and gets vlc built. I think remaining non-KDE things to fix are qt-utils.scm, sddm, greenisland and cool-retro-term.
Re: QT install and search paths
Hartmut Goebel 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: >From 18da38fbed889c482db6bab91749f63f7adbde5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 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 --- 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")))
Re: QT install and search paths
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. 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 3. tests of other packages may fail for the same reason. I'll take care of the packages in kde-frameworks.scm, I assume/hope Thomas will take care of the ones in kde.scm. 宋文武, how can we coordinate the required changes? Should they go into one patch? Or into a series? -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Re: QT install and search paths
Am 25.08.2017 um 18:04 schrieb 宋文武: > Here is a patch to adjust the directory layout of qtbase: I tested this patch and building qtwayland failed: cd /tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/tests/auto/client/client ./target_wrapper.sh ./tst_client The error message is (which is misleading, see below) This application failed to start because it could not find or load the Qt platform plugin "wayland" in "". Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx. I searched the internet for this without any useful result (I did not search too long, though). But there was a hint pointing to some missing library. And indeed the strace output (see below, shortened) shows: the platform plugin is found, but it requires libQt5WaylandClient.so.5 which is searched without success. The file exists in /tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/lib/, so it is part of qtwayland but not yet installed. 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 15562 open("/tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/plugins/platforms/libqwayland-generic.so", O_RDONLY|O_CLOEXEC) = 8 15562 read(8, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\24\0\0\0\0\0\0"..., 832) = 832 … 15562 open("/gnu/store/dnmbw43sl6yx82awzj8c0y4wcjz5z2kd-qtbase-5.9.1/lib/libQt5WaylandClient.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 15562 open("/tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/plugins/platforms/../../../tls/x86_64/libQt5WaylandClient.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 15562 stat("/tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/plugins/platforms/../../../tls/x86_64", 0x7ffc321fe710) = -1 ENOENT (No such file or directory) 15562 open("/tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/plugins/platforms/../../../tls/libQt5WaylandClient.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 15562 stat("/tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/plugins/platforms/../../../tls", 0x7ffc321fe710) = -1 ENOENT (No such file or directory) 15562 open("/tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/plugins/platforms/../../../x86_64/libQt5WaylandClient.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 15562 stat("/tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/plugins/platforms/../../../x86_64", 0x7ffc321fe710) = -1 ENOENT (No such file or directory) 15562 open("/tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/plugins/platforms/../../../libQt5WaylandClient.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 15562 stat("/tmp/guix-build-qtwayland-5.9.1.drv-0/qtwayland-opensource-src-5.9.1/plugins/platforms/../../..", {st_mode=S_IFDIR|0755, st_size=100, ...}) = 0 15562 open("/gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/libQt5WaylandClient.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) Thinks I tried to solve this: - setting |QT_QPA_PLATFORM_PLUGIN_PATH - creating a file |qt.conf in the app folder Things I did *not* try: - reading http://www.tripleboot.org/?p=138 – to long :-) Another insight: - export QT_DEBUG_PLUGINS=1 makes qt report useful messages. || -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Re: QT install and search paths
Am 25.08.2017 um 18:04 schrieb 宋文武: > Here is a patch to adjust the directory layout of qtbase: Thanks a lot! I merged it in my kde-plama branch and just started a new build for kde-frameworks and plasma-desktop. I'll report my insights. -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Re: QT install and search paths
Here is a patch to adjust the directory layout of qtbase: >From b264ccfdec5c7334ef7e428c8b483bc673edc393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 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. --- gnu/packages/qt.scm | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 3e3588a50..2d7c83ae5 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"))) -- 2.13.3 I have built qtscript with it, which looks fine so far.
Re: QT install and search paths
Hartmut Goebel writes: > Am 24.08.2017 um 13:59 schrieb 宋文武: >> Currently, it doesn't follow a normal package layout, We should change >> it to (like it in Debian and ArchLinux): > > I'd support this. > > What do you think about using "…/qt5" instead of just "…/qt", like > Fedora does. IMHO this is not a bad idea. Sure, > >> Which need adjust the configure flags, search-patchs and the >> qt_config.prf of our qtbase package (and maybe some kde ones, I don't >> know). > > Can you take care of this? I can take care of kde-frameworks.scm. Maybe > we can work on a different branch until we finished all packages. Okay, I'll reply to this thread once I got qtbase adjusted.
Re: QT install and search paths
Am 24.08.2017 um 13:37 schrieb Thomas Danckaert: > Either way, I think qtbase's QT_PLUGIN_PATH setting only has an effect > if a user installs qtbase directly in their profile […] so > applications using these plugins will still need to set the correct > environment variable themselves somehow? Do my understanding, "search-paths" will make the the listed paths of all installed packages to be added to the named variable. Thus in this case the package would "just" need to ensure all it's dependencies are installed. The rest is done automatically. Which leads to another, different problem: For this to work AFAIU the package needs to propagate all the plugins, etc. it is using. Which is not nice, and which I assume is the resume from > https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00776.html > > For the kdevelop package, I wrapped the executable, setting a bunch of > Qt-related environment variables. This works as a stop-gap, but it > will break down when a user uses multiple Qt/KDE applications with > different plugin requirements (some KDE daemons, such as kdeinit, need > to find all their plugins at the moment they are started). Nice idea! But unfortunately this is not a solution in the long term – since it would require this to be done for each and every KDE and even QT application. > Ludo suggested using a profile hook to set the required environment > variables depending on the installed applications, but I never looked > into it further because wrapping the executable was “good enough” > for. For a KDE desktop, I think you'll need a better solution. I'd appreciate if you could have a look at this. I have some other todos on my lit with higher priority, but this problems are a show-stopper for my efforts on the plasma-desktop (which are much more time-consuming than I thought). -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Re: QT install and search paths
Am 24.08.2017 um 13:59 schrieb 宋文武: > Currently, it doesn't follow a normal package layout, We should change > it to (like it in Debian and ArchLinux): I'd support this. What do you think about using "…/qt5" instead of just "…/qt", like Fedora does. IMHO this is not a bad idea. > Which need adjust the configure flags, search-patchs and the > qt_config.prf of our qtbase package (and maybe some kde ones, I don't > know). Can you take care of this? I can take care of kde-frameworks.scm. Maybe we can work on a different branch until we finished all packages. -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Re: QT install and search paths
Hartmut Goebel writes: > Hi, > > I'm currently working on the build of KDE's plasma-desktop. When strac-ing > the tets, I dicoverd that plaugins are searched in > > /gnu/store/…-qtbase-5.9.1/plugins/… > > while most of the KDE program use > > /gnu/store/…-plasma-workspace-5.10.4/lib/plugins/… (mind the additional > `lib`) > > which is not searched. Wondering why, I found this in qt.scm (qtbase): > > (search-path-specification > (variable "QT_PLUGIN_PATH") > (files '("plugins"))) > > This means that `lib/plugins` is *not* included in QT_PLUGIN_PATH and thus > not searched. (Which I assume is the reason for many test-failures.) > > Also in qt.scm (qtbase) there is: > > (substitute* qt_config.prf > … > (("\$\$\[QT_INSTALL_PLUGINS\]") > "$$replace(dir, mkspecs/modules, plugins)") > > I assume this should make the plugins to be in stalled in …/plugins, Yes, 'dir' would be $out/mkspecs/modules, this will make a qmake based package install its Qt plugins into $out/plugins. > but KDE framework is installing into …/lib/plugins. > > So I assume this is wrong or there are other places which need to be adpoted > to the changed directory layout. > > What do you think? Currently, it doesn't follow a normal package layout, We should change it to (like it in Debian and ArchLinux): ARCHDATA: lib/qt DATA: share/qt DOCS: share/doc/qt HEADERS:include/qt LIBS: lib PLUGINS:lib/qt/plugins LIBEXECS: lib/qt/libexec BINS: bin IMPORTS:lib/qt/imports QML:lib/qt/qml EXAMPLES: share/doc/qt/examples Which need adjust the configure flags, search-patchs and the qt_config.prf of our qtbase package (and maybe some kde ones, I don't know).
Re: QT install and search paths
From: Hartmut Goebel Subject: QT install and search paths Date: Wed, 23 Aug 2017 20:25:10 +0200 [...] I found this in qt.scm (qtbase): (search-path-specification (variable "QT_PLUGIN_PATH") (files '("plugins"))) This means that `lib/plugins` is *not* included in QT_PLUGIN_PATH and thus not searched. (Which I assume is the reason for many test-failures.) (indeed, e.g. for kdevplatform, I set the QT_PLUGIN_PATH before running tests) Also in qt.scm (qtbase) there is: (substitute* qt_config.prf … (("\\$\\$\\[QT_INSTALL_PLUGINS\\]") "$$replace(dir, mkspecs/modules, plugins)") I assume this should make the plugins to be in stalled in …/plugins, but KDE framework is installing into …/lib/plugins. I'm not sure if this is an error, or if KDE chooses this directory on purpose. Either way, I think qtbase's QT_PLUGIN_PATH setting only has an effect if a user installs qtbase directly in their profile (or do I misunderstand native-search-paths? The manual doesn't explain the difference between "native-search-paths" and "search-paths"), so applications using these plugins will still need to set the correct environment variable themselves somehow? A previous discussion is here https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00776.html For the kdevelop package, I wrapped the executable, setting a bunch of Qt-related environment variables. This works as a stop-gap, but it will break down when a user uses multiple Qt/KDE applications with different plugin requirements (some KDE daemons, such as kdeinit, need to find all their plugins at the moment they are started). Ludo suggested using a profile hook to set the required environment variables depending on the installed applications, but I never looked into it further because wrapping the executable was “good enough” for. For a KDE desktop, I think you'll need a better solution. Thomas
QT install and search paths
Hi, I'm currently working on the build of KDE's plasma-desktop. When strac-ing the tets, I dicoverd that plaugins are searched in /gnu/store/…-qtbase-5.9.1/plugins/… while most of the KDE program use /gnu/store/…-plasma-workspace-5.10.4/lib/plugins/… (mind the additional `lib`) which is not searched. Wondering why, I found this in qt.scm (qtbase): (search-path-specification (variable "QT_PLUGIN_PATH") (files '("plugins"))) This means that `lib/plugins` is *not* included in QT_PLUGIN_PATH and thus not searched. (Which I assume is the reason for many test-failures.) Also in qt.scm (qtbase) there is: (substitute* qt_config.prf … (("\\$\\$\\[QT_INSTALL_PLUGINS\\]") "$$replace(dir, mkspecs/modules, plugins)") I assume this should make the plugins to be in stalled in …/plugins, but KDE framework is installing into …/lib/plugins. So I assume this is wrong or there are other places which need to be adpoted to the changed directory layout. What do you think? All of the written above is true for the `qml` directory. -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible | 0xBF773B65.asc Description: application/pgp-keys