From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:55860) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipIcV-00053y-NC for guix-patches@gnu.org; Wed, 08 Jan 2020 16:12:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipIcU-00067W-9E for guix-patches@gnu.org; Wed, 08 Jan 2020 16:12:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45424) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipIcU-000676-25 for guix-patches@gnu.org; Wed, 08 Jan 2020 16:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ipIcT-0001i1-TA for guix-patches@gnu.org; Wed, 08 Jan 2020 16:12:01 -0500 Subject: bug#38228: Fwd: [PATCH] gnu: boost: Build with python3 Resent-To: guix-patches@gnu.org Resent-Message-ID: From: Marius Bakke In-Reply-To: <8b0f0ae38588baf77c1e43d1690f3dd4@autistici.org> References: <2894916c81c703293e028556070cd964@autistici.org> <87d0dzl7tx.fsf@devup.no> <20191111093637.GH3954@E5400> <0755dc96f75da487259457a88d8e23ff@autistici.org> <87a78r8lgf.fsf@devup.no> <8b0f0ae38588baf77c1e43d1690f3dd4@autistici.org> Date: Wed, 08 Jan 2020 22:11:17 +0100 Message-ID: <87pnft1wne.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: goodoldpaul@autistici.org Cc: 38228-done@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable goodoldpaul@autistici.org writes: > Hello Marius, > I apologize for taking so long: the end of the semester is near and my=20 > time is a little limited. No worries. :-) > I'm attaching the two patches. As you said the one that parameterizes=20 > the python version of boost-with-python3 must be applied to master, the=20 > other one to core-updates. Excellent! I went ahead and adjusted it to work with the Boost cross-compilation changes on 'core-updates', as well as simplified it a little: https://git.savannah.gnu.org/cgit/guix.git/commit/?h=3Dcore-updates&id=3D2a= c164a8107dbb07ba1ed29986859d3e936f795a >>> The patch builds boost with python3 and parameterizes the python >>> version, as Efraim suggested. I built it successfully on core updates. >>> When I tried building Epour on core-updates and saw that Guix was >>> starting to build Bash 5.0 I renounced (:D) and I built it on master >>> with boost-with-python3 . >>=20 >> In general, working on the 'core-updates' branch requires a fairly >> powerful computer (and lots of time), sorry about that! >>=20 >>> Libtorrent-rasterbar seems to build fine on master but some tests fail >>> to pass and they all seem to be network related but then again this is >>> torrent we are talking about. I didn't investigate further but I=20 >>> attach >>> the log. >>=20 >> Strange. I suppose these tests are not run when using Boost + Python=20 >> 2? >> In any case we don't have to worry about that just yet ;-) > > I gave another look at Libtorrent-rasterbar and I noticed that it=20 > depends directly on python2, so the answer to the failing tests could be= =20 > that upgrading both boost and the python version ( as was done in=20 > Efraim's code that I used last time to test boost-with-python3 ) broke=20 > something that a closer look to the failing tests could figure out. > > Right now I tested the upgraded version without problems by building the= =20 > following ( randomly selected) packages: innoextract, swig, libarea,=20 > pbbam, cgal, openimageio. If you have a better idea of what must be=20 > tested please tell me and I'll do some more tests. Thanks for testing! I had to adjust 'Vigra' to work with Python 3, but it was straightforward: https://git.savannah.gnu.org/cgit/guix.git/commit/?h=3Dcore-updates&id=3Da8= 2e6faa8b993d1f3b47a8bd22c4509f7cae7ec1 >>> From 91a25fb143ad0e2e20e8ddadea0c0610849adf92 Mon Sep 17 00:00:00 2001 >>> From: Giacomo Leidi >>> Date: Tue, 12 Nov 2019 00:24:49 +0100 >>> Subject: [PATCH] gnu: boost: Build with python3. >>>=20 >>> * gnu/packages/boost.scm (boost): >>> [arguments]: Parameterize python version. >>> [native-inputs]: Use python3. >>=20 >> [...] >>=20 >>> (arguments >>> - `(#:tests? #f >>> + `(#:modules ((guix build gnu-build-system) >>> + (guix build utils) >>> + (srfi srfi-1)) >>=20 >> If you add (guix build python-build-system) in there ... > > [...] > >>> (replace 'configure >>> (lambda* (#:key inputs outputs #:allow-other-keys) >>> (let ((icu (assoc-ref inputs "icu4c")) >>> + (python (assoc-ref inputs "python")) >>> + (python-version >>> + (take (string-split ,(package-version python)=20 >>> #\.) 2)) >>=20 >> ... then you can use (python-version (python-version python)) here and >> below. > > I did add python-build-system to #:modules, but Guix kept complaining=20 > that python-build-system was not importable until I added > > #:imported-modules ((guix build python-build-system) > ,@%gnu-build-system-modules) > > Do you happen to have any idea of the differences from=20 > #:imported-modules and #:modules? And why was using only=20 > gnu-build-system possible also without adding it to #:imported-modules? Caleb explains it very well here: https://lists.gnu.org/archive/html/guix-devel/2019-12/msg00105.html > Or even better: is there any kind of documentation of the arguments and=20 > keywords and return values of Guix's functions? Something like this=20 > https://flask.palletsprojects.com/en/1.1.x/api/ . Unfortunately no, but documenting parts of the Guix API is being discussed. The procedures are typically documented in the source code though, so 'git grep' is the best tool for now. :-/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4WRXUACgkQoqBt8qM6 VPoKsAgAlQsyLKqjTtodja1Ba5EuU2f6srB8dGY5PsWqn3XvWIz9oqUVGTju/ucj C3PSZw1l/x1GnDongptQqoqrFgdJA+bnMx+YLAPXi9hDwefaSra/gAoyGkDH5I35 OCFbF19tzlC38nMtg/sGZEDqfcQ8Ufmtl3fOueYf2mKJb3CCzEdDdpmVL2FD90w3 nyZFryHvkHKprmkoP+YDtTy+MriizpRw9uVDgvfRvoS8+3TbrORoWZE8YGS0nSbU 6Aey66OUsa//dFy6ghbaEQdELv0l0gWZlBJO5hFYB/szARiH9m5lE+i0x3eblRNf ZzcrnFPpGPrL4NvGL5qeDzF0FcuKqA== =v94g -----END PGP SIGNATURE----- --=-=-=--