From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: qt: monolithic or modular? Date: Wed, 18 May 2016 15:17:57 +0300 Message-ID: <20160518121757.GD13276@debian-netbook> References: <20160405072220.1d828a86@debian-netbook> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QXO0/MSS4VvK6f+D" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b30QV-0003g5-Hg for guix-devel@gnu.org; Wed, 18 May 2016 08:18:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b30QR-0004Gu-4V for guix-devel@gnu.org; Wed, 18 May 2016 08:18:10 -0400 Received: from flashner.co.il ([178.62.234.194]:52995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b30QQ-0004GR-OR for guix-devel@gnu.org; Wed, 18 May 2016 08:18:07 -0400 Received: from debian-netbook (85.65.27.139.dynamic.barak-online.net [85.65.27.139]) by flashner.co.il (Postfix) with ESMTPSA id 54411401A5 for ; Wed, 18 May 2016 12:17:59 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20160405072220.1d828a86@debian-netbook> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --QXO0/MSS4VvK6f+D Content-Type: multipart/mixed; boundary="sfyO1m2EN8ZOtJL6" Content-Disposition: inline --sfyO1m2EN8ZOtJL6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 05, 2016 at 07:22:20AM +0300, Efraim Flashner wrote: > I try very hard to not build qt on my laptop, mostly because of the long = build time (7 hours on hydra [0]). Currently we download and use the big do= wnload of qt[1] and frankly I'd rather not. Qt does also ship in smaller bi= ts[2], 32 if I counted correctly. I propose we package the submodules and o= ver time we go through the packages that use qt and switch out the monolith= ic qt for just the parts that the program actually uses. It makes it less d= aunting to build, should make the closures smaller, and means that if a sub= module fails to build on an architecture then they only lose that module, n= ot all of qt. >=20 > [0] http://hydra.gnu.org/build/1114596 > [1] https://download.qt.io/official_releases/qt/5.6/5.6.0/single/qt-every= where-opensource-src-5.6.0.tar.xz > [2] https://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/ >=20 Finally got around to building qtbase out, took me 6 hours total on my machine. So since hydra[1] says it takes 7:15 it's a bit shorter. I haven't had a chance yet to try out qmake on the other modules or to try to optimize the build yet. One of the things I did want to try was replacing python2 with python-wrapper and enabling parallel-builds. I opted for straight out copying qt-5's build rather than inheriting so it'll be easier to remove it if/when we're ready, and I updated the license based on the text shown during build-time. I've attached what I have so far if anyone else wants to take a look at it while I'm working on it. Also very worthy of note, qt-5.5.1 is listed at 288 MB, and qtbase-5.6.0 is all of 85 MB. efraim@debian-netbook:~$ du -sch /gnu/store/r9bpiyz2w5bkavnx3s1ffxpgc51wa9z5-qtbase-5.6.0/* 6.6M /gnu/store/r9bpiyz2w5bkavnx3s1ffxpgc51wa9z5-qtbase-5.6.0/bin 560K /gnu/store/r9bpiyz2w5bkavnx3s1ffxpgc51wa9z5-qtbase-5.6.0/doc 25M /gnu/store/r9bpiyz2w5bkavnx3s1ffxpgc51wa9z5-qtbase-5.6.0/examples 20M /gnu/store/r9bpiyz2w5bkavnx3s1ffxpgc51wa9z5-qtbase-5.6.0/include 30M /gnu/store/r9bpiyz2w5bkavnx3s1ffxpgc51wa9z5-qtbase-5.6.0/lib 2.5M /gnu/store/r9bpiyz2w5bkavnx3s1ffxpgc51wa9z5-qtbase-5.6.0/mkspecs 2.6M /gnu/store/r9bpiyz2w5bkavnx3s1ffxpgc51wa9z5-qtbase-5.6.0/plugins 85M total [1] http://hydra.gnu.org/build/1202329 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --sfyO1m2EN8ZOtJL6 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-Add-qtbase.patch" Content-Transfer-Encoding: quoted-printable =46rom 8d324a49e93b51daf2b756c7b749fd9be295824d Mon Sep 17 00:00:00 2001 =46rom: Efraim Flashner Date: Wed, 18 May 2016 15:15:28 +0300 Subject: [PATCH] gnu: Add qtbase. * gnu/packages/qt.scm (qtbase): New variable. --- gnu/packages/qt.scm | 142 ++++++++++++++++++++++++++++++++++++++++++++++++= +++- 1 file changed, 140 insertions(+), 2 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 097ec06..bdd298f 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -2,7 +2,7 @@ ;;; Copyright =C2=A9 2013, 2014, 2015 Andreas Enge ;;; Copyright =C2=A9 2015 Sou Bunnbu ;;; Copyright =C2=A9 2015 Ludovic Court=C3=A8s -;;; Copyright =C2=A9 2015 Efraim Flashner +;;; Copyright =C2=A9 2015, 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,7 +20,7 @@ ;;; along with GNU Guix. If not, see . =20 (define-module (gnu packages qt) - #:use-module ((guix licenses) #:select (bsd-3 gpl2 gpl3 lgpl2.1 lgpl2.1+= x11-style)) + #:use-module ((guix licenses) #:select (bsd-3 gpl2 gpl3 lgpl2.1 lgpl2.1+= lgpl3 x11-style)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build utils) @@ -201,6 +201,144 @@ developers using C++ or QML, a CSS & JavaScript like = language.") ;; Qt 5: assembler error; see . (supported-systems (delete "mips64el-linux" %supported-systems)))) =20 +(define-public qtbase + (package + (name "qtbase") + (version "5.6.0") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases= /qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "0ynnvcs5idivzldsq5ciqg9myg82b3l3906l4vjv54lyamf8mykf")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove one of the two bundled harfbuzz copies in additi= on + ;; to passing "-system-harfbuzz". + (delete-file-recursively "src/3rdparty/harfbuzz-ng") + ;; Remove the bundled sqlite copy in addition to + ;; passing "-system-sqlite". + (delete-file-recursively "src/3rdparty/sqlite"))))) + (build-system gnu-build-system) + (propagated-inputs + `(("mesa" ,mesa))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("dbus" ,dbus) + ("cups" ,cups) + ("expat" ,expat) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("glib" ,glib) + ("harfbuzz" ,harfbuzz) + ("icu4c" ,icu4c) + ("libjpeg" ,libjpeg) + ("libmng" ,libmng) + ("libpci" ,pciutils) + ("libpng" ,libpng) + ("libx11" ,libx11) + ("libxcomposite" ,libxcomposite) + ("libxcursor" ,libxcursor) + ("libxfixes" ,libxfixes) + ("libxi" ,libxi) + ("libxinerama" ,libxinerama) + ("libxkbcommon" ,libxkbcommon) + ("libxml2" ,libxml2) + ("libxrandr" ,libxrandr) + ("libxrender" ,libxrender) + ("libxslt" ,libxslt) + ("libxtst" ,libxtst) + ("mtdev" ,mtdev) + ("mysql" ,mysql) + ("nss" ,nss) + ("openssl" ,openssl) + ("postgresql" ,postgresql) + ("pulseaudio" ,pulseaudio) + ("pcre" ,pcre) + ("sqlite" ,sqlite) + ("udev" ,eudev) + ("unixodbc" ,unixodbc) + ("xcb-util" ,xcb-util) + ("xcb-util-image" ,xcb-util-image) + ("xcb-util-keysyms" ,xcb-util-keysyms) + ("xcb-util-renderutil" ,xcb-util-renderutil) + ("xcb-util-wm" ,xcb-util-wm) + ("zlib" ,zlib))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex) + ("gperf" ,gperf) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-2) + ("ruby" ,ruby) + ("which" ,(@ (gnu packages base) which)))) + (arguments + `(;; FIXME: Disabling parallel building is a quick hack to avoid the + ;; failure described in + ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.h= tml + ;; A more structural fix is needed. + #:parallel-build? #f + #:phases + (modify-phases %standard-phases + (add-after 'configure 'patch-bin-sh + (lambda _ + (substitute* '("config.status" + "configure" + "mkspecs/features/qt_functions.prf" + "qmake/library/qmakebuiltins.cpp") + (("/bin/sh") (which "sh"))) + #t)) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "configure" + (("/bin/pwd") (which "pwd"))) + (substitute* "src/corelib/global/global.pri" + (("/bin/ls") (which "ls"))) + ;; do not pass "--enable-fast-install", which makes the + ;; configure process fail + (zero? (system* + "./configure" + "-verbose" + "-prefix" out + "-opensource" + "-confirm-license" + ;; Most "-system-..." are automatic, but some use + ;; the bundled copy by default. + "-system-sqlite" + "-system-harfbuzz" + ;; explicitly link with openssl instead of dlopenin= g it + "-openssl-linked" + ;; explicitly link with dbus instead of dlopening it + "-dbus-linked" + ;; drop special machine instructions not supported + ;; on all instances of the target + ,@(if (string-prefix? "x86_64" + (or (%current-target-system) + (%current-system))) + '() + '("-no-sse2")) + "-no-sse3" + "-no-ssse3" + "-no-sse4.1" + "-no-sse4.2" + "-no-avx" + "-no-avx2" + "-no-mips_dsp" + "-no-mips_dspr2")))))))) + (home-page "https://www.qt.io/") + (synopsis "Cross-platform GUI library") + (description "Qt is a cross-platform application and UI framework for +developers using C++ or QML, a CSS & JavaScript like language.") + (license (list lgpl2.1 lgpl3)) + ;; Qt 5: assembler error; see . + (supported-systems (delete "mips64el-linux" %supported-systems)))) + (define-public qt-4 (package (inherit qt) (version "4.8.7") --=20 2.7.4 --sfyO1m2EN8ZOtJL6-- --QXO0/MSS4VvK6f+D Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJXPF1vAAoJEPTB05F+rO6TVY4P/jWymfeBrLxDw9VlnCSz4zOP wc24Zyecdh3qoL8tQK2L3KUC1/q693ix6G0EcEDkDgVdmdEQrxHy1iJKD8AHoIfK 6RkBOBS4N6VN6ySyc92mFhDsK9r+AcAt+s5d816JGrQwoq4egpckwxMBpTUZS0Hr dlp1s18X0bRWUPb2a7SxB1ZGsi4J2/NSk9766V0EqiVpw44XN3pUmiLCetcFiSaQ UUwAfHAPi3pCol8nH4WE5dQ3pL1yIPrBHbuVDmVrd42egoP2Y5hJOw1f8Hw1Hj+c O79h+Rn5I+4ORdIkDsMUQEuzzxhuJffIUepSWy2HOrQVFPt3ir6GUCAL2QXwRMAs myYd8aBti+OquNFy1HNPhQz/yNuZgmK2B5Z4C/gUTV7Rm+sb1qHaywwlpR5VelSj a3zPgfrGX+HOEYkVlIP/++Aej4SHcZuMCMbFPYWuoffY5q5tgtaEEWcNK7yX3Yi6 mfi1vwRQGmpweyysG2klP6iMc8lcE+Uz+3mGKWo+p8vRMyGw5l8AMTls0mCNODsC aC1yAqjFir4ouMfboW0a958/caT/MI4MjrrP13wxk8dtCK2esYtR2D7U1/aIjHih TJaltQuMCKCSSEk6RJ5WxOHOvfvPeUYF3DrCbf5vx9Wr0h0uBiVFMhQvMx2c2J/a r4CxQzS+FqlwotyfgycN =X+kl -----END PGP SIGNATURE----- --QXO0/MSS4VvK6f+D--